diff options
Diffstat (limited to 'src/quicktemplates2/qquickcombobox_p.h')
-rw-r--r-- | src/quicktemplates2/qquickcombobox_p.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/quicktemplates2/qquickcombobox_p.h b/src/quicktemplates2/qquickcombobox_p.h index b1491ac5..6bbbe3b7 100644 --- a/src/quicktemplates2/qquickcombobox_p.h +++ b/src/quicktemplates2/qquickcombobox_p.h @@ -52,6 +52,7 @@ QT_BEGIN_NAMESPACE +class QValidator; class QQuickPopup; class QQmlInstanceModel; class QQuickComboBoxPrivate; @@ -62,6 +63,7 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickComboBox : public QQuickControl Q_PROPERTY(int count READ count NOTIFY countChanged FINAL) Q_PROPERTY(QVariant model READ model WRITE setModel NOTIFY modelChanged FINAL) Q_PROPERTY(QQmlInstanceModel *delegateModel READ delegateModel NOTIFY delegateModelChanged FINAL) + Q_PROPERTY(bool editable READ isEditable WRITE setEditable NOTIFY editableChanged FINAL REVISION 2) Q_PROPERTY(bool flat READ isFlat WRITE setFlat NOTIFY flatChanged FINAL REVISION 1) 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 @@ -69,10 +71,15 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickComboBox : public QQuickControl Q_PROPERTY(int currentIndex READ currentIndex WRITE setCurrentIndex NOTIFY currentIndexChanged FINAL) Q_PROPERTY(QString currentText READ currentText NOTIFY currentTextChanged FINAL) Q_PROPERTY(QString displayText READ displayText WRITE setDisplayText RESET resetDisplayText NOTIFY displayTextChanged FINAL) + Q_PROPERTY(QString editText READ editText WRITE setEditText RESET resetEditText NOTIFY editTextChanged FINAL REVISION 2) Q_PROPERTY(QString textRole READ textRole WRITE setTextRole NOTIFY textRoleChanged FINAL) Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged FINAL) Q_PROPERTY(QQuickItem *indicator READ indicator WRITE setIndicator NOTIFY indicatorChanged FINAL) Q_PROPERTY(QQuickPopup *popup READ popup WRITE setPopup NOTIFY popupChanged FINAL) + Q_PROPERTY(QValidator *validator READ validator WRITE setValidator NOTIFY validatorChanged FINAL REVISION 2) + Q_PROPERTY(Qt::InputMethodHints inputMethodHints READ inputMethodHints WRITE setInputMethodHints NOTIFY inputMethodHintsChanged FINAL REVISION 2) + Q_PROPERTY(bool inputMethodComposing READ isInputMethodComposing NOTIFY inputMethodComposingChanged FINAL REVISION 2) + Q_PROPERTY(bool acceptableInput READ hasAcceptableInput NOTIFY acceptableInputChanged FINAL REVISION 2) public: explicit QQuickComboBox(QQuickItem *parent = nullptr); @@ -84,6 +91,9 @@ public: void setModel(const QVariant &model); QQmlInstanceModel *delegateModel() const; + bool isEditable() const; + void setEditable(bool editable); + bool isFlat() const; void setFlat(bool flat); @@ -105,6 +115,10 @@ public: void setDisplayText(const QString &text); void resetDisplayText(); + QString editText() const; + void setEditText(const QString &text); + void resetEditText(); + QString textRole() const; void setTextRole(const QString &role); @@ -117,17 +131,28 @@ public: QQuickPopup *popup() const; void setPopup(QQuickPopup *popup); + QValidator *validator() const; + void setValidator(QValidator *validator); + + Qt::InputMethodHints inputMethodHints() const; + void setInputMethodHints(Qt::InputMethodHints hints); + + bool isInputMethodComposing() const; + bool hasAcceptableInput() const; + Q_INVOKABLE QString textAt(int index) const; Q_INVOKABLE int find(const QString &text, Qt::MatchFlags flags = Qt::MatchExactly) const; public Q_SLOTS: void incrementCurrentIndex(); void decrementCurrentIndex(); + Q_REVISION(2) void selectAll(); Q_SIGNALS: void countChanged(); void modelChanged(); void delegateModelChanged(); + Q_REVISION(2) void editableChanged(); Q_REVISION(1) void flatChanged(); Q_REVISION(2) void downChanged(); void pressedChanged(); @@ -135,16 +160,25 @@ Q_SIGNALS: void currentIndexChanged(); void currentTextChanged(); void displayTextChanged(); + Q_REVISION(2) void editTextChanged(); void textRoleChanged(); void delegateChanged(); void indicatorChanged(); void popupChanged(); + Q_REVISION(2) void validatorChanged(); + Q_REVISION(2) void inputMethodHintsChanged(); + Q_REVISION(2) void inputMethodComposingChanged(); + Q_REVISION(2) void acceptableInputChanged(); void activated(int index); void highlighted(int index); + Q_REVISION(2) void accepted(); protected: + bool eventFilter(QObject *object, QEvent *event) override; + void focusInEvent(QFocusEvent *event) override; void focusOutEvent(QFocusEvent *event) override; + void inputMethodEvent(QInputMethodEvent *event) override; void keyPressEvent(QKeyEvent *event) override; void keyReleaseEvent(QKeyEvent *event) override; void mousePressEvent(QMouseEvent *event) override; @@ -154,6 +188,8 @@ protected: void wheelEvent(QWheelEvent *event) override; void componentComplete() override; + void contentItemChange(QQuickItem *newItem, QQuickItem *oldItem) override; + void localeChange(const QLocale &newLocale, const QLocale &oldLocale) override; QFont defaultFont() const override; |