19 const bool isWrite = subclass() == QQSK::Subclass::QQStyleKitState;
21 if (!QQStyleKitPropertyResolver::hasLocalStyleProperty(
this, QQSK::Property::Variations)) {
23
24
25
26
27
28
29
30
31
32 auto *newList =
new QList<QQStyleKitVariation *>();
33 setStyleProperty(QQSK::Property::Variations, newList);
38
39 const QVariant variant = QQStyleKitPropertyResolver::readStyleProperty(
this, QQSK::Property::Variations);
40 if (!variant.isValid()) {
42 static auto *emptyList =
new QList<QQStyleKitVariation *>();
46 const auto value = qvariant_cast<QList<QQStyleKitVariation *> *>(variant);
57 return m_storage.value(key);
60void QQStyleKitControl::writeStyleProperty(PropertyStorageId key,
const QVariant &value)
62 m_storage.insert(key, value);
73 const auto &controlsMap = controls()->m_controls;
74 Q_ASSERT(std::find(controlsMap.begin(), controlsMap.end(),
this) != controlsMap.end());
90 if (m_variations == variations)
94
95
98 m_variations = variations;
99 emit variationsChanged();
104 return m_controlType;
109 if (m_controlType == type)
112 m_controlType = type;
113 emit controlTypeChanged();
118#include "moc_qqstylekitcontrol_p.cpp"
void setControlType(QQStyleKitExtendableControlType type)
QStringList variations() const
void setVariations(const QStringList &variations)
QQStyleKitExtendableControlType controlType()
QQmlListProperty< QQStyleKitVariation > variations()
Combined button and popup list for selecting options.