aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickbuttongroup_p.h
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2017-02-02 23:19:04 +0100
committerJ-P Nurmi <jpnurmi@qt.io>2017-04-28 07:37:43 +0000
commit7fe5e4c6858a74db582d95fae29a591b40ff7cdd (patch)
tree1b24766595edf6db80b7b75a74e2897b2bc65e76 /src/quicktemplates2/qquickbuttongroup_p.h
parentea470e8d612e5aa8c12eb3393baf057b8e8149e4 (diff)
Add ButtonGroup::exclusive
[ChangeLog][Controls][ButtonGroup] Added exclusive property to allow creating non-exclusive button groups. Change-Id: Ic2f3f4bac852f03e5c25f9010993d62234a71e0b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickbuttongroup_p.h')
-rw-r--r--src/quicktemplates2/qquickbuttongroup_p.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/quicktemplates2/qquickbuttongroup_p.h b/src/quicktemplates2/qquickbuttongroup_p.h
index 21deb035..5fe1858d 100644
--- a/src/quicktemplates2/qquickbuttongroup_p.h
+++ b/src/quicktemplates2/qquickbuttongroup_p.h
@@ -64,6 +64,7 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickButtonGroup : public QObject
Q_OBJECT
Q_PROPERTY(QQuickAbstractButton *checkedButton READ checkedButton WRITE setCheckedButton NOTIFY checkedButtonChanged)
Q_PROPERTY(QQmlListProperty<QQuickAbstractButton> buttons READ buttons NOTIFY buttonsChanged FINAL)
+ Q_PROPERTY(bool exclusive READ isExclusive WRITE setExclusive NOTIFY exclusiveChanged FINAL REVISION 3)
public:
explicit QQuickButtonGroup(QObject *parent = nullptr);
@@ -76,6 +77,9 @@ public:
QQmlListProperty<QQuickAbstractButton> buttons();
+ bool isExclusive() const;
+ void setExclusive(bool exclusive);
+
public Q_SLOTS:
void addButton(QQuickAbstractButton *button);
void removeButton(QQuickAbstractButton *button);
@@ -83,6 +87,7 @@ public Q_SLOTS:
Q_SIGNALS:
void checkedButtonChanged();
void buttonsChanged();
+ Q_REVISION(3) void exclusiveChanged();
Q_REVISION(1) void clicked(QQuickAbstractButton *button);
private: