Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qgtk3json.cpp File Reference
#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
GLuint64 key
GLenum type

Definition at line 61 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()
int toInt(bool *ok=nullptr) const
Returns the variant as an int if the variant has userType() \l QMetaType::Int, \l QMetaType::Bool,...
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
#define GETSTR(obj, key)
GLhandleARB obj
[2]

◆ 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 31 of file qgtk3json.cpp.

References QColor::HexRgb.

Referenced by QSvgPaintEngine::saveGradientStops().

+ Here is the caller graph for this function:

◆ toColor()

QColor toColor ( const QStringView color)

Definition at line 84 of file qgtk3json.cpp.

References QColor::fromString().

Referenced by QSvgPaintEngine::saveGradientStops().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: