Jellyfin Qt
QML Library for interacting with the Jellyfin multimedia server
Loading...
Searching...
No Matches
displaypreferencesdto.h
Go to the documentation of this file.
1/*
2 * Sailfin: a Jellyfin client written using Qt
3 * Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19/*
20 * WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
21 * OVERWRITTEN AT SOME POINT!
22 *
23 * If there is a bug in this file, please fix the code generator used to generate this file found in
24 * core/openapigenerator.d.
25 *
26 * This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
27 * file with a newer file if needed instead of manually updating the files.
28 */
29
30#ifndef JELLYFIN_DTO_DISPLAYPREFERENCESDTO_H
31#define JELLYFIN_DTO_DISPLAYPREFERENCESDTO_H
32
33#include <QJsonObject>
34#include <QJsonValue>
35#include <QString>
36#include <optional>
37
41
42namespace Jellyfin {
43// Forward declaration
44class ApiClient;
45}
46namespace Jellyfin {
47namespace DTO {
48
49
51public:
53 bool rememberIndexing,
54 qint32 primaryImageHeight,
55 qint32 primaryImageWidth,
56 QJsonObject customPrefs,
58 bool showBackdrop,
59 bool rememberSorting,
61 bool showSidebar
62 );
63
65
70
71 static DisplayPreferencesDto fromJson(QJsonObject source);
72 void setFromJson(QJsonObject source);
73 QJsonObject toJson() const;
74
75 // Properties
79 QString jellyfinId() const;
83 void setJellyfinId(QString newJellyfinId);
84 bool jellyfinIdNull() const;
85 void setJellyfinIdNull();
86
90 QString viewType() const;
94 void setViewType(QString newViewType);
95 bool viewTypeNull() const;
96 void setViewTypeNull();
97
101 QString sortBy() const;
105 void setSortBy(QString newSortBy);
106 bool sortByNull() const;
107 void setSortByNull();
108
112 QString indexBy() const;
116 void setIndexBy(QString newIndexBy);
117 bool indexByNull() const;
118 void setIndexByNull();
119
123 bool rememberIndexing() const;
127 void setRememberIndexing(bool newRememberIndexing);
128
132 qint32 primaryImageHeight() const;
136 void setPrimaryImageHeight(qint32 newPrimaryImageHeight);
137
141 qint32 primaryImageWidth() const;
145 void setPrimaryImageWidth(qint32 newPrimaryImageWidth);
146
150 QJsonObject customPrefs() const;
154 void setCustomPrefs(QJsonObject newCustomPrefs);
155
156
158
159 void setScrollDirection(ScrollDirection newScrollDirection);
160
164 bool showBackdrop() const;
168 void setShowBackdrop(bool newShowBackdrop);
169
173 bool rememberSorting() const;
177 void setRememberSorting(bool newRememberSorting);
178
179
180 SortOrder sortOrder() const;
181
182 void setSortOrder(SortOrder newSortOrder);
183
187 bool showSidebar() const;
191 void setShowSidebar(bool newShowSidebar);
192
196 QString client() const;
200 void setClient(QString newClient);
201 bool clientNull() const;
202 void setClientNull();
203
204
205protected:
207 QString m_viewType;
208 QString m_sortBy;
209 QString m_indexBy;
213 QJsonObject m_customPrefs;
219 QString m_client;
220
221private:
222 // Private constructor which generates an invalid object, for use withing DisplayPreferencesDto::fromJson();
224};
225
226
227} // NS DTO
228
229namespace Support {
230
232
233template <>
235
236template<>
238
239} // NS DTO
240} // NS Jellyfin
241
242#endif // JELLYFIN_DTO_DISPLAYPREFERENCESDTO_H
An Api client for Jellyfin. Handles requests and authentication.
Definition apiclient.h:90
Definition displaypreferencesdto.h:50
void setViewTypeNull()
Definition displaypreferencesdto.cpp:181
SortOrder m_sortOrder
Definition displaypreferencesdto.h:217
QString m_client
Definition displaypreferencesdto.h:219
void setClient(QString newClient)
Gets or sets the client.
Definition displaypreferencesdto.cpp:267
qint32 primaryImageHeight() const
Gets or sets the height of the primary image.
Definition displaypreferencesdto.cpp:217
void setShowSidebar(bool newShowSidebar)
Gets or sets a value indicating whether [show sidebar].
Definition displaypreferencesdto.cpp:261
void setSortByNull()
Definition displaypreferencesdto.cpp:194
QString indexBy() const
Gets or sets the index by.
Definition displaypreferencesdto.cpp:198
void setSortBy(QString newSortBy)
Gets or sets the sort by.
Definition displaypreferencesdto.cpp:187
void replaceData(DisplayPreferencesDto &other)
Definition displaypreferencesdto.cpp:77
qint32 m_primaryImageWidth
Definition displaypreferencesdto.h:212
QString client() const
Gets or sets the client.
Definition displaypreferencesdto.cpp:265
void setScrollDirection(ScrollDirection newScrollDirection)
Definition displaypreferencesdto.cpp:237
void setSortOrder(SortOrder newSortOrder)
Definition displaypreferencesdto.cpp:255
bool showBackdrop() const
Gets or sets a value indicating whether to show backdrops on this item.
Definition displaypreferencesdto.cpp:241
QString m_sortBy
Definition displaypreferencesdto.h:208
bool clientNull() const
Definition displaypreferencesdto.cpp:270
QJsonObject customPrefs() const
Gets or sets the custom prefs.
Definition displaypreferencesdto.cpp:229
QJsonObject m_customPrefs
Definition displaypreferencesdto.h:213
bool viewTypeNull() const
Definition displaypreferencesdto.cpp:177
void setPrimaryImageHeight(qint32 newPrimaryImageHeight)
Gets or sets the height of the primary image.
Definition displaypreferencesdto.cpp:219
void setRememberIndexing(bool newRememberIndexing)
Gets or sets a value indicating whether [remember indexing].
Definition displaypreferencesdto.cpp:213
QString sortBy() const
Gets or sets the sort by.
Definition displaypreferencesdto.cpp:185
void setPrimaryImageWidth(qint32 newPrimaryImageWidth)
Gets or sets the width of the primary image.
Definition displaypreferencesdto.cpp:225
bool showSidebar() const
Gets or sets a value indicating whether [show sidebar].
Definition displaypreferencesdto.cpp:259
bool m_showSidebar
Definition displaypreferencesdto.h:218
QString m_viewType
Definition displaypreferencesdto.h:207
bool m_showBackdrop
Definition displaypreferencesdto.h:215
bool rememberIndexing() const
Gets or sets a value indicating whether [remember indexing].
Definition displaypreferencesdto.cpp:211
void setCustomPrefs(QJsonObject newCustomPrefs)
Gets or sets the custom prefs.
Definition displaypreferencesdto.cpp:231
bool sortByNull() const
Definition displaypreferencesdto.cpp:190
QJsonObject toJson() const
Definition displaypreferencesdto.cpp:119
ScrollDirection scrollDirection() const
Definition displaypreferencesdto.cpp:235
void setFromJson(QJsonObject source)
Definition displaypreferencesdto.cpp:101
QString jellyfinId() const
Gets or sets the user id.
Definition displaypreferencesdto.cpp:159
DisplayPreferencesDto(bool rememberIndexing, qint32 primaryImageHeight, qint32 primaryImageWidth, QJsonObject customPrefs, ScrollDirection scrollDirection, bool showBackdrop, bool rememberSorting, SortOrder sortOrder, bool showSidebar)
Definition displaypreferencesdto.cpp:36
void setClientNull()
Definition displaypreferencesdto.cpp:274
static DisplayPreferencesDto fromJson(QJsonObject source)
Definition displaypreferencesdto.cpp:94
qint32 m_primaryImageHeight
Definition displaypreferencesdto.h:211
QString m_jellyfinId
Definition displaypreferencesdto.h:206
ScrollDirection m_scrollDirection
Definition displaypreferencesdto.h:214
void setJellyfinId(QString newJellyfinId)
Gets or sets the user id.
Definition displaypreferencesdto.cpp:161
bool jellyfinIdNull() const
Definition displaypreferencesdto.cpp:164
void setViewType(QString newViewType)
Gets or sets the type of the view.
Definition displaypreferencesdto.cpp:174
void setShowBackdrop(bool newShowBackdrop)
Gets or sets a value indicating whether to show backdrops on this item.
Definition displaypreferencesdto.cpp:243
bool m_rememberIndexing
Definition displaypreferencesdto.h:210
void setIndexBy(QString newIndexBy)
Gets or sets the index by.
Definition displaypreferencesdto.cpp:200
QString viewType() const
Gets or sets the type of the view.
Definition displaypreferencesdto.cpp:172
void setRememberSorting(bool newRememberSorting)
Gets or sets a value indicating whether [remember sorting].
Definition displaypreferencesdto.cpp:249
void setJellyfinIdNull()
Definition displaypreferencesdto.cpp:168
qint32 primaryImageWidth() const
Gets or sets the width of the primary image.
Definition displaypreferencesdto.cpp:223
SortOrder sortOrder() const
Definition displaypreferencesdto.cpp:253
bool m_rememberSorting
Definition displaypreferencesdto.h:216
QString m_indexBy
Definition displaypreferencesdto.h:209
bool indexByNull() const
Definition displaypreferencesdto.cpp:203
void setIndexByNull()
Definition displaypreferencesdto.cpp:207
bool rememberSorting() const
Gets or sets a value indicating whether [remember sorting].
Definition displaypreferencesdto.cpp:247
Contains auto-generated Data Transfer Objects for the Jellyfin HTTP API.
ScrollDirectionClass::Value ScrollDirection
Definition scrolldirection.h:59
SortOrderClass::Value SortOrder
Definition sortorder.h:59
Definition accessschedule.h:128
Jellyfin::DTO::DisplayPreferencesDto DisplayPreferencesDto
Definition displaypreferencesdto.h:231
AccessSchedule fromJsonValue(const QJsonValue &source, convertType< AccessSchedule >)
Definition accessschedule.cpp:133
QJsonValue toJsonValue(const AccessSchedule &source, convertType< AccessSchedule >)
Definition accessschedule.cpp:139
Definition jsonconvimpl.h:45