Maki
Formally verfied low-code orchestration
Toggle main menu visibility
Loading...
Searching...
No Matches
json.h
1
#pragma once
2
3
#include <QJsonArray>
4
#include <QJsonObject>
5
#include <QPixmap>
6
#include <QPointF>
7
#include <QSizeF>
8
9
#include "logging.h"
10
#include "result.h"
11
15
class
JSON
:
public
QJsonObject
16
{
17
public
:
21
JSON
();
22
28
JSON
(
const
QJsonObject& other);
29
36
static
Result<JSON>
fromFile
(
const
char
* filename);
37
44
static
Result<JSON>
fromFile
(
const
QString& filename);
45
51
QString
print
()
const
;
52
60
static
QString
fromArray
(
const
QVariantList& value,
char
separator);
61
69
static
QJsonArray
toArray
(
const
QJsonValue& value,
char
separator);
70
77
static
QJsonObject
fromPointF
(
const
QPointF& value);
78
85
static
QPointF
toPointF
(
const
QJsonObject& value);
86
93
static
QJsonObject
fromSizeF
(
const
QSizeF& value);
94
101
static
QSizeF
toSizeF
(
const
QJsonObject& value);
102
109
static
QJsonObject
fromPixmap
(
const
QPixmap& value);
110
117
static
QPixmap
toPixmap
(
const
QJsonObject& value);
118
};
JSON::toPointF
static QPointF toPointF(const QJsonObject &value)
Converts a QJsonObject to a QPointF.
Definition
json.cpp:79
JSON::toArray
static QJsonArray toArray(const QJsonValue &value, char separator)
Creates a JSON array from a QVariantList.
Definition
json.cpp:61
JSON::fromPixmap
static QJsonObject fromPixmap(const QPixmap &value)
Creates a JSON object from a QPixmap.
Definition
json.cpp:98
JSON::toSizeF
static QSizeF toSizeF(const QJsonObject &value)
Converts a QJsonObject to a QSizeF.
Definition
json.cpp:93
JSON::fromPointF
static QJsonObject fromPointF(const QPointF &value)
Creates a JSON object from a QPointF.
Definition
json.cpp:70
JSON::toPixmap
static QPixmap toPixmap(const QJsonObject &value)
Converts a QJsonObject to a QPixmap.
Definition
json.cpp:111
JSON::fromFile
static Result< JSON > fromFile(const char *filename)
Creates a JSON object from a file.
Definition
json.cpp:22
JSON::fromArray
static QString fromArray(const QVariantList &value, char separator)
Creates a JSON array from a QVariantList.
Definition
json.cpp:49
JSON::JSON
JSON()
Constructs an empty JSON object.
Definition
json.cpp:12
JSON::print
QString print() const
Converts the JSON object to a string representation.
Definition
json.cpp:44
JSON::fromSizeF
static QJsonObject fromSizeF(const QSizeF &value)
Creates a JSON object from a QSizeF.
Definition
json.cpp:84
Generated for
MAKI
· © 2026 with
Doxygen
1.9.8
GitHub
Research