Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qgenericunixtheme_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
// Qt-Security score:significant reason:default
4
5
#
ifndef
QGENERICUNIXTHEME_H
6
#
define
QGENERICUNIXTHEME_H
7
8
//
9
// W A R N I N G
10
// -------------
11
//
12
// This file is not part of the Qt API. It exists purely as an
13
// implementation detail. This header file may change from version to
14
// version without notice, or even be removed.
15
//
16
// We mean it.
17
//
18
19
#
include
<
qpa
/
qplatformtheme
.
h
>
20
#
include
<
qpa
/
qplatformtheme_p
.
h
>
21
#
include
<
QtCore
/
QString
>
22
#
include
<
QtCore
/
QStringList
>
23
#
include
<
QtGui
/
QFont
>
24
#
include
<
QtCore
/
private
/
qglobal_p
.
h
>
25
26
QT_BEGIN_NAMESPACE
27
28
class
QGenericUnixTheme;
29
class
QGenericUnixThemePrivate
:
public
QPlatformThemePrivate
30
{
31
public
:
32
QGenericUnixThemePrivate
();
33
const
QFont
systemFont
;
34
QFont
fixedFont
;
35
};
36
37
class
Q_GUI_EXPORT
QGenericUnixTheme
:
public
QPlatformTheme
38
{
39
Q_DECLARE_PRIVATE(QGenericUnixTheme)
40
41
protected
:
42
QGenericUnixTheme(QGenericUnixThemePrivate *p);
43
44
public
:
45
QGenericUnixTheme();
46
47
const
QFont *font(Font type)
const
override;
48
QVariant themeHint(ThemeHint hint)
const
override;
49
50
#
if
QT_CONFIG
(
dbus
)
51
QPlatformMenuBar *createPlatformMenuBar()
const
override;
52
#
endif
53
#
if
QT_CONFIG
(
dbus
)
&&
QT_CONFIG
(
systemtrayicon
)
54
QPlatformSystemTrayIcon *createPlatformSystemTrayIcon()
const
override;
55
#
endif
56
57
static
const
char
*name;
58
59
// Default system font, corresponding to the value returned by 4.8 for
60
// XRender/FontConfig which we can now assume as default.
61
static
constexpr
char
defaultSystemFontNameC[] =
"Sans Serif"
;
62
static
constexpr
char
defaultFixedFontNameC[] =
"monospace"
;
63
enum
{ defaultSystemFontSize = 9 };
64
65
// Helpers
66
static
QStringList xdgIconThemePaths();
67
static
QPlatformTheme *createUnixTheme(
const
QString &name);
68
static
QStringList themeNames();
69
protected
:
70
static
QStringList iconFallbackPaths();
71
static
bool
isDBusGlobalMenuAvailable();
72
static
QString mouseCursorTheme();
73
static
QSize mouseCursorSize();
74
static
QList<QSize> availableXdgFileIconSizes();
75
76
#
if
QT_CONFIG
(
dbus
)
&&
QT_CONFIG
(
systemtrayicon
)
77
static
bool
shouldUseDBusTray();
78
#
endif
79
#
if
QT_CONFIG
(
mimetype
)
80
static
QIcon xdgFileIcon(
const
QFileInfo &fileInfo);
81
#
endif
82
};
83
84
QT_END_NAMESPACE
85
86
#
endif
// QGENERICUNIXTHEME_H
QGenericUnixThemePrivate
Definition
qgenericunixtheme_p.h:30
QGenericUnixThemePrivate::fixedFont
QFont fixedFont
Definition
qgenericunixtheme_p.h:34
QGenericUnixThemePrivate::systemFont
const QFont systemFont
Definition
qgenericunixtheme_p.h:33
QGenericUnixThemePrivate::QGenericUnixThemePrivate
QGenericUnixThemePrivate()
Definition
qgenericunixtheme.cpp:67
QGenericUnixTheme
Definition
qgenericunixtheme_p.h:38
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qtbase
src
gui
platform
unix
qgenericunixtheme_p.h
Generated on
for Qt by
1.18.0