Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qqstylekit_p.h
Go to the documentation of this file.
1// Copyright (C) 2025 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 QQSTYLEKIT_P_H
6#define QQSTYLEKIT_P_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
20
21#include <QtQml/QtQml>
22
24
26
27class QQStyleKit : public QObject
28{
29 Q_OBJECT
30 QML_NAMED_ELEMENT(StyleKit)
32
33public:
34 QQStyleKit(QObject *parent = nullptr);
35 static QQStyleKitAttached *qmlAttachedProperties(QObject *obj = nullptr);
36
37private:
39};
40
42{
43 Q_OBJECT
44 Q_PROPERTY(QQStyleKitStyle *style READ style WRITE setStyle NOTIFY styleChanged FINAL)
48
49public:
52
53 QQStyleKitStyle *style() const;
54 void setStyle(QQStyleKitStyle *style);
55
56 QString styleUrl() const;
57 void setStyleUrl(const QString &styleUrl);
58
59 bool transitionsEnabled() const;
60 void setTransitionsEnabled(bool enabled);
61
62 QQStyleKitDebug *debug() const;
63
64 Q_INVOKABLE bool styleLoaded() const;
65
70
71private:
72 bool m_ownsStyle = false;
73 QString m_styleUrl;
74 QPointer<QQmlEngine> m_engine;
75 QPointer<QQStyleKitStyle> m_style;
76 QQStyleKitDebug m_debug;
77
78 static QPointer<QQStyleKitAttached> s_instance;
79 static bool s_transitionsEnabled;
80
81 friend class QQStyleKit;
82};
83
84QT_END_NAMESPACE
85
86#endif // QQSTYLEKIT_P_H
Q_INVOKABLE bool styleLoaded() const
void setStyleUrl(const QString &styleUrl)
QQStyleKitStyle * style() const
void transitionsEnabledChanged()
void setStyle(QQStyleKitStyle *style)
void setTransitionsEnabled(bool enabled)
QQStyleKitDebug * debug() const
bool transitionsEnabled() const
QString styleUrl() const
static QQStyleKitAttached * qmlAttachedProperties(QObject *obj=nullptr)
Combined button and popup list for selecting options.