Jellyfin Qt
QML Library for interacting with the Jellyfin multimedia server
Loading...
Searching...
No Matches
imageinfo.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_IMAGEINFO_H
31#define JELLYFIN_DTO_IMAGEINFO_H
32
33#include <QJsonObject>
34#include <QJsonValue>
35#include <QString>
36#include <optional>
37
40
41namespace Jellyfin {
42// Forward declaration
43class ApiClient;
44}
45namespace Jellyfin {
46namespace DTO {
47
48
49class ImageInfo {
50public:
51 ImageInfo(
53 qint64 size
54 );
55
56 ImageInfo(const ImageInfo &other);
57
61 void replaceData(ImageInfo &other);
62
63 static ImageInfo fromJson(QJsonObject source);
64 void setFromJson(QJsonObject source);
65 QJsonObject toJson() const;
66
67 // Properties
68
69 ImageType imageType() const;
70
71 void setImageType(ImageType newImageType);
72
76 std::optional<qint32> imageIndex() const;
80 void setImageIndex(std::optional<qint32> newImageIndex);
81 bool imageIndexNull() const;
82 void setImageIndexNull();
83
87 QString imageTag() const;
91 void setImageTag(QString newImageTag);
92 bool imageTagNull() const;
93 void setImageTagNull();
94
98 QString path() const;
102 void setPath(QString newPath);
103 bool pathNull() const;
104 void setPathNull();
105
109 QString blurHash() const;
113 void setBlurHash(QString newBlurHash);
114 bool blurHashNull() const;
115 void setBlurHashNull();
116
120 std::optional<qint32> height() const;
124 void setHeight(std::optional<qint32> newHeight);
125 bool heightNull() const;
126 void setHeightNull();
127
131 std::optional<qint32> width() const;
135 void setWidth(std::optional<qint32> newWidth);
136 bool widthNull() const;
137 void setWidthNull();
138
142 qint64 size() const;
146 void setSize(qint64 newSize);
147
148
149protected:
151 std::optional<qint32> m_imageIndex = std::nullopt;
152 QString m_imageTag;
153 QString m_path;
154 QString m_blurHash;
155 std::optional<qint32> m_height = std::nullopt;
156 std::optional<qint32> m_width = std::nullopt;
157 qint64 m_size;
158
159private:
160 // Private constructor which generates an invalid object, for use withing ImageInfo::fromJson();
161 ImageInfo();
162};
163
164
165} // NS DTO
166
167namespace Support {
168
170
171template <>
172ImageInfo fromJsonValue(const QJsonValue &source, convertType<ImageInfo>);
173
174template<>
175QJsonValue toJsonValue(const ImageInfo &source, convertType<ImageInfo>);
176
177} // NS DTO
178} // NS Jellyfin
179
180#endif // JELLYFIN_DTO_IMAGEINFO_H
Definition imageinfo.h:49
QString m_blurHash
Definition imageinfo.h:154
std::optional< qint32 > m_width
Definition imageinfo.h:156
qint64 m_size
Definition imageinfo.h:157
void setWidthNull()
Definition imageinfo.cpp:205
void setImageTagNull()
Definition imageinfo.cpp:153
std::optional< qint32 > m_imageIndex
Definition imageinfo.h:151
void setBlurHashNull()
Definition imageinfo.cpp:179
void setHeightNull()
Definition imageinfo.cpp:192
std::optional< qint32 > m_height
Definition imageinfo.h:155
void setImageIndex(std::optional< qint32 > newImageIndex)
Gets or sets the index of the image.
Definition imageinfo.cpp:133
ImageType imageType() const
Definition imageinfo.cpp:125
QString m_path
Definition imageinfo.h:153
ImageType m_imageType
Definition imageinfo.h:150
QJsonObject toJson() const
Definition imageinfo.cpp:87
void setWidth(std::optional< qint32 > newWidth)
Gets or sets the width.
Definition imageinfo.cpp:198
void setImageIndexNull()
Definition imageinfo.cpp:140
void setFromJson(QJsonObject source)
Definition imageinfo.cpp:75
void setPathNull()
Definition imageinfo.cpp:166
bool widthNull() const
Definition imageinfo.cpp:201
bool imageTagNull() const
Definition imageinfo.cpp:149
bool imageIndexNull() const
Definition imageinfo.cpp:136
qint64 size() const
Gets or sets the size.
Definition imageinfo.cpp:209
void replaceData(ImageInfo &other)
Definition imageinfo.cpp:57
QString blurHash() const
Gets or sets the blurhash.
Definition imageinfo.cpp:170
QString path() const
Gets or sets the path.
Definition imageinfo.cpp:157
bool blurHashNull() const
Definition imageinfo.cpp:175
QString imageTag() const
Gets or sets the image tag.
Definition imageinfo.cpp:144
bool heightNull() const
Definition imageinfo.cpp:188
void setImageType(ImageType newImageType)
Definition imageinfo.cpp:127
void setImageTag(QString newImageTag)
Gets or sets the image tag.
Definition imageinfo.cpp:146
void setHeight(std::optional< qint32 > newHeight)
Gets or sets the height.
Definition imageinfo.cpp:185
std::optional< qint32 > imageIndex() const
Gets or sets the index of the image.
Definition imageinfo.cpp:131
QString m_imageTag
Definition imageinfo.h:152
std::optional< qint32 > height() const
Gets or sets the height.
Definition imageinfo.cpp:183
bool pathNull() const
Definition imageinfo.cpp:162
void setPath(QString newPath)
Gets or sets the path.
Definition imageinfo.cpp:159
static ImageInfo fromJson(QJsonObject source)
Definition imageinfo.cpp:68
std::optional< qint32 > width() const
Gets or sets the width.
Definition imageinfo.cpp:196
void setBlurHash(QString newBlurHash)
Gets or sets the blurhash.
Definition imageinfo.cpp:172
void setSize(qint64 newSize)
Gets or sets the size.
Definition imageinfo.cpp:211
Value
Definition imagetype.h:49
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