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
23QT_BEGIN_NAMESPACE
24
25class Q_QUICKCONTROLS2IMPL_PRIVATE_EXPORT QQuickPlatformTheme : public QObject
26{
27 Q_OBJECT
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).
30 QML_EXTENDED_NAMESPACE(QPlatformTheme)
31 QML_NAMED_ELEMENT(PlatformTheme)
32 QML_SINGLETON
33 QML_ADDED_IN_VERSION(6, 3)
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
43QT_END_NAMESPACE
44
45#endif // QQUICKPLATFORMTHEME_P_H
46

source code of qtdeclarative/src/quickcontrolsimpl/qquickplatformtheme_p.h