Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qgtk3interface.cpp File Reference

(277d77029d7fe8f46c6ee101869dcff389426cb1)

#include "qgtk3interface_p.h"
#include "qgtk3storage_p.h"
#include <QtCore/QMetaEnum>
#include <QtCore/QFileInfo>
#include <QtGui/QFontDatabase>
+ Include dependency graph for qgtk3interface.cpp:

Go to the source code of this file.

Macros

#define CASE(x)
 
#define CONVERT
 
#define CASE(x)   case GTK_STATE_FLAG_ ##x: return QLatin1String(#x)
 
#define SAVE(src, state, prop, def)    {ColorKey({QGtkColorSource::src, GTK_STATE_FLAG_ ##state}), ColorValue({#prop ##_L1, QGtkColorDefault::def})}
 
#define CASE(Type)    case QGtkWidget::Type: return Type ##_new();
 
#define CASEN(Type)    case QGtkWidget::Type: return Type ##_new(nullptr);
 
#define CASE(def, call)
 
#define CASE(src, def)
 

Functions

QT_BEGIN_NAMESPACE Q_LOGGING_CATEGORY (lcQGtk3Interface, "qt.qpa.gtk")
 

Variables

static QGtk3Storagem_storage = nullptr
 

Macro Definition Documentation

◆ CASE [1/5]

#define CASE ( def,
call )
Value:
case QGtkColorDefault::def:\
gtk_style_context_get_ ##call(con, state, &color);\
break;
else opt state
[0]
GLuint color
[2]

◆ CASE [2/5]

#define CASE ( src,
def )
Value:
case QGtkColorSource::src: {\
const ColorKey key = ColorKey({QGtkColorSource::src, state});\
if (gtkColorMap.contains(key)) {\
const ColorValue val = gtkColorMap.value(key);\
if (!gtk_style_context_lookup_color(con, val.propertyName.toUtf8().constData(), &col)) {\
col = genericColor(con, state, val.genericSource);\
qCDebug(lcQGtk3Interface) << "Property name" << val.propertyName << "not found.\n"\
<< "Falling back to " << val.genericSource;\
}\
} else {\
col = genericColor(con, state, QGtkColorDefault::def);\
qCDebug(lcQGtk3Interface) << "No color source found for" << QGtkColorSource::src\
<< fromGtkState(state) << "\n Falling back to"\
<< QGtkColorDefault::def;\
}\
}\
break;
GLuint64 key
GLuint GLfloat * val

◆ CASE [3/5]

#define CASE ( Type)     case QGtkWidget::Type: return Type ##_new();

◆ CASE [4/5]

#define CASE ( x)
Value:
if (QLatin1String(QByteArray(state.toLatin1())) == #x ##_L1) \
return GTK_STATE_FLAG_ ##x
typedef QByteArray(EGLAPIENTRYP PFNQGSGETDISPLAYSPROC)()
GLint GLint GLint GLint GLint x
[0]
QLatin1StringView QLatin1String
Definition qstringfwd.h:31

◆ CASE [5/5]

#define CASE ( x)    case GTK_STATE_FLAG_ ##x: return QLatin1String(#x)

◆ CASEN

#define CASEN ( Type)     case QGtkWidget::Type: return Type ##_new(nullptr);

◆ CONVERT

#define CONVERT
Value:
CASE(NORMAL);\
CASE(ACTIVE);\
CASE(PRELIGHT);\
CASE(SELECTED);\
CASE(INSENSITIVE);\
CASE(INCONSISTENT);\
CASE(FOCUSED);\
CASE(BACKDROP);\
CASE(DIR_LTR);\
CASE(DIR_RTL);\
CASE(LINK);\
CASE(VISITED);\
CASE(CHECKED);\
CASE(DROP_ACTIVE)
#define CASE(x)

◆ SAVE

#define SAVE ( src,
state,
prop,
def )    {ColorKey({QGtkColorSource::src, GTK_STATE_FLAG_ ##state}), ColorValue({#prop ##_L1, QGtkColorDefault::def})}

Function Documentation

◆ Q_LOGGING_CATEGORY()

QT_BEGIN_NAMESPACE Q_LOGGING_CATEGORY ( lcQGtk3Interface ,
"qt.qpa.gtk"  )

Variable Documentation

◆ m_storage