5#ifndef QQSTYLEKITGLOBAL_P_H
6#define QQSTYLEKITGLOBAL_P_H
23class QQSK:
public QObject
34 HandleSecond = 0x0010,
36 IndicatorForeground = 0x0040,
37 IndicatorFirst = 0x0080,
38 IndicatorFirstForeground = 0x0100,
39 IndicatorSecond = 0x0200,
40 IndicatorSecondForeground = 0x0400,
44 Q_DECLARE_FLAGS(Delegates, Delegate)
47 enum class PropertyGroup {
60
66
67
68
75 enum class PropertyPathFlag : quint8 {
77 DelegateSubtype0 = 0x1,
78 DelegateSubtype1 = 0x2,
79 DelegateSubtype2 = 0x4,
82 Q_DECLARE_FLAGS(PropertyPathFlags, PropertyPathFlag)
83 Q_FLAG(PropertyPathFlag)
135 enum class StateFlag {
147 Q_DECLARE_FLAGS(State, StateFlag)
150 enum class Subclass {
157 template <
typename T,
typename Owner,
typename... Args>
158 static inline T *lazyCreate(T *
const &ptr,
const Owner *self, Args&&... args)
161 auto *mutableSelf =
const_cast<Owner *>(self);
162 auto *&mutablePtr =
const_cast<T *&>(ptr);
163 mutablePtr =
new T(std::forward<Args>(args)..., mutableSelf);
169Q_DECLARE_OPERATORS_FOR_FLAGS(QQSK::State)
170Q_DECLARE_OPERATORS_FOR_FLAGS(QQSK::Delegates)
171Q_DECLARE_OPERATORS_FOR_FLAGS(QQSK::PropertyPathFlags)
173using PropertyPathId_t = quint32;
174using PropertyStorageId = quint32;
175using QQStyleKitExtendableControlType = quint32;
176using QQStyleKitPropertyStorage = QHash<PropertyStorageId, QVariant>;
182constexpr PropertyPathId_t subtypeCount = PropertyPathId_t(QQSK::PropertyPathFlag::DelegateSubtype2) - PropertyPathId_t(QQSK::PropertyPathFlag::DelegateSubtype0) + 1;
210
211
212
213 return m_groupStart + PropertyPathId_t(m_property);
218
219
220
221
222 Q_ASSERT(state != QQSK::StateFlag::Unspecified);
223 const PropertyPathId_t stateIndex = PropertyPathId_t(state) - 1;
224 const PropertyPathId_t stateStart = stateIndex * stateStorageSpaceSize;
225 return stateStart + pathId();
229 QQSK::Property m_property;
230 PropertyPathId_t m_groupStart;
QQSK::Property property() const
PropertyStorageId storageId(QQSK::State state) const
PropertyPathId_t pathId() const
QQStyleKitDelegateProperties * delegateStyle() const
~QQStyleKitDelegateContainer() override
bool usingDefaultDelegate() const
void usingDefaultDelegateChanged()
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
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)())
QQSK::PropertyPathFlags m_pathFlags
PropertyPathId propertyPathId(QQSK::Property property, PropertyPathId::Flag flag) const
void handleStylePropertiesChanged(CHANGED_SIGNALS... changedSignals)
bool isDefined(QQSK::Property property) const
QQStyleKitControlProperties * controlProperties() const
QString pathToString() const
bool isControlProperties() 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)
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_t nestedGroupCount
constexpr PropertyPathId_t nestedGroupsStartSize
constexpr PropertyPathId_t maxStateCombinationCount
constexpr PropertyPathId_t subtypeStorageSpaceSize
constexpr PropertyPathId_t stateStorageSpaceSize
constexpr PropertyPathId_t subtypeCount
constexpr PropertyPathId_t maxPropertyStorageSpaceSize