11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
77QQmlListProperty<QQStyleKitVariation> QQStyleKitControl::variations()
79 const bool isWrite = subclass() == QQSK::Subclass::QQStyleKitState;
81 if (!QQStyleKitPropertyResolver::hasLocalStyleProperty(
this, QQSK::Property::Variations)) {
83
84
85
86
87
88
89
90
91
92 auto *newList =
new QList<QQStyleKitVariation *>();
93 setStyleProperty(QQSK::Property::Variations, newList);
98
99 const QVariant variant = QQStyleKitPropertyResolver::readStyleProperty(
this, QQSK::Property::Variations);
100 if (!variant.isValid()) {
102 static auto *emptyList =
new QList<QQStyleKitVariation *>();
103 return QQmlListProperty<QQStyleKitVariation>(
this, emptyList);
106 const auto value = qvariant_cast<QList<QQStyleKitVariation *> *>(variant);
107 return QQmlListProperty<QQStyleKitVariation>(
this, value);
112 return m_storage.value(key);
115void QQStyleKitControl::writeStyleProperty(PropertyStorageId key,
const QVariant &value)
117 m_storage.insert(key, value);
128 const auto &controlsMap = controls()->m_controls;
129 Q_ASSERT(std::find(controlsMap.begin(), controlsMap.end(),
this) != controlsMap.end());
135#include "moc_qqstylekitcontrol_p.cpp"
Combined button and popup list for selecting options.