aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickbuttongroup_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/quicktemplates2/qquickbuttongroup_p.h')
-rw-r--r--src/quicktemplates2/qquickbuttongroup_p.h25
1 files changed, 23 insertions, 2 deletions
diff --git a/src/quicktemplates2/qquickbuttongroup_p.h b/src/quicktemplates2/qquickbuttongroup_p.h
index bb32ed5c..84ddd225 100644
--- a/src/quicktemplates2/qquickbuttongroup_p.h
+++ b/src/quicktemplates2/qquickbuttongroup_p.h
@@ -51,6 +51,7 @@
#include <QtCore/qobject.h>
#include <QtQuickTemplates2/private/qtquicktemplates2global_p.h>
#include <QtQml/qqml.h>
+#include <QtQml/qqmlparserstatus.h>
QT_BEGIN_NAMESPACE
@@ -59,11 +60,16 @@ class QQuickButtonGroupPrivate;
class QQuickButtonGroupAttached;
class QQuickButtonGroupAttachedPrivate;
-class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickButtonGroup : public QObject
+class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickButtonGroup : public QObject, public QQmlParserStatus
{
Q_OBJECT
- Q_PROPERTY(QQuickAbstractButton *checkedButton READ checkedButton WRITE setCheckedButton NOTIFY checkedButtonChanged)
+ Q_PROPERTY(QQuickAbstractButton *checkedButton READ checkedButton WRITE setCheckedButton NOTIFY checkedButtonChanged FINAL)
Q_PROPERTY(QQmlListProperty<QQuickAbstractButton> buttons READ buttons NOTIFY buttonsChanged FINAL)
+ // 2.3 (Qt 5.10)
+ Q_PROPERTY(bool exclusive READ isExclusive WRITE setExclusive NOTIFY exclusiveChanged FINAL REVISION 3)
+ // 2.4 (Qt 5.11)
+ Q_PROPERTY(Qt::CheckState checkState READ checkState WRITE setCheckState NOTIFY checkStateChanged FINAL REVISION 4)
+ Q_INTERFACES(QQmlParserStatus)
public:
explicit QQuickButtonGroup(QObject *parent = nullptr);
@@ -76,6 +82,13 @@ public:
QQmlListProperty<QQuickAbstractButton> buttons();
+ bool isExclusive() const;
+ void setExclusive(bool exclusive);
+
+ // 2.4 (Qt 5.11)
+ Qt::CheckState checkState() const;
+ void setCheckState(Qt::CheckState state);
+
public Q_SLOTS:
void addButton(QQuickAbstractButton *button);
void removeButton(QQuickAbstractButton *button);
@@ -85,6 +98,14 @@ Q_SIGNALS:
void buttonsChanged();
// 2.1 (Qt 5.8)
Q_REVISION(1) void clicked(QQuickAbstractButton *button);
+ // 2.3 (Qt 5.10)
+ Q_REVISION(3) void exclusiveChanged();
+ // 2.4 (Qt 5.11)
+ Q_REVISION(4) void checkStateChanged();
+
+protected:
+ void classBegin() override;
+ void componentComplete() override;
private:
Q_DISABLE_COPY(QQuickButtonGroup)