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
qqstylekitcontrol_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 QQSTYLEKITCONTROL_P_H
6#define QQSTYLEKITCONTROL_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
19#include <QtQml/QtQml>
23
25
28
30{
31 Q_OBJECT
32 Q_PROPERTY(QQmlListProperty<QQStyleKitVariation> variations READ variations FINAL)
35
36public:
38
40
41 static QQStyleKitControlAttached *qmlAttachedProperties(QObject *object);
42
43private:
44 QVariant readStyleProperty(PropertyStorageId key) const;
45 void writeStyleProperty(PropertyStorageId key, const QVariant &value);
46
47 QQStyleKitControls *controls() const;
48 QQStyleKitExtendableControlType controlType() const;
49
50private:
52
54 mutable QQStyleKitPropertyStorage m_storage;
55 QQSK::State m_writtenStates = QQSK::StateFlag::Unspecified;
56
59 friend class QQStyleKitControls;
60};
61
63{
64 Q_OBJECT
65 Q_PROPERTY(QStringList variations READ variations WRITE setVariations NOTIFY variationsChanged FINAL)
67
68public:
70
71 QStringList variations() const;
72 void setVariations(const QStringList &variations);
73
75 void setControlType(QQStyleKitExtendableControlType type);
76
80
81private:
82 // m_variations is used for resolving in-app QQStyleKitVariations
83 QStringList m_variations;
84 // m_controlType is used for resolving in-style QQStyleKitVariations
85 QQStyleKitExtendableControlType m_controlType = QQStyleKitReader::ControlType::Unspecified;
86
87 static int s_variationCount;
88
89 friend class QQStyleKit;
91};
92
93QT_END_NAMESPACE
94
95#endif // QQSTYLEKITCONTROL_P_H
void setControlType(QQStyleKitExtendableControlType type)
QStringList variations() const
void setVariations(const QStringList &variations)
QQStyleKitExtendableControlType controlType()
QQmlListProperty< QQStyleKitVariation > variations()
static QQStyleKitControlAttached * qmlAttachedProperties(QObject *object)
Combined button and popup list for selecting options.