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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
97
98
99
100
101
102
103
104
105
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
153
154
155 bool styleOrThemeFound =
false;
156 for (QObject *current = parent(); current; current = current->parent()) {
157 if (
auto *styleOrTheme = qobject_cast<QQStyleKitStyleAndThemeBase *>(current)) {
158 styleOrTheme->m_styleVariations.append(
this);
159 styleOrThemeFound =
true;
163 if (!styleOrThemeFound)
164 qmlWarning(
this) <<
"A StyleVariation needs to be a descendant of the Style it belongs to!";
169 return new QQStyleKitVariationAttached(object);
198 if (m_variations == variations)
201 m_variations = variations;
202 emit variationsChanged();
207 return m_controlType;
212 if (m_controlType == type)
215 m_controlType = type;
216 emit controlTypeChanged();
222
223
224
225
226
227
228
229
230
231
232
233 style->m_hasVariations =
false;
235 for (QQStyleKitStyle *current = style; current; current = current->fallbackStyle()) {
236 if (!current->m_styleVariations.isEmpty()) {
237 style->m_hasVariations =
true;
238 for (QQStyleKitVariation *variation : current->m_styleVariations)
239 variation->m_usageContext.clear();
243 if (!theme->m_styleVariations.isEmpty()) {
244 style->m_hasVariations =
true;
245 for (QQStyleKitVariation *variation : theme->m_styleVariations)
246 variation->m_usageContext.clear();
254#include "moc_qqstylekitvariation_p.cpp"
void componentComplete() override
Invoked after the root component that caused this instantiation has completed construction.
QStringList variations() const
void setControlType(QQStyleKitExtendableControlType type)
QQStyleKitExtendableControlType controlType() const
void setVariations(const QStringList &variations)
void componentComplete() override
Invoked after the root component that caused this instantiation has completed construction.
void setName(const QString &name)
Combined button and popup list for selecting options.