Jellyfin Qt
QML Library for interacting with the Jellyfin multimedia server
Loading...
Searching...
No Matches
fontfile.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_FONTFILE_H
31#define JELLYFIN_DTO_FONTFILE_H
32
33#include <QDateTime>
34#include <QJsonObject>
35#include <QJsonValue>
36#include <QString>
37#include <optional>
38
40
41namespace Jellyfin {
42// Forward declaration
43class ApiClient;
44}
45namespace Jellyfin {
46namespace DTO {
47
48
49class FontFile {
50public:
51 FontFile(
52 qint64 size,
53 QDateTime dateCreated,
54 QDateTime dateModified
55 );
56
57 FontFile(const FontFile &other);
58
62 void replaceData(FontFile &other);
63
64 static FontFile fromJson(QJsonObject source);
65 void setFromJson(QJsonObject source);
66 QJsonObject toJson() const;
67
68 // Properties
72 QString name() const;
76 void setName(QString newName);
77 bool nameNull() const;
78 void setNameNull();
79
83 qint64 size() const;
87 void setSize(qint64 newSize);
88
92 QDateTime dateCreated() const;
96 void setDateCreated(QDateTime newDateCreated);
97
101 QDateTime dateModified() const;
105 void setDateModified(QDateTime newDateModified);
106
107
108protected:
109 QString m_name;
110 qint64 m_size;
111 QDateTime m_dateCreated;
112 QDateTime m_dateModified;
113
114private:
115 // Private constructor which generates an invalid object, for use withing FontFile::fromJson();
116 FontFile();
117};
118
119
120} // NS DTO
121
122namespace Support {
123
125
126template <>
127FontFile fromJsonValue(const QJsonValue &source, convertType<FontFile>);
128
129template<>
130QJsonValue toJsonValue(const FontFile &source, convertType<FontFile>);
131
132} // NS DTO
133} // NS Jellyfin
134
135#endif // JELLYFIN_DTO_FONTFILE_H
Definition fontfile.h:49
QString name() const
Gets or sets the name.
Definition fontfile.cpp:91
qint64 m_size
Definition fontfile.h:110
QDateTime dateModified() const
Gets or sets the date modified.
Definition fontfile.cpp:116
QDateTime dateCreated() const
Gets or sets the date created.
Definition fontfile.cpp:110
bool nameNull() const
Definition fontfile.cpp:96
static FontFile fromJson(QJsonObject source)
Definition fontfile.cpp:62
void replaceData(FontFile &other)
Definition fontfile.cpp:55
void setDateModified(QDateTime newDateModified)
Gets or sets the date modified.
Definition fontfile.cpp:118
void setName(QString newName)
Gets or sets the name.
Definition fontfile.cpp:93
QDateTime m_dateModified
Definition fontfile.h:112
QString m_name
Definition fontfile.h:109
void setSize(qint64 newSize)
Gets or sets the size.
Definition fontfile.cpp:106
qint64 size() const
Gets or sets the size.
Definition fontfile.cpp:104
QJsonObject toJson() const
Definition fontfile.cpp:77
void setNameNull()
Definition fontfile.cpp:100
QDateTime m_dateCreated
Definition fontfile.h:111
void setDateCreated(QDateTime newDateCreated)
Gets or sets the date created.
Definition fontfile.cpp:112
void setFromJson(QJsonObject source)
Definition fontfile.cpp:69
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