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_p.h
Go to the documentation of this file.
1// Copyright (C) 2020 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QGENERICUNIXTHEMES_H
5#define QGENERICUNIXTHEMES_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <qpa/qplatformtheme.h>
19#include <QtCore/QString>
20#include <QtCore/QStringList>
21#include <QtGui/QFont>
22#include <QtCore/private/qglobal_p.h>
23
25
37
39
40class Q_GUI_EXPORT QGenericUnixTheme : public QPlatformTheme
41{
42 Q_DECLARE_PRIVATE(QGenericUnixTheme)
43public:
45
46 static QPlatformTheme *createUnixTheme(const QString &name);
47 static QStringList themeNames();
48
49 const QFont *font(Font type) const override;
50 QVariant themeHint(ThemeHint hint) const override;
51
52 static QStringList xdgIconThemePaths();
53 static QStringList iconFallbackPaths();
54#ifndef QT_NO_DBUS
55 QPlatformMenuBar *createPlatformMenuBar() const override;
56#endif
57#if !defined(QT_NO_DBUS) && !defined(QT_NO_SYSTEMTRAYICON)
58 QPlatformSystemTrayIcon *createPlatformSystemTrayIcon() const override;
59#endif
60
61 static const char *name;
62};
63
64#if QT_CONFIG(settings)
65class QKdeThemePrivate;
66
67class QKdeTheme : public QPlatformTheme
68{
69 Q_DECLARE_PRIVATE(QKdeTheme)
70public:
71 QKdeTheme(const QStringList& kdeDirs, int kdeVersion);
72
73 static QPlatformTheme *createKdeTheme();
74 QVariant themeHint(ThemeHint hint) const override;
75
76 QIcon fileIcon(const QFileInfo &fileInfo,
77 QPlatformTheme::IconOptions iconOptions = { }) const override;
78
79 const QPalette *palette(Palette type = SystemPalette) const override;
80 Qt::ColorScheme colorScheme() const override;
81
82 const QFont *font(Font type) const override;
83#ifndef QT_NO_DBUS
84 QPlatformMenuBar *createPlatformMenuBar() const override;
85#endif
86#if !defined(QT_NO_DBUS) && !defined(QT_NO_SYSTEMTRAYICON)
87 QPlatformSystemTrayIcon *createPlatformSystemTrayIcon() const override;
88#endif
89
90 static const char *name;
91};
92#endif // settings
93
95
96class Q_GUI_EXPORT QGnomeTheme : public QPlatformTheme
97{
98 Q_DECLARE_PRIVATE(QGnomeTheme)
99public:
100 QGnomeTheme();
101 QVariant themeHint(ThemeHint hint) const override;
102 QIcon fileIcon(const QFileInfo &fileInfo,
103 QPlatformTheme::IconOptions = { }) const override;
104 const QFont *font(Font type) const override;
105 QString standardButtonText(int button) const override;
106
107 virtual QString gtkFontName() const;
108#ifndef QT_NO_DBUS
109 QPlatformMenuBar *createPlatformMenuBar() const override;
110 Qt::ColorScheme colorScheme() const override;
111#endif
112#if !defined(QT_NO_DBUS) && !defined(QT_NO_SYSTEMTRAYICON)
113 QPlatformSystemTrayIcon *createPlatformSystemTrayIcon() const override;
114#endif
115
116 static const char *name;
117};
118
120
122
123#endif // QGENERICUNIXTHEMES_H
\reentrant
Definition qfont.h:22
static const char * name
QGnomeTheme is a theme implementation for the Gnome desktop.
static const char * name
The QIcon class provides scalable icons in different modes and states.
Definition qicon.h:20
The QPalette class contains color groups for each widget state.
Definition qpalette.h:19
The QPlatformTheme class allows customizing the UI based on themes.
ThemeHint
This enum describes the available theme hints.
\inmodule QtCore
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\inmodule QtCore
Definition qvariant.h:65
QPalette * palettes[QPlatformTheme::NPalettes]
QFont * fonts[QPlatformTheme::NFonts]
QPushButton * button
[2]
Combined button and popup list for selecting options.
ColorScheme
Definition qnamespace.h:50
QPlatformTheme * qt_createUnixTheme()
GLenum type
GLuint name
static QT_BEGIN_NAMESPACE QVariant hint(QPlatformIntegration::StyleHint h)
QT_BEGIN_NAMESPACE constexpr const wchar_t * themeNames[]