diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2018-02-13 15:00:27 +0100 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2018-02-13 19:22:58 +0000 |
commit | 71d5afa10c297db4aabd032f992fb93fbaaf5470 (patch) | |
tree | 10c8d2714e0d0be35309a04d4a222db362ab1d24 /src/quicktemplates2/qquickpopup_p.h | |
parent | 0b8160a26b8d1ebbb3ea74d697c77f91e6acc039 (diff) |
Add Popup::horizontal|verticalPadding
This commit is just exposing the newly added Control properties
in Popup. See the previous commit for details.
[ChangeLog][Controls][Popup] Added horizontalPadding and verticalPadding
properties as a convenient way to set both left and right, or top and bottom
paddings in one go.
Change-Id: I19a8190d323e63b5b3365aecdd81006cdd81f981
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickpopup_p.h')
-rw-r--r-- | src/quicktemplates2/qquickpopup_p.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/quicktemplates2/qquickpopup_p.h b/src/quicktemplates2/qquickpopup_p.h index 2a42ff27..9e2f3649 100644 --- a/src/quicktemplates2/qquickpopup_p.h +++ b/src/quicktemplates2/qquickpopup_p.h @@ -121,6 +121,9 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickPopup : public QObject, public QQml Q_PROPERTY(bool mirrored READ isMirrored NOTIFY mirroredChanged FINAL REVISION 3) Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged FINAL REVISION 3) Q_PROPERTY(QPalette palette READ palette WRITE setPalette RESET resetPalette NOTIFY paletteChanged FINAL REVISION 3) + // 2.5 (Qt 5.12) + Q_PROPERTY(qreal horizontalPadding READ horizontalPadding WRITE setHorizontalPadding RESET resetHorizontalPadding NOTIFY horizontalPaddingChanged FINAL) + Q_PROPERTY(qreal verticalPadding READ verticalPadding WRITE setVerticalPadding RESET resetVerticalPadding NOTIFY verticalPaddingChanged FINAL) Q_CLASSINFO("DeferredPropertyNames", "background,contentItem") Q_CLASSINFO("DefaultProperty", "contentData") @@ -304,6 +307,15 @@ public: void setPalette(const QPalette &palette); void resetPalette(); + // 2.5 (Qt 5.12) + qreal horizontalPadding() const; + void setHorizontalPadding(qreal padding); + void resetHorizontalPadding(); + + qreal verticalPadding() const; + void setVerticalPadding(qreal padding); + void resetVerticalPadding(); + public Q_SLOTS: void open(); void close(); @@ -359,6 +371,9 @@ Q_SIGNALS: Q_REVISION(3) void mirroredChanged(); Q_REVISION(3) void enabledChanged(); Q_REVISION(3) void paletteChanged(); + // 2.5 (Qt 5.12) + Q_REVISION(5) void horizontalPaddingChanged(); + Q_REVISION(5) void verticalPaddingChanged(); protected: QQuickPopup(QQuickPopupPrivate &dd, QObject *parent); |