5#ifndef QQSTYLEKITPROPERTYPATH_P_H
6#define QQSTYLEKITPROPERTYPATH_P_H
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
62class QQStyleKitPropertyGroup;
64using PropertyPathId = quint32;
65using PropertyStorageId = quint32;
66using QQStyleKitExtendableControlType = quint32;
67using QQStyleKitPropertyStorage = QHash<PropertyStorageId, QVariant>;
73constexpr PropertyPathId subtypeCount = PropertyPathId(QQSK::PropertyPathFlag::DelegateSubtype2) - PropertyPathId(QQSK::PropertyPathFlag::DelegateSubtype0) + 1;
107
108
109
110
111
112 return m_groupStart + PropertyPathId(m_property);
117 return extractSubtype(m_groupStart);
123
124
125
126
127 Q_ASSERT(state != QQSK::StateFlag::Unspecified);
128 const PropertyPathId stateIndex = PropertyPathId(state) - 1;
129 const PropertyPathId stateStart = stateIndex * stateStorageSpaceSize;
130 return stateStart + pathId();
136
137
138
139 const PropertyPathId subtypeIndex = pathId / subtypeStorageSpaceSize;
140 return QQSK::PropertyGroup(
int(QQSK::PropertyGroup::DelegateSubtype0) +
int(subtypeIndex));
146
147
148
149 const PropertyPathId stateIndex = storageId / stateStorageSpaceSize;
150 return QQSK::State(stateIndex + 1);
157
158
159
160 if (flag == Flag::IncludeSubtype)
161 return storageId % stateStorageSpaceSize;
163 return (storageId % stateStorageSpaceSize) % subtypeStorageSpaceSize;
167 QQSK::Property m_property;
168 PropertyPathId m_groupStart;
170 static QHash<PropertyPathId, QString> s_cachedPathStrings;
QQStyleKitDelegateProperties * delegateStyle() const
~QQStyleKitDelegateContainer() override
void componentComplete() override
Invoked after the root component that caused this instantiation has completed construction.
QObject * quickControl() const
void setQuickControl(QObject *control)
void quickControlChanged()
void delegateInstanceChanged()
void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override
void setDelegateStyle(QQStyleKitDelegateProperties *delegateProperties)
QQuickItem * delegateInstance() const
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)())
QQSK::PropertyPathFlags m_pathFlags
virtual void forEachExistingNestedGroup(const std::function< void(QQStyleKitPropertyGroup *)> &f) const
void handleStylePropertiesChanged(CHANGED_SIGNALS... changedSignals)
bool isDefined(QQSK::Property property) const
QQStyleKitControlProperties * controlProperties() const
bool isControlProperties() const
QQStyleKitPropertyGroupSpace groupSpace() const
PropertyPathId pathId() const
static QQSK::PropertyGroup extractSubtype(PropertyPathId pathId)
static QQSK::State extractState(PropertyStorageId storageId)
static QString pathIdToPathString(PropertyPathId pathId)
static QString storageIdToPathString(PropertyStorageId storageId)
static PropertyPathId extractPropertyPathId(PropertyStorageId storageId, QQStyleKitPropertyPath::Flag flag=QQStyleKitPropertyPath::Flag::IncludeSubtype)
PropertyStorageId createStorageId(QQSK::State state) const
QQSK::PropertyGroup subType() const
QQSK::Property property() const
void setRightPadding(qreal rightPadding)
void setBottomPadding(qreal bottomPadding)
void setTopPadding(qreal topPadding)
void setLeftPadding(qreal leftPadding)
void setPadding(qreal padding)
qreal rightPadding() const
void setItalic(bool italic)
void setAlignment(Qt::Alignment alignment)
void forEachExistingNestedGroup(const std::function< void(QQStyleKitPropertyGroup *)> &f) const override
qreal bottomPadding() const
void setPointSize(qreal pointSize)
void setColor(const QColor &color)
void bottomPaddingChanged()
Qt::Alignment alignment() const
void emitGlobally(QQStyleKitExtendableControlType controlType, CHANGED_SIGNALS... changedSignals) const
QQStyleKitTextProperties * first() const
void rightPaddingChanged()
QQStyleKitTextProperties * second() const
void leftPaddingChanged()
qreal leftPadding() const
Combined button and popup list for selecting options.
constexpr PropertyPathId subtypeStorageSpaceSize
constexpr PropertyPathId stateStorageSpaceSize
constexpr PropertyPathId maxPropertyStorageSpaceSize
constexpr PropertyPathId nestedGroupCount
constexpr PropertyPathId maxStateCombinationCount
constexpr PropertyPathId nestedGroupsStartSize
constexpr PropertyPathId subtypeCount