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