diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2016-11-04 12:54:38 +0100 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2016-11-09 11:43:49 +0000 |
commit | 372c5b44e5bc2730c3557cf56bffc5496ab020f3 (patch) | |
tree | 02ff1d36bdbd9bb6544fa5f21728dcfa5f9b404e /src/quicktemplates2/qquickcombobox_p.h | |
parent | befe5e0dca3b5af7ffa48b0f66794b083d43656f (diff) |
Add QQuickComboBox::down
This allows us to replace all "control.pressed || popup.visible"
expressions with "control.down", and takes us one step closer to
deferred popop execution as mentioned in the previous commit. In
order to be able to defer the popup execution, we must get rid of
such explicit references to the popup.
Change-Id: Ifa7ecf8201912d3ec1bca232e2cf600e3886715e
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickcombobox_p.h')
-rw-r--r-- | src/quicktemplates2/qquickcombobox_p.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/quicktemplates2/qquickcombobox_p.h b/src/quicktemplates2/qquickcombobox_p.h index 3788d56a..1feab73c 100644 --- a/src/quicktemplates2/qquickcombobox_p.h +++ b/src/quicktemplates2/qquickcombobox_p.h @@ -63,7 +63,8 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickComboBox : public QQuickControl Q_PROPERTY(QVariant model READ model WRITE setModel NOTIFY modelChanged FINAL) Q_PROPERTY(QQmlInstanceModel *delegateModel READ delegateModel NOTIFY delegateModelChanged FINAL) Q_PROPERTY(bool flat READ isFlat WRITE setFlat NOTIFY flatChanged FINAL REVISION 1) - Q_PROPERTY(bool pressed READ isPressed WRITE setPressed NOTIFY pressedChanged FINAL) + Q_PROPERTY(bool down READ isDown WRITE setDown RESET resetDown NOTIFY downChanged FINAL REVISION 2) + Q_PROPERTY(bool pressed READ isPressed WRITE setPressed NOTIFY pressedChanged FINAL) // ### Qt 6: should not be writable Q_PROPERTY(int highlightedIndex READ highlightedIndex NOTIFY highlightedIndexChanged FINAL) Q_PROPERTY(int currentIndex READ currentIndex WRITE setCurrentIndex NOTIFY currentIndexChanged FINAL) Q_PROPERTY(QString currentText READ currentText NOTIFY currentTextChanged FINAL) @@ -86,6 +87,10 @@ public: bool isFlat() const; void setFlat(bool flat); + bool isDown() const; + void setDown(bool down); + void resetDown(); + bool isPressed() const; void setPressed(bool pressed); @@ -124,6 +129,7 @@ Q_SIGNALS: void modelChanged(); void delegateModelChanged(); Q_REVISION(1) void flatChanged(); + Q_REVISION(2) void downChanged(); void pressedChanged(); void highlightedIndexChanged(); void currentIndexChanged(); |