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
qquickplatformtheme_p.h
Go to the documentation of this file.
1// Copyright (C) 2021 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 QQUICKPLATFORMTHEME_P_H
5#define QQUICKPLATFORMTHEME_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 <QtCore/qobject.h>
19#include <QtGui/qpa/qplatformtheme.h>
20#include <QtQml/qqml.h>
21#include <QtQuickControls2Impl/private/qtquickcontrols2implglobal_p.h>
22
24
25class Q_QUICKCONTROLS2IMPL_EXPORT QQuickPlatformTheme : public QObject
26{
28 // This exposes the enums in QPlatformTheme to QML. We can't use QML_EXTENDED
29 // because it's not possible to extend a QGadget (QPlatformTheme) with an QObject (us).
31 QML_NAMED_ELEMENT(PlatformTheme)
34
35public:
36 explicit QQuickPlatformTheme(QObject *parent = nullptr);
37
38 Q_INVOKABLE QVariant themeHint(QPlatformTheme::ThemeHint themeHint) const;
39
40 static QVariant getThemeHint(QPlatformTheme::ThemeHint themeHint);
41};
42
44
45#endif // QQUICKPLATFORMTHEME_P_H
\inmodule QtCore
Definition qobject.h:103
The QPlatformTheme class allows customizing the UI based on themes.
ThemeHint
This enum describes the available theme hints.
\inmodule QtCore
Definition qvariant.h:65
Combined button and popup list for selecting options.
#define QML_NAMED_ELEMENT(NAME)
#define QML_SINGLETON
#define QML_EXTENDED_NAMESPACE(EXTENDED_NAMESPACE)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
#define Q_OBJECT
#define Q_INVOKABLE