aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickdialogbuttonbox_p.h
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2018-02-15 13:55:50 +0100
committerJ-P Nurmi <jpnurmi@qt.io>2018-02-17 13:28:09 +0000
commit5313a2b3fd9fe83b20b3e589f29e744be5fcab38 (patch)
tree93ba98a425577cbdb73dc4a3f60be003d6b00aa5 /src/quicktemplates2/qquickdialogbuttonbox_p.h
parentf6eb6a3661f5c8c47c539d38b5bcb0a33c22d904 (diff)
Add DialogButtonBox::buttonLayout
[ChangeLog][Controls][DialogButtonBox] Added buttonLayout property that can be used to arrange the buttons. Change-Id: I9160e5df86a0c9444b45ed9f585c50166c145671 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickdialogbuttonbox_p.h')
-rw-r--r--src/quicktemplates2/qquickdialogbuttonbox_p.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/quicktemplates2/qquickdialogbuttonbox_p.h b/src/quicktemplates2/qquickdialogbuttonbox_p.h
index 1e3cdeef..df302e54 100644
--- a/src/quicktemplates2/qquickdialogbuttonbox_p.h
+++ b/src/quicktemplates2/qquickdialogbuttonbox_p.h
@@ -66,6 +66,8 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickDialogButtonBox : public QQuickCont
Q_PROPERTY(Qt::Alignment alignment READ alignment WRITE setAlignment RESET resetAlignment NOTIFY alignmentChanged FINAL)
Q_PROPERTY(QPlatformDialogHelper::StandardButtons standardButtons READ standardButtons WRITE setStandardButtons NOTIFY standardButtonsChanged FINAL)
Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged FINAL)
+ // 2.5 (Qt 5.12)
+ Q_PROPERTY(ButtonLayout buttonLayout READ buttonLayout WRITE setButtonLayout RESET resetButtonLayout NOTIFY buttonLayoutChanged FINAL REVISION 5)
Q_FLAGS(QPlatformDialogHelper::StandardButtons)
public:
@@ -94,6 +96,24 @@ public:
static QQuickDialogButtonBoxAttached *qmlAttachedProperties(QObject *object);
+ // 2.5 (Qt 5.12)
+
+ // ### TODO: use Q_ENUMS(QPlatformDialogHelper::ButtonLayout)
+ enum ButtonLayout {
+ UnknownLayout = -1,
+ WinLayout,
+ MacLayout,
+ KdeLayout,
+ GnomeLayout,
+ MacModelessLayout,
+ AndroidLayout
+ };
+ Q_ENUM(ButtonLayout)
+
+ ButtonLayout buttonLayout() const;
+ void setButtonLayout(ButtonLayout layout);
+ void resetButtonLayout();
+
Q_SIGNALS:
void accepted();
void rejected();
@@ -107,6 +127,8 @@ Q_SIGNALS:
Q_REVISION(3) void applied();
Q_REVISION(3) void reset();
Q_REVISION(3) void discarded();
+ // 2.5 (Qt 5.12)
+ Q_REVISION(5) void buttonLayoutChanged();
protected:
void updatePolish() override;