From 2f9d0346f00e37725f0f1bce1318501a25c5e438 Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Fri, 22 Feb 2013 13:44:06 +0100 Subject: Support activeFocusOnTab in QQuickItem Add activeFocusOnTab as property to QQuickItem. Setting the property allows automatic keyboard navigation between all elements that have it set. This key event handler will only be called after the QML key handlers, such as KeyNavigation and Keys, and the C++ key event handlers, such as keyPressEvent function. Algorithm is most done by Frederik Gladhorn, in cooperation with Gabriel de Dietrich. Done-with: Frederik Gladhorn Done-with: Gabriel de Dietrich Change-Id: I8b58be9c20d113661fe85d27bdb1af84340d9de5 Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com> Reviewed-by: Frederik Gladhorn --- src/quick/items/qquickitem.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/quick/items/qquickitem.h') diff --git a/src/quick/items/qquickitem.h b/src/quick/items/qquickitem.h index 71681698b9..c37bc10bdd 100644 --- a/src/quick/items/qquickitem.h +++ b/src/quick/items/qquickitem.h @@ -132,6 +132,7 @@ class Q_QUICK_EXPORT QQuickItem : public QObject, public QQmlParserStatus Q_PROPERTY(bool focus READ hasFocus WRITE setFocus NOTIFY focusChanged FINAL) Q_PROPERTY(bool activeFocus READ hasActiveFocus NOTIFY activeFocusChanged FINAL) + Q_PROPERTY(bool activeFocusOnTab READ activeFocusOnTab WRITE setActiveFocusOnTab NOTIFY activeFocusOnTabChanged FINAL) Q_PROPERTY(qreal rotation READ rotation WRITE setRotation NOTIFY rotationChanged) Q_PROPERTY(qreal scale READ scale WRITE setScale NOTIFY scaleChanged) @@ -261,6 +262,9 @@ public: bool smooth() const; void setSmooth(bool); + bool activeFocusOnTab() const; + void setActiveFocusOnTab(bool); + bool antialiasing() const; void setAntialiasing(bool); @@ -345,6 +349,7 @@ Q_SIGNALS: void stateChanged(const QString &); void focusChanged(bool); void activeFocusChanged(bool); + void activeFocusOnTabChanged(bool); void parentChanged(QQuickItem *); void transformOriginChanged(TransformOrigin); void smoothChanged(bool); -- cgit v1.2.3