diff options
author | J-P Nurmi <jpnurmi@theqtcompany.com> | 2015-11-01 19:18:31 +0100 |
---|---|---|
committer | J-P Nurmi <jpnurmi@theqtcompany.com> | 2015-11-03 09:35:49 +0000 |
commit | a108298bb9529dd1ad4b195849f3c1e12daa82bf (patch) | |
tree | 73510314439ab8c13764d1ed906b7e9154d53d15 /src/templates/qquickabstractbutton_p_p.h | |
parent | 92aa5333846081b294fc332e64f7e49b329edf92 (diff) |
Add AbstractButton::autoExclusive
This feature is adopted from QtWidgets' QAbstractButton. It's no longer
necessary to create an ExclusiveGroup to manage a simple list of radio
buttons:
Column {
RadioButton { text: "Option 1" }
RadioButton { text: "Option 2" }
}
Change-Id: Ib4cb718c3b3034c9c956b2f23db4b06b00547b8e
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Diffstat (limited to 'src/templates/qquickabstractbutton_p_p.h')
-rw-r--r-- | src/templates/qquickabstractbutton_p_p.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/templates/qquickabstractbutton_p_p.h b/src/templates/qquickabstractbutton_p_p.h index bfdadb19..dfa87e7f 100644 --- a/src/templates/qquickabstractbutton_p_p.h +++ b/src/templates/qquickabstractbutton_p_p.h @@ -52,6 +52,9 @@ QT_BEGIN_NAMESPACE +class QQuickAbstractButton; +class QQuickExclusiveGroup; + class QQuickAbstractButtonPrivate : public QQuickControlPrivate { Q_DECLARE_PUBLIC(QQuickAbstractButton) @@ -63,11 +66,15 @@ public: void startPressRepeat(); void stopPressRepeat(); + QQuickExclusiveGroup *exclusiveGroup() const; + QQuickAbstractButton *findCheckedButton() const; + QList<QQuickAbstractButton *> findExclusiveButtons() const; + QString text; bool pressed; bool checked; bool checkable; - bool exclusive; + bool autoExclusive; bool autoRepeat; int delayTimer; int repeatTimer; |