Jellyfin Qt
QML Library for interacting with the Jellyfin multimedia server
Loading...
Searching...
No Matches
imageoption.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_IMAGEOPTION_H
31#define JELLYFIN_DTO_IMAGEOPTION_H
32
33#include <QJsonObject>
34#include <QJsonValue>
35#include <optional>
36
39
40namespace Jellyfin {
41// Forward declaration
42class ApiClient;
43}
44namespace Jellyfin {
45namespace DTO {
46
47
49public:
52 qint32 limit,
53 qint32 minWidth
54 );
55
56 ImageOption(const ImageOption &other);
57
61 void replaceData(ImageOption &other);
62
63 static ImageOption fromJson(QJsonObject source);
64 void setFromJson(QJsonObject source);
65 QJsonObject toJson() const;
66
67 // Properties
68
69 ImageType type() const;
70
71 void setType(ImageType newType);
72
76 qint32 limit() const;
80 void setLimit(qint32 newLimit);
81
85 qint32 minWidth() const;
89 void setMinWidth(qint32 newMinWidth);
90
91
92protected:
94 qint32 m_limit;
95 qint32 m_minWidth;
96
97private:
98 // Private constructor which generates an invalid object, for use withing ImageOption::fromJson();
100};
101
102
103} // NS DTO
104
105namespace Support {
106
108
109template <>
110ImageOption fromJsonValue(const QJsonValue &source, convertType<ImageOption>);
111
112template<>
113QJsonValue toJsonValue(const ImageOption &source, convertType<ImageOption>);
114
115} // NS DTO
116} // NS Jellyfin
117
118#endif // JELLYFIN_DTO_IMAGEOPTION_H
Definition imageoption.h:48
void setFromJson(QJsonObject source)
Definition imageoption.cpp:67
qint32 m_minWidth
Definition imageoption.h:95
QJsonObject toJson() const
Definition imageoption.cpp:74
qint32 minWidth() const
Gets or sets the minimum width.
Definition imageoption.cpp:95
qint32 m_limit
Definition imageoption.h:94
ImageType m_type
Definition imageoption.h:93
void setLimit(qint32 newLimit)
Gets or sets the limit.
Definition imageoption.cpp:91
void setType(ImageType newType)
Definition imageoption.cpp:85
void replaceData(ImageOption &other)
Definition imageoption.cpp:54
ImageType type() const
Definition imageoption.cpp:83
static ImageOption fromJson(QJsonObject source)
Definition imageoption.cpp:60
qint32 limit() const
Gets or sets the limit.
Definition imageoption.cpp:89
void setMinWidth(qint32 newMinWidth)
Gets or sets the minimum width.
Definition imageoption.cpp:97
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