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
qgenericunixthemes.cpp File Reference

(eee575595b11f4c2621a71ad89fcfde3b204e59f)

#include "qgenericunixthemes_p.h"
#include <QPalette>
#include <QFont>
#include <QGuiApplication>
#include <QDir>
#include <QFileInfo>
#include <QFile>
#include <QDebug>
#include <QHash>
#include <QLoggingCategory>
#include <QVariant>
#include <QStandardPaths>
#include <QStringList>
#include <qpa/qplatformfontdatabase.h>
#include <qpa/qplatformintegration.h>
#include <qpa/qplatformservices.h>
#include <qpa/qplatformdialoghelper.h>
#include <qpa/qplatformtheme_p.h>
#include <private/qguiapplication_p.h>
#include <QDBusConnectionInterface>
#include <private/qdbusplatformmenu_p.h>
#include <private/qdbusmenubar_p.h>
#include <private/qflatmap_p.h>
#include <QJsonDocument>
#include <QJsonArray>
#include <QJsonObject>
#include <QJsonValue>
#include <QJsonParseError>
#include <private/qdbustrayicon_p.h>
#include <algorithm>
#include "qgenericunixthemes.moc"
+ Include dependency graph for qgenericunixthemes.cpp:

Go to the source code of this file.

Classes

class  QGenericUnixThemeDBusListener
 
class  QGenericUnixThemePrivate
 
class  QGnomeThemePrivate
 

Macros

#define LOG   service << path << interface << signal;
 
#define CHECK(cond, warning)
 
#define PARSE(var, enumeration, string)
 

Enumerations

enum  { defaultSystemFontSize = 9 }
 

Functions

static bool isDBusTrayAvailable ()
 
static QString mouseCursorTheme ()
 
static QSize mouseCursorSize ()
 
static bool checkDBusGlobalMenuAvailable ()
 
static bool isDBusGlobalMenuAvailable ()
 
static QList< QSizeavailableXdgFileIconSizes ()
 

Variables

static const char defaultSystemFontNameC [] = "Sans Serif"
 
static const char defaultFixedFontNameC [] = "monospace"
 

Macro Definition Documentation

◆ CHECK

#define CHECK ( cond,
warning )
Value:
if (!cond) {\
qCWarning(lcQpaThemeDBus) << fileName << warning << "Falling back to default.";\
return;\
}
QDebug warning(QAnyStringView fileName, int lineNumber)

◆ LOG

#define LOG   service << path << interface << signal;

◆ PARSE

#define PARSE ( var,
enumeration,
string )
Value:
enumeration var;\
{\
bool success;\
const int val = QMetaEnum::fromType<enumeration>().keyToValue(string.toLatin1(), &success);\
CHECK(success, "Parse Error: Invalid value" << string << "for" << #var);\
var = static_cast<enumeration>(val);\
}
GLuint GLfloat * val

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
defaultSystemFontSize 

Definition at line 78 of file qgenericunixthemes.cpp.

Function Documentation

◆ availableXdgFileIconSizes()

static QList< QSize > availableXdgFileIconSizes ( )
static

Definition at line 516 of file qgenericunixthemes.cpp.

References QIcon::fromTheme(), and QStringLiteral.

Referenced by QGnomeTheme::themeHint().

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

◆ checkDBusGlobalMenuAvailable()

static bool checkDBusGlobalMenuAvailable ( )
static

Definition at line 110 of file qgenericunixthemes.cpp.

References connection, QStringLiteral, and QDBusConnection::sessionBus().

Referenced by isDBusGlobalMenuAvailable().

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

◆ isDBusGlobalMenuAvailable()

static bool isDBusGlobalMenuAvailable ( )
static

Definition at line 119 of file qgenericunixthemes.cpp.

References checkDBusGlobalMenuAvailable().

Referenced by QGenericUnixTheme::createPlatformMenuBar(), and QGnomeTheme::createPlatformMenuBar().

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

◆ isDBusTrayAvailable()

static bool isDBusTrayAvailable ( )
static

Definition at line 81 of file qgenericunixthemes.cpp.

References QDBusMenuConnection::isWatcherRegistered(), and qCDebug.

Referenced by QGenericUnixTheme::createPlatformSystemTrayIcon(), and QGnomeTheme::createPlatformSystemTrayIcon().

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

◆ mouseCursorSize()

static QSize mouseCursorSize ( )
static

Definition at line 101 of file qgenericunixthemes.cpp.

References qEnvironmentVariableIntValue().

Referenced by QGenericUnixTheme::themeHint(), and QGnomeTheme::themeHint().

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

◆ mouseCursorTheme()

static QString mouseCursorTheme ( )
static

Definition at line 95 of file qgenericunixthemes.cpp.

References qEnvironmentVariable(), and themeName().

Referenced by QGenericUnixTheme::themeHint(), and QGnomeTheme::themeHint().

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

Variable Documentation

◆ defaultFixedFontNameC

const char defaultFixedFontNameC[] = "monospace"
static

Definition at line 77 of file qgenericunixthemes.cpp.

Referenced by QGnomeThemePrivate::configureFonts().

◆ defaultSystemFontNameC

const char defaultSystemFontNameC[] = "Sans Serif"
static

Definition at line 76 of file qgenericunixthemes.cpp.

Referenced by QGnomeTheme::gtkFontName().