Qt 6.x
The Qt SDK
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
qquicktheme_p.h
Go to the documentation of this file.
1// Copyright (C) 2017 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 QQUICKTHEME_P_H
5#define QQUICKTHEME_P_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 <QtQuickTemplates2/private/qtquicktemplates2global_p.h>
19#include <QtCore/qscopedpointer.h>
20#include <QtGui/qfont.h>
21#include <QtGui/qpalette.h>
22
24
26
27class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickTheme
28{
29public:
32
33 static QQuickTheme *instance();
34
35 enum Scope {
54 Tumbler
55 };
56
57 static QFont font(Scope scope);
58 static QPalette palette(Scope scope);
59
60 void setFont(Scope scope, const QFont &font);
61 void setPalette(Scope scope, const QPalette &palette);
62
63 void setUsePlatformPalette(const bool enable) { preferPlatformTheme = enable; }
64 bool usePlatformPalette() { return preferPlatformTheme; }
65
66private:
67 Q_DISABLE_COPY(QQuickTheme)
68 Q_DECLARE_PRIVATE(QQuickTheme)
70 bool preferPlatformTheme = false;
71};
72
74
75#endif // QQUICKTHEME_P_H
\reentrant
Definition qfont.h:20
The QPalette class contains color groups for each widget state.
Definition qpalette.h:19
void setUsePlatformPalette(const bool enable)
bool usePlatformPalette()
\inmodule QtCore
Combined button and popup list for selecting options.
GLboolean enable