Jellyfin Qt
QML Library for interacting with the Jellyfin multimedia server
Loading...
Searching...
No Matches
remoteimageinfo.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_REMOTEIMAGEINFO_H
31#define JELLYFIN_DTO_REMOTEIMAGEINFO_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:
55 );
56
57 RemoteImageInfo(const RemoteImageInfo &other);
58
62 void replaceData(RemoteImageInfo &other);
63
64 static RemoteImageInfo fromJson(QJsonObject source);
65 void setFromJson(QJsonObject source);
66 QJsonObject toJson() const;
67
68 // Properties
72 QString providerName() const;
76 void setProviderName(QString newProviderName);
77 bool providerNameNull() const;
79
83 QString url() const;
87 void setUrl(QString newUrl);
88 bool urlNull() const;
89 void setUrlNull();
90
94 QString thumbnailUrl() const;
98 void setThumbnailUrl(QString newThumbnailUrl);
99 bool thumbnailUrlNull() const;
100 void setThumbnailUrlNull();
101
105 std::optional<qint32> height() const;
109 void setHeight(std::optional<qint32> newHeight);
110 bool heightNull() const;
111 void setHeightNull();
112
116 std::optional<qint32> width() const;
120 void setWidth(std::optional<qint32> newWidth);
121 bool widthNull() const;
122 void setWidthNull();
123
127 std::optional<double> communityRating() const;
131 void setCommunityRating(std::optional<double> newCommunityRating);
132 bool communityRatingNull() const;
134
138 std::optional<qint32> voteCount() const;
142 void setVoteCount(std::optional<qint32> newVoteCount);
143 bool voteCountNull() const;
144 void setVoteCountNull();
145
149 QString language() const;
153 void setLanguage(QString newLanguage);
154 bool languageNull() const;
155 void setLanguageNull();
156
157
158 ImageType type() const;
159
160 void setType(ImageType newType);
161
162
163 RatingType ratingType() const;
164
165 void setRatingType(RatingType newRatingType);
166
167
168protected:
170 QString m_url;
172 std::optional<qint32> m_height = std::nullopt;
173 std::optional<qint32> m_width = std::nullopt;
174 std::optional<double> m_communityRating = std::nullopt;
175 std::optional<qint32> m_voteCount = std::nullopt;
176 QString m_language;
179
180private:
181 // Private constructor which generates an invalid object, for use withing RemoteImageInfo::fromJson();
183};
184
185
186} // NS DTO
187
188namespace Support {
189
191
192template <>
194
195template<>
197
198} // NS DTO
199} // NS Jellyfin
200
201#endif // JELLYFIN_DTO_REMOTEIMAGEINFO_H
Value
Definition imagetype.h:49
Value
Definition ratingtype.h:49
Definition remoteimageinfo.h:50
void setThumbnailUrlNull()
Definition remoteimageinfo.cpp:176
void setProviderName(QString newProviderName)
Gets or sets the name of the provider.
Definition remoteimageinfo.cpp:143
std::optional< double > m_communityRating
Definition remoteimageinfo.h:174
void setUrlNull()
Definition remoteimageinfo.cpp:163
ImageType type() const
Definition remoteimageinfo.cpp:245
QString m_url
Definition remoteimageinfo.h:170
void setCommunityRating(std::optional< double > newCommunityRating)
Gets or sets the community rating.
Definition remoteimageinfo.cpp:208
std::optional< qint32 > width() const
Gets or sets the width.
Definition remoteimageinfo.cpp:193
RatingType m_ratingType
Definition remoteimageinfo.h:178
void setUrl(QString newUrl)
Gets or sets the URL.
Definition remoteimageinfo.cpp:156
void setVoteCount(std::optional< qint32 > newVoteCount)
Gets or sets the vote count.
Definition remoteimageinfo.cpp:221
RatingType ratingType() const
Definition remoteimageinfo.cpp:251
QJsonObject toJson() const
Definition remoteimageinfo.cpp:93
ImageType m_type
Definition remoteimageinfo.h:177
void setHeight(std::optional< qint32 > newHeight)
Gets or sets the height.
Definition remoteimageinfo.cpp:182
void setVoteCountNull()
Definition remoteimageinfo.cpp:228
static RemoteImageInfo fromJson(QJsonObject source)
Definition remoteimageinfo.cpp:72
void setProviderNameNull()
Definition remoteimageinfo.cpp:150
std::optional< qint32 > height() const
Gets or sets the height.
Definition remoteimageinfo.cpp:180
void replaceData(RemoteImageInfo &other)
Definition remoteimageinfo.cpp:59
bool heightNull() const
Definition remoteimageinfo.cpp:185
void setFromJson(QJsonObject source)
Definition remoteimageinfo.cpp:79
void setLanguage(QString newLanguage)
Gets or sets the language.
Definition remoteimageinfo.cpp:234
QString m_thumbnailUrl
Definition remoteimageinfo.h:171
QString url() const
Gets or sets the URL.
Definition remoteimageinfo.cpp:154
std::optional< qint32 > m_voteCount
Definition remoteimageinfo.h:175
bool thumbnailUrlNull() const
Definition remoteimageinfo.cpp:172
bool voteCountNull() const
Definition remoteimageinfo.cpp:224
void setLanguageNull()
Definition remoteimageinfo.cpp:241
QString m_providerName
Definition remoteimageinfo.h:169
QString thumbnailUrl() const
Gets a url used for previewing a smaller version.
Definition remoteimageinfo.cpp:167
void setHeightNull()
Definition remoteimageinfo.cpp:189
std::optional< qint32 > m_height
Definition remoteimageinfo.h:172
void setRatingType(RatingType newRatingType)
Definition remoteimageinfo.cpp:253
std::optional< double > communityRating() const
Gets or sets the community rating.
Definition remoteimageinfo.cpp:206
void setCommunityRatingNull()
Definition remoteimageinfo.cpp:215
std::optional< qint32 > m_width
Definition remoteimageinfo.h:173
QString m_language
Definition remoteimageinfo.h:176
bool languageNull() const
Definition remoteimageinfo.cpp:237
bool communityRatingNull() const
Definition remoteimageinfo.cpp:211
QString language() const
Gets or sets the language.
Definition remoteimageinfo.cpp:232
bool urlNull() const
Definition remoteimageinfo.cpp:159
bool providerNameNull() const
Definition remoteimageinfo.cpp:146
std::optional< qint32 > voteCount() const
Gets or sets the vote count.
Definition remoteimageinfo.cpp:219
void setWidth(std::optional< qint32 > newWidth)
Gets or sets the width.
Definition remoteimageinfo.cpp:195
QString providerName() const
Gets or sets the name of the provider.
Definition remoteimageinfo.cpp:141
void setThumbnailUrl(QString newThumbnailUrl)
Gets a url used for previewing a smaller version.
Definition remoteimageinfo.cpp:169
void setWidthNull()
Definition remoteimageinfo.cpp:202
bool widthNull() const
Definition remoteimageinfo.cpp:198
void setType(ImageType newType)
Definition remoteimageinfo.cpp:247
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