20 Q_PROPERTY(QString key READ key WRITE setKey NOTIFY keyChanged)
21 Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
22 Q_PROPERTY(QVariant value READ value WRITE setValue RESET resetValue NOTIFY valueChanged)
23 Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged)
24 Q_CLASSINFO(
"DefaultProperty",
"delegate")
25#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
34 void setKey(QString key);
36 void setName(QString name);
38 void setValue(QVariant value);
41 QQmlComponent *delegate()
const;
42 void setDelegate(QQmlComponent *delegate);
48 void keyChanged(QString key);
49 void nameChanged(QString name);
50 void valueChanged(QVariant value);
51 void delegateChanged();
54 void onConfigValueChanged();
60 bool m_valueInitialized =
false;
61 QQmlComponent *m_delegate =
nullptr;
68 Q_PROPERTY(QString key READ key WRITE setKey NOTIFY keyChanged)
69 Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
70 Q_PROPERTY(
int level READ level CONSTANT)
71 Q_PROPERTY(
bool visible READ visible WRITE setVisible NOTIFY visibleChanged)
72 Q_PROPERTY(
int index READ index NOTIFY indexChanged)
73 Q_PROPERTY(QQmlListProperty<DTK_QUICK_NAMESPACE::SettingsOption> options READ options NOTIFY optionsChanged)
74 Q_PROPERTY(QQmlListProperty<DTK_QUICK_NAMESPACE::SettingsGroup> children READ children NOTIFY childrenChanged)
75 Q_PROPERTY(QQmlComponent *background READ background WRITE setBackground NOTIFY backgroundChanged)
76 Q_CLASSINFO(
"DefaultProperty",
"options")
77#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
87 void setKey(
const QString &key);
89 void setName(QString name);
91 void setLevel(
int level);
93 void setVisible(
bool visible);
94 QQmlListProperty<DTK_QUICK_NAMESPACE::SettingsOption> options();
95 QQmlListProperty<DTK_QUICK_NAMESPACE::SettingsGroup> children();
96 QQmlComponent *background()
const;
97 void setBackground(QQmlComponent *background);
102 void setIndex(
const int index);
104 static SettingsGroup *qmlAttachedProperties(QObject *
object);
107 void keyChanged(QString key);
108 void nameChanged(QString name);
109 void visibleChanged(
bool visible);
110 void optionsChanged();
111 void childrenChanged();
112 void backgroundChanged();
113 void indexChanged(
int index);
120 bool m_visible =
true;
122 QList<SettingsOption*> m_options;
123 QList<SettingsGroup*> m_children;
124 QQmlComponent * m_background =
nullptr;
137 virtual int count()
const override;
138#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0))
139 virtual QVariant variantValue(
int index,
const QString &name)
override;
140 virtual ReleaseFlags release(QObject *
object, ReusableFlag reusableFlag = NotReusable)
override;
142 virtual QString stringValue(
int index,
const QString &name)
override;
143 virtual ReleaseFlags release(QObject *
object)
override;
145 virtual void setWatchedRoles(
const QList<QByteArray> &roles)
override;
146 virtual QQmlIncubator::Status incubationStatus(
int index)
override;
147 virtual int indexOf(QObject *
object, QObject *objectContext)
const override;
190 Q_INTERFACES(QQmlParserStatus)
191 Q_PROPERTY(
DConfigWrapper *config READ config WRITE setConfig NOTIFY configChanged)
192 Q_PROPERTY(QQmlListProperty<DTK_QUICK_NAMESPACE::SettingsGroup> groups READ groups NOTIFY groupsChanged)
194 Q_PROPERTY(QQmlComponent *contentTitle READ contentTitle WRITE setContentTitle NOTIFY contentTitleChanged)
195 Q_PROPERTY(QQmlComponent *contentBackground READ contentBackground WRITE setContentBackground NOTIFY contentBackgroundChanged)
197 Q_PROPERTY(QQmlComponent *navigationTitle READ navigationTitle WRITE setNavigationTitle NOTIFY navigationTitleChanged)
198 Q_CLASSINFO(
"DefaultProperty",
"groups")
199#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
209 QQmlListProperty<DTK_QUICK_NAMESPACE::SettingsGroup> groups();
212 QQmlComponent *contentTitle()
const;
213 void setContentTitle(QQmlComponent *delegate);
214 QQmlComponent *navigationTitle()
const;
215 void setNavigationTitle(QQmlComponent *delegate);
216 void setContentBackground(QQmlComponent * contentBackground);
217 QQmlComponent *contentBackground()
const;
219 QVector<SettingsGroup *> groupList()
const;
220 QQmlContext *creationContext();
222 virtual void classBegin()
override;
223 virtual void componentComplete()
override;
226 void setGroupVisible(
const QString &key,
bool visible);
227 bool groupVisible(
const QString &key)
const;
228 void resetSettings();
231 void onGroupVisibleChanged(
bool visible);
234 void groupsChanged();
235 void navigationTitleChanged();
236 void contentTitleChanged();
237 void contentModelChanged();
238 void navigationModelChanged();
239 void configChanged();
240 void contentBackgroundChanged();
243 QList<SettingsGroup*> m_groups;
246 QQmlComponent *m_contentTitle =
nullptr;
247 QQmlComponent *m_navigationTitle =
nullptr;
248 QQmlComponent * m_contentBackground =
nullptr;
Definition dsettingscontainer_p.h:160