Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qgtk3json.cpp File Reference

(8033a313ff28ce2a8e69bd2f6e2d946d291acf5e)

#include "qgtk3json_p.h"
#include <QtCore/QFile>
#include <QMetaEnum>
Include dependency graph for qgtk3json.cpp:

Go to the source code of this file.

Macros

#define CONVERT(type, key, def)
#define GETSTR(obj, key)
#define GETINT(obj, key, var)

Functions

QLatin1String fromColor (const QColor &color)
QColor toColor (const QStringView &color)

Macro Definition Documentation

◆ CONVERT

#define CONVERT ( type,
key,
def )
Value:
bool ok;\
const int intVal = QMetaEnum::fromType<type>().keyToValue(key.toLatin1().constData(), &ok);\
return ok ? static_cast<type>(intVal) : type::def
static QMetaEnum fromType()
int keyToValue(const char *key, bool *ok=nullptr) const
Returns the integer value of the given enumeration key, or -1 if key is not defined.
static bool ok(QGradientStop stop)
Definition qbrush.cpp:1681
GLuint64 key
GLenum type

Definition at line 62 of file qgtk3json.cpp.

◆ GETINT

#define GETINT ( obj,
key,
var )
Value:
if (!obj[key].isDouble()) {\
qCInfo(lcQGtk3Interface) << key << "type mismatch" << value\
<< "is not an integer!"\
<< "(Palette" << paletteName << "), Brush" << colorRoleName;\
return false;\
}\
const int var = obj[key].toInt()
EGLOutputLayerEXT EGLint EGLAttrib value
[3]
#define GETSTR(obj, key)
GLhandleARB obj
[0]

◆ GETSTR

#define GETSTR ( obj,
key )
Value:
if (!obj.contains(key)) {\
qCInfo(lcQGtk3Interface) << key << "missing for palette" << paletteName\
<< ", Brush" << colorRoleName;\
return false;\
}\
value = obj[key].toString()

Function Documentation

◆ fromColor()

QLatin1String fromColor ( const QColor & color)

Definition at line 32 of file qgtk3json.cpp.

◆ toColor()

QColor toColor ( const QStringView & color)

Definition at line 85 of file qgtk3json.cpp.