ImagingTools Core SDK
CLicense.h
1// SPDX-License-Identifier: LGPL-2.1-or-later OR GPL-2.0-or-later OR GPL-3.0-or-later OR LicenseRef-ImtCore-Commercial
2#pragma once
3
4
5// Qt includes
6#include <QtCore/QJsonObject>
7#include <QtCore/QJsonArray>
8#include <QtCore/QJsonValue>
9#include <QtCore/QString>
10
11
12namespace imtoas
13{
14
15
16class CLicense
17{
18public:
19 [[nodiscard]] QString GetName() const;
20 void SetName(const QString& name);
21
22 [[nodiscard]] QString GetIdentifier() const;
23 void SetIdentifier(const QString& identifier);
24
25 [[nodiscard]] QString GetUrl() const;
26 void SetUrl(const QString& url);
27
28 static bool ReadFromJsonObject(CLicense& object, const QJsonObject& jsonObject, const QJsonObject& globalObject);
29
30 bool operator==(const CLicense& other) const;
31 bool operator!=(const CLicense& other) const { return !(operator==(other)); }
32
33private:
34 QString m_name;
35 QString m_identifier;
36 QString m_url;
37};
38
39
40} // namespace imtoas
41
42
43Q_DECLARE_METATYPE(imtoas::CLicense);
44
45