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
qqstylekitcontrolproperties_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 QQSTYLEKITCONTROLPROPERTIES_P_H
6#define QQSTYLEKITCONTROLPROPERTIES_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>
20#include <QtGui/QColor>
21#include <QtQuick/private/qquickrectangle_p.h>
22#include <QtQuick/private/qquickimage_p.h>
23#include <QtQuick/private/qquicktransition_p.h>
24#include <QtQuick/private/qquicktext_p.h>
25
28#include <QtLabsStyleKit/qtlabsstylekitexports.h>
29
31
32using namespace Qt::StringLiterals;
33
34class QQStyleKitStyle;
37class QQStyleKitReader;
38class QQStyleKitControlProperties;
39class QQStyleKitDelegateProperties;
40
42{
44
45public:
46 enum class EmitFlag {
49 };
50 Q_DECLARE_FLAGS(EmitFlags, EmitFlag)
52
54
55 PropertyPathId propertyPathId(QQSK::Property property, PropertyPathId::Flag flag) const;
56 QString pathToString() const;
57
58 template<typename T>
59 inline T styleProperty(
60 QQSK::Property property,
61 QQSK::Property alternative = QQSK::Property::NoProperty) const
62 {
63 return qvariant_cast<T>(QQStyleKitPropertyResolver::readStyleProperty(this, property, alternative));
64 }
65
66 template<typename T>
67 inline T styleProperty(QQSK::Property property, const T &defaultValue) const
68 {
69 const QVariant value = QQStyleKitPropertyResolver::readStyleProperty(this, property);
70 return value.isValid() ? qvariant_cast<T>(value) : defaultValue;
71 }
72
73 template<typename T>
74 inline bool setStyleProperty(QQSK::Property property, T value)
75 {
76 // This function will return true if the new value differes from the old one
77 return QQStyleKitPropertyResolver::writeStyleProperty(this, property, QVariant::fromValue(value));
78 }
79
80 inline bool isDefined(QQSK::Property property) const
81 {
82 return QQStyleKitPropertyResolver::readStyleProperty(this, property).isValid();
83 }
84
85 template<typename SUBCLASS>
86 inline void handleStylePropertyChanged(void (SUBCLASS::*changedSignal)());
87
88 template <typename SUBCLASS, typename... CHANGED_SIGNALS>
89 inline void handleStylePropertiesChanged(CHANGED_SIGNALS... changedSignals);
90
91 template <typename T>
92 T *lazyCreateGroup(T *const &ptr, QQSK::PropertyGroup group) const;
93
94 inline bool isControlProperties() const
95 {
96 /* Only QQStyleKitControlProperties (as opposed to the nested delegates) have properties
97 * with an ID at the bottom of the available space. The exception is the global flag, which
98 * inherits the groupSpace from the control. */
99 return m_groupSpace.start == 0 && m_pathFlags != QQSK::PropertyPathFlag::Global;
100 }
101
102 QQStyleKitControlProperties *controlProperties() const;
103 inline QQSK::PropertyPathFlags pathFlags() const { return m_pathFlags; }
104 void emitChangedForAllStylePropertiesRecursive(EmitFlags emitFlags);
105
106protected:
109
110private:
111 bool shouldEmitLocally();
112 bool shouldEmitGlobally();
113
114 static QHash<PropertyPathId_t, QString> s_pathStrings;
115};
116
117// ************* QQStyleKitImageProperties ****************
118
119class Q_LABSSTYLEKIT_EXPORT QQStyleKitImageProperties : public QQStyleKitPropertyGroup
120{
121 Q_OBJECT
122 Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged FINAL)
123 Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged FINAL)
124 Q_PROPERTY(QQuickImage::FillMode fillMode READ fillMode WRITE setFillMode NOTIFY fillModeChanged FINAL)
125 QML_UNCREATABLE("This component can only be instantiated by StyleKit")
126 QML_NAMED_ELEMENT(ImageStyle)
127
128public:
129 QQStyleKitImageProperties(QQSK::PropertyGroup group, QQStyleKitControlProperties *parent = nullptr);
130
131 template <typename... CHANGED_SIGNALS>
132 void emitGlobally(QQStyleKitExtendableControlType controlType, CHANGED_SIGNALS... changedSignals) const;
133
134 QUrl source() const;
135 void setSource(const QUrl &source);
136
137 QColor color() const;
138 void setColor(const QColor &color);
139
140 QQuickImage::FillMode fillMode() const;
141 void setFillMode(QQuickImage::FillMode fillMode);
142
143signals:
144 void sourceChanged();
145 void colorChanged();
146 void fillModeChanged();
147};
148
149// ************* QQStyleKitBorderProperties ****************
150
151class Q_LABSSTYLEKIT_EXPORT QQStyleKitBorderProperties : public QQStyleKitPropertyGroup
152{
153 Q_OBJECT
154 Q_PROPERTY(qreal width READ width WRITE setWidth NOTIFY widthChanged FINAL)
155 Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged FINAL)
156 QML_UNCREATABLE("This component can only be instantiated by StyleKit")
157 QML_NAMED_ELEMENT(BorderStyle)
158
159public:
160 QQStyleKitBorderProperties(QQSK::PropertyGroup group, QQStyleKitControlProperties *parent = nullptr);
161
162 template <typename... CHANGED_SIGNALS>
163 void emitGlobally(QQStyleKitExtendableControlType controlType, CHANGED_SIGNALS... changedSignals) const;
164
165 qreal width() const;
166 void setWidth(qreal width);
167
168 QColor color() const;
169 void setColor(const QColor &color);
170
171signals:
172 void widthChanged();
173 void colorChanged();
174};
175
176// ************* QQStyleKitShadowProperties ****************
177
178class Q_LABSSTYLEKIT_EXPORT QQStyleKitShadowProperties : public QQStyleKitPropertyGroup
179{
180 Q_OBJECT
181 Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged FINAL)
182 Q_PROPERTY(qreal opacity READ opacity WRITE setOpacity NOTIFY opacityChanged FINAL)
183 Q_PROPERTY(qreal scale READ scale WRITE setScale NOTIFY scaleChanged FINAL)
184 Q_PROPERTY(qreal verticalOffset READ verticalOffset WRITE setVerticalOffset NOTIFY verticalOffsetChanged FINAL)
185 Q_PROPERTY(qreal horizontalOffset READ horizontalOffset WRITE setHorizontalOffset NOTIFY horizontalOffsetChanged FINAL)
186 Q_PROPERTY(qreal blur READ blur WRITE setBlur NOTIFY blurChanged FINAL)
187 Q_PROPERTY(bool visible READ visible WRITE setVisible NOTIFY visibleChanged FINAL)
188 Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged FINAL)
189 QML_UNCREATABLE("This component can only be instantiated by StyleKit")
190 QML_NAMED_ELEMENT(ShadowStyle)
191
192public:
193 QQStyleKitShadowProperties(QQSK::PropertyGroup group, QQStyleKitControlProperties *parent = nullptr);
194
195 template <typename... CHANGED_SIGNALS>
196 void emitGlobally(QQStyleKitExtendableControlType controlType, CHANGED_SIGNALS... changedSignals) const;
197
198 QColor color() const;
199 void setColor(QColor color);
200
201 qreal opacity() const;
202 void setOpacity(qreal opacity);
203
204 qreal scale() const;
205 void setScale(qreal scale);
206
207 qreal verticalOffset() const;
208 void setVerticalOffset(qreal verticalOffset);
209
210 qreal horizontalOffset() const;
211 void setHorizontalOffset(qreal horizontalOffset);
212
213 qreal blur() const;
214 void setBlur(qreal blur);
215
216 bool visible() const;
217 void setVisible(bool visible);
218
219 QQmlComponent *delegate() const;
220 void setDelegate(QQmlComponent *delegate);
221
222signals:
223 void colorChanged();
224 void opacityChanged();
225 void scaleChanged();
226 void verticalOffsetChanged();
227 void horizontalOffsetChanged();
228 void blurChanged();
229 void visibleChanged();
230 void delegateChanged();
231};
232
233// ************* QQStyleKitDelegateProperties ****************
234
235class Q_LABSSTYLEKIT_EXPORT QQStyleKitDelegateProperties : public QQStyleKitPropertyGroup
236{
237 Q_OBJECT
238 Q_PROPERTY(qreal implicitWidth READ implicitWidth WRITE setImplicitWidth NOTIFY implicitWidthChanged FINAL)
239 Q_PROPERTY(qreal implicitHeight READ implicitHeight WRITE setImplicitHeight NOTIFY implicitHeightChanged FINAL)
240 Q_PROPERTY(qreal minimumWidth READ minimumWidth WRITE setMinimumWidth NOTIFY minimumWidthChanged FINAL)
241 Q_PROPERTY(qreal minimumHeight READ minimumHeight WRITE setMinimumHeight NOTIFY minimumHeightChanged FINAL)
242 Q_PROPERTY(bool fillWidth READ fillWidth WRITE setFillWidth NOTIFY fillWidthChanged FINAL)
243 Q_PROPERTY(bool fillHeight READ fillHeight WRITE setFillHeight NOTIFY fillHeightChanged FINAL)
244 Q_PROPERTY(qreal margins READ margins WRITE setMargins NOTIFY marginsChanged FINAL)
245 Q_PROPERTY(qreal leftMargin READ leftMargin WRITE setLeftMargin NOTIFY leftMarginChanged FINAL)
246 Q_PROPERTY(qreal rightMargin READ rightMargin WRITE setRightMargin NOTIFY rightMarginChanged FINAL)
247 Q_PROPERTY(qreal topMargin READ topMargin WRITE setTopMargin NOTIFY topMarginChanged FINAL)
248 Q_PROPERTY(qreal bottomMargin READ bottomMargin WRITE setBottomMargin NOTIFY bottomMarginChanged FINAL)
249 Q_PROPERTY(Qt::Alignment alignment READ alignment WRITE setAlignment NOTIFY alignmentChanged FINAL)
250 Q_PROPERTY(qreal radius READ radius WRITE setRadius NOTIFY radiusChanged FINAL)
251 Q_PROPERTY(qreal topLeftRadius READ topLeftRadius WRITE setTopLeftRadius NOTIFY topLeftRadiusChanged FINAL)
252 Q_PROPERTY(qreal topRightRadius READ topRightRadius WRITE setTopRightRadius NOTIFY topRightRadiusChanged FINAL)
253 Q_PROPERTY(qreal bottomLeftRadius READ bottomLeftRadius WRITE setBottomLeftRadius NOTIFY bottomLeftRadiusChanged FINAL)
254 Q_PROPERTY(qreal bottomRightRadius READ bottomRightRadius WRITE setBottomRightRadius NOTIFY bottomRightRadiusChanged FINAL)
255 Q_PROPERTY(qreal scale READ scale WRITE setScale NOTIFY scaleChanged FINAL)
256 Q_PROPERTY(qreal rotation READ rotation WRITE setRotation NOTIFY rotationChanged FINAL)
257 Q_PROPERTY(qreal opacity READ opacity WRITE setOpacity NOTIFY opacityChanged FINAL)
258 Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged FINAL)
259 Q_PROPERTY(bool visible READ visible WRITE setVisible NOTIFY visibleChanged FINAL)
260 Q_PROPERTY(bool clip READ clip WRITE setClip NOTIFY clipChanged FINAL)
261 Q_PROPERTY(QQuickGradient *gradient READ gradient WRITE setGradient NOTIFY gradientChanged FINAL)
262 Q_PROPERTY(QQStyleKitImageProperties *image READ image NOTIFY imageChanged FINAL)
263 Q_PROPERTY(QQStyleKitBorderProperties *border READ border NOTIFY borderChanged FINAL)
264 Q_PROPERTY(QQStyleKitShadowProperties *shadow READ shadow NOTIFY shadowChanged FINAL)
265 Q_PROPERTY(QObject *data READ data WRITE setData NOTIFY dataChanged FINAL)
266 Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged FINAL)
267 QML_UNCREATABLE("This component can only be instantiated by StyleKit")
268 QML_NAMED_ELEMENT(DelegateStyle)
269
270public:
271 QQStyleKitDelegateProperties(QQSK::PropertyGroup group, QQStyleKitControlProperties *parent = nullptr);
272
273 template <typename... CHANGED_SIGNALS>
274 void emitGlobally(QQStyleKitExtendableControlType controlType, CHANGED_SIGNALS... changedSignals) const;
275
276 qreal radius() const;
277 void setRadius(qreal radius);
278
279 qreal topLeftRadius() const;
280 void setTopLeftRadius(qreal radius);
281
282 qreal topRightRadius() const;
283 void setTopRightRadius(qreal radius);
284
285 qreal bottomLeftRadius() const;
286 void setBottomLeftRadius(qreal radius);
287
288 qreal bottomRightRadius() const;
289 void setBottomRightRadius(qreal radius);
290
291 qreal scale() const;
292 void setScale(qreal scale);
293
294 qreal rotation() const;
295 void setRotation(qreal rotation);
296
297 qreal implicitWidth() const;
298 void setImplicitWidth(qreal width);
299
300 qreal implicitHeight() const;
301 void setImplicitHeight(qreal height);
302
303 qreal minimumWidth() const;
304 void setMinimumWidth(qreal width);
305
306 qreal minimumHeight() const;
307 void setMinimumHeight(qreal height);
308
309 bool fillWidth() const;
310 void setFillWidth(bool fill);
311
312 bool fillHeight() const;
313 void setFillHeight(bool fill);
314
315 qreal margins() const;
316 void setMargins(qreal margins);
317
318 qreal leftMargin() const;
319 void setLeftMargin(qreal margin);
320
321 qreal rightMargin() const;
322 void setRightMargin(qreal margin);
323
324 qreal topMargin() const;
325 void setTopMargin(qreal margin);
326
327 qreal bottomMargin() const;
328 void setBottomMargin(qreal margin);
329
330 Qt::Alignment alignment() const;
331 void setAlignment(Qt::Alignment alignment);
332
333 qreal opacity() const;
334 void setOpacity(qreal opacity);
335
336 QColor color() const;
337 void setColor(const QColor &color);
338
339 bool visible() const;
340 void setVisible(bool visible);
341
342 bool clip() const;
343 void setClip(bool clip);
344
345 QQuickGradient *gradient() const;
346 void setGradient(QQuickGradient *gradient);
347
348 QObject *data() const;
349 void setData(QObject *data);
350
351 QQmlComponent *delegate() const;
352 void setDelegate(QQmlComponent *delegate);
353
354 QQStyleKitImageProperties *image() const;
355 QQStyleKitBorderProperties *border() const;
356 QQStyleKitShadowProperties *shadow() const;
357
358signals:
359 void colorChanged();
360 void radiusChanged();
361 void topLeftRadiusChanged();
362 void topRightRadiusChanged();
363 void bottomLeftRadiusChanged();
364 void bottomRightRadiusChanged();
365 void scaleChanged();
366 void rotationChanged();
367 void visibleChanged();
368 void clipChanged();
369 void borderChanged();
370 void shadowChanged();
371 void imageChanged();
372 void gradientChanged();
373 void colorImageChanged();
374 void implicitWidthChanged();
375 void implicitHeightChanged();
376 void minimumWidthChanged();
377 void minimumHeightChanged();
378 void marginsChanged();
379 void leftMarginChanged();
380 void rightMarginChanged();
381 void topMarginChanged();
382 void bottomMarginChanged();
383 void alignmentChanged();
384 void opacityChanged();
385 void dataChanged();
386 void delegateChanged();
387 void fillWidthChanged();
388 void fillHeightChanged();
389
390private:
391 QPointer<QQuickGradient> m_gradient;
392 QQStyleKitBorderProperties *m_border = nullptr;
393 QQStyleKitShadowProperties *m_shadow = nullptr;
394 QQStyleKitImageProperties *m_image = nullptr;
395};
396
397// ************* QQStyleKitHandleProperties ****************
398
400{
401 Q_OBJECT
402 Q_PROPERTY(QQStyleKitDelegateProperties *first READ first NOTIFY firstChanged FINAL)
404 QML_UNCREATABLE("This component can only be instantiated by StyleKit")
406
407public:
409 QQStyleKitDelegateProperties *first() const;
410 QQStyleKitDelegateProperties *second() const;
411
412signals:
415
416private:
417 QQStyleKitDelegateProperties *m_first = nullptr;
418 QQStyleKitDelegateProperties *m_second = nullptr;
419
420 friend class QQStyleKitReader;
421 friend class QQStyleKitControlProperties;
422};
423
424// ************* QQStyleKitIndicatorProperties ****************
425
427{
428 Q_OBJECT
429 Q_PROPERTY(QQStyleKitDelegateProperties *foreground READ foreground NOTIFY foregroundChanged FINAL)
430 QML_UNCREATABLE("This component can only be instantiated by StyleKit")
432
433public:
435
436 template <typename... CHANGED_SIGNALS>
437 void emitGlobally(QQStyleKitExtendableControlType controlType, CHANGED_SIGNALS... changedSignals) const;
438
439 QQStyleKitDelegateProperties *foreground() const;
440
441signals:
443
444private:
445 QQStyleKitDelegateProperties *m_foreground = nullptr;
446
447 friend class QQStyleKitReader;
448 friend class QQStyleKitControlProperties;
449};
450
451// ************* QQStyleKitIndicatorWithSubTypes ****************
452
454{
455 Q_OBJECT
456 Q_PROPERTY(QQStyleKitDelegateProperties *foreground READ foreground NOTIFY foregroundChanged FINAL)
461 QML_UNCREATABLE("This component can only be instantiated by StyleKit")
463
464public:
466
467 template <typename... CHANGED_SIGNALS>
468 void emitGlobally(QQStyleKitExtendableControlType controlType, CHANGED_SIGNALS... changedSignals) const;
469
470 QQStyleKitDelegateProperties *foreground() const;
473 // Generic indicators
476
477signals:
479 void upChanged();
483
484private:
485 QQStyleKitDelegateProperties *m_foreground = nullptr;
486 QQStyleKitIndicatorProperties *m_first = nullptr;
487 QQStyleKitIndicatorProperties *m_second = nullptr;
488
489 friend class QQStyleKitReader;
490 friend class QQStyleKitControlProperties;
491};
492
493// ************* QQStyleKitTextProperties ****************
494
496{
497 Q_OBJECT
498 Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged FINAL)
510 QML_UNCREATABLE("This component can only be instantiated by StyleKit")
512
513public:
515
516 template <typename... CHANGED_SIGNALS>
517 void emitGlobally(QQStyleKitExtendableControlType controlType, CHANGED_SIGNALS... changedSignals) const;
518
519 QColor color() const;
520 void setColor(const QColor &color);
521
522 Qt::Alignment alignment() const;
523 void setAlignment(Qt::Alignment alignment);
524
525 bool bold() const;
526 void setBold(bool bold);
527
528 bool italic() const;
529 void setItalic(bool italic);
530
531 qreal pointSize() const;
532 void setPointSize(qreal pointSize);
533
534 qreal padding() const;
535 void setPadding(qreal padding);
536
537 qreal leftPadding() const;
538 void setLeftPadding(qreal leftPadding);
539
540 qreal rightPadding() const;
541 void setRightPadding(qreal rightPadding);
542
543 qreal topPadding() const;
544 void setTopPadding(qreal topPadding);
545
546 qreal bottomPadding() const;
547 void setBottomPadding(qreal bottomPadding);
548
551
552signals:
565
566private:
567 QQStyleKitTextProperties *m_first = nullptr;
568 QQStyleKitTextProperties *m_second = nullptr;
569};
570
571/************* QQStyleKitControlProperties ****************
572 * QQStyleKitControlProperties (and all other subclasses of QQStyleKitPropertyGroup),
573 * is just an empty interface declaring the properties available for styling and reading.
574 * It contains as little data as possible since it will be instantiated a lot. E.g a style
575 * will instantiate them for every style.button, style.slider, etc defined, the same for a
576 * theme, and also each instance of a StyleKitReader. Those are all subclasses of this
577 * class. Each subclass will determine if the properties can be written to (as opposed to
578 * only be read), and if so, offer a storage for storing those values. That storage is typically
579 * a map that stores _only_ the properties that are written to, and nothing else.
580 */
581class Q_LABSSTYLEKIT_EXPORT QQStyleKitControlProperties : public QQStyleKitPropertyGroup
582{
583 Q_OBJECT
584 Q_PROPERTY(qreal spacing READ spacing WRITE setSpacing NOTIFY spacingChanged FINAL)
585 Q_PROPERTY(qreal padding READ padding WRITE setPadding NOTIFY paddingChanged FINAL)
586 Q_PROPERTY(qreal leftPadding READ leftPadding WRITE setLeftPadding NOTIFY leftPaddingChanged FINAL)
587 Q_PROPERTY(qreal rightPadding READ rightPadding WRITE setRightPadding NOTIFY rightPaddingChanged FINAL)
588 Q_PROPERTY(qreal topPadding READ topPadding WRITE setTopPadding NOTIFY topPaddingChanged FINAL)
589 Q_PROPERTY(qreal bottomPadding READ bottomPadding WRITE setBottomPadding NOTIFY bottomPaddingChanged FINAL)
590 Q_PROPERTY(QQStyleKitDelegateProperties *background READ background NOTIFY backgroundChanged FINAL)
591 Q_PROPERTY(QQStyleKitHandleProperties *handle READ handle NOTIFY handleChanged FINAL)
592 Q_PROPERTY(QQStyleKitIndicatorWithSubTypes *indicator READ indicator NOTIFY indicatorChanged FINAL)
593 Q_PROPERTY(QQStyleKitTextProperties *text READ text NOTIFY textChanged FINAL)
594 Q_PROPERTY(QQuickTransition *transition READ transition WRITE setTransition NOTIFY transitionChanged FINAL)
595
596 QML_UNCREATABLE("This component can only be instantiated by StyleKit")
597 QML_NAMED_ELEMENT(ControlStyleProperties)
598
599public:
600 QQStyleKitControlProperties(QQSK::PropertyGroup group, QObject *parent = nullptr);
601
602 void emitChangedForAllStyleProperties(EmitFlags emitFlags);;
603 template <typename... CHANGED_SIGNALS>
604 void emitGlobally(QQStyleKitExtendableControlType controlType, CHANGED_SIGNALS... changedSignals) const;
605 void forEachUsedDelegate(
606 std::function<void (QQStyleKitDelegateProperties *, QQSK::Delegate, const QString &)> f);
607
608 QQStyleKitStyle *style() const;
609 QQSK::Subclass subclass() const;
610 QQStyleKitReader *asQQStyleKitReader() const;
611 QQStyleKitControlState *asQQStyleKitState() const;
612
613 qreal spacing() const;
614 void setSpacing(qreal spacing);
615
616 qreal padding() const;
617 void setPadding(qreal padding);
618
619 qreal leftPadding() const;
620 void setLeftPadding(qreal leftPadding);
621
622 qreal rightPadding() const;
623 void setRightPadding(qreal rightPadding);
624
625 qreal topPadding() const;
626 void setTopPadding(qreal topPadding);
627
628 qreal bottomPadding() const;
629 void setBottomPadding(qreal bottomPadding);
630
631 QQuickTransition* transition() const;
632 void setTransition(QQuickTransition *transition);
633
634 QQStyleKitTextProperties *text() const;
635
636 QQStyleKitDelegateProperties *background() const;
637 QQStyleKitHandleProperties *handle() const;
638 QQStyleKitIndicatorWithSubTypes *indicator() const;
639
640signals:
641 void backgroundChanged();
642 void handleChanged();
643 void indicatorChanged();
644 void spacingChanged();
645 void paddingChanged();
646 void leftPaddingChanged();
647 void rightPaddingChanged();
648 void topPaddingChanged();
649 void bottomPaddingChanged();
650 void transitionChanged();
651 void textChanged();
652
653private:
654 Q_DISABLE_COPY(QQStyleKitControlProperties)
655
656 QQStyleKitDelegateProperties *m_background = nullptr;
657 QQStyleKitHandleProperties *m_handle = nullptr;
658 QQStyleKitIndicatorWithSubTypes *m_indicator = nullptr;
659 QQStyleKitTextProperties *m_text = nullptr;
660
661 friend class QQStyleKitPropertyResolver;
662 friend class QQStyleKitReader;
663};
664
665QT_END_NAMESPACE
666
667#endif // QQSTYLEKITCONTROLPROPERTIES_P_H
QQStyleKitDelegateProperties * delegateStyle() const
void componentComplete() override
Invoked after the root component that caused this instantiation has completed construction.
void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override
void setDelegateStyle(QQStyleKitDelegateProperties *delegateProperties)
QQStyleKitDelegateProperties * first() const
QQStyleKitDelegateProperties * second() const
QQStyleKitDelegateProperties * foreground() const
void emitGlobally(QQStyleKitExtendableControlType controlType, CHANGED_SIGNALS... changedSignals) const
void emitGlobally(QQStyleKitExtendableControlType controlType, CHANGED_SIGNALS... changedSignals) const
QQStyleKitDelegateProperties * foreground() const
QQStyleKitIndicatorProperties * down() const
QQStyleKitIndicatorProperties * up() const
QQStyleKitIndicatorProperties * second() const
QQStyleKitIndicatorProperties * first() const
bool setStyleProperty(QQSK::Property property, T value)
QQStyleKitPropertyGroupSpace m_groupSpace
void emitChangedForAllStylePropertiesRecursive(EmitFlags emitFlags)
T styleProperty(QQSK::Property property, const T &defaultValue) const
T styleProperty(QQSK::Property property, QQSK::Property alternative=QQSK::Property::NoProperty) const
T * lazyCreateGroup(T *const &ptr, QQSK::PropertyGroup group) const
QQSK::PropertyPathFlags pathFlags() const
void handleStylePropertyChanged(void(SUBCLASS::*changedSignal)())
PropertyPathId propertyPathId(QQSK::Property property, PropertyPathId::Flag flag) const
void handleStylePropertiesChanged(CHANGED_SIGNALS... changedSignals)
bool isDefined(QQSK::Property property) const
QQStyleKitControlProperties * controlProperties() const
void setBottomPadding(qreal bottomPadding)
void setAlignment(Qt::Alignment alignment)
void emitGlobally(QQStyleKitExtendableControlType controlType, CHANGED_SIGNALS... changedSignals) const
QQStyleKitTextProperties * first() const
QQStyleKitTextProperties * second() const
Combined button and popup list for selecting options.