aboutsummaryrefslogtreecommitdiffstats
path: root/plugin/cursornavigationattached.h
diff options
context:
space:
mode:
authorAntti Hölttä <AHoelttae@luxoft.com>2018-11-06 15:39:36 +0100
committerAntti Hölttä <AHoelttae@luxoft.com>2019-03-18 16:31:43 +0100
commitfbe75056a6ca179504b33c74d741c540f5b22dcd (patch)
treec535cd55d285b8e2e6b9a450a88a8e316e5ba12f /plugin/cursornavigationattached.h
parent00fa5d9215d32124292fe3e45372acebac7b9d31 (diff)
More on scopes, works to some extent in the test program
Scope may be entered and escaped. Navigable items may have escape targets defined
Diffstat (limited to 'plugin/cursornavigationattached.h')
-rw-r--r--plugin/cursornavigationattached.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/plugin/cursornavigationattached.h b/plugin/cursornavigationattached.h
index 1a8314c..0f3f927 100644
--- a/plugin/cursornavigationattached.h
+++ b/plugin/cursornavigationattached.h
@@ -20,6 +20,8 @@ class CursorNavigationAttached : public QObject
Q_PROPERTY(bool childHasCursor READ hasCursor NOTIFY hasCursorChanged)
//traps cursor. a trapped cursor can not be traversed outside of the item that traps it until the escape input is given
Q_PROPERTY(bool trapsCursor READ trapsCursor WRITE setTrapsCursor NOTIFY trapsCursorChanged)
+ //item to select when
+ Q_PROPERTY(QQuickItem *escapeTarget READ escapeTarget WRITE setEscapeTarget NOTIFY escapeTargetChanged)
public:
@@ -27,26 +29,30 @@ public:
~CursorNavigationAttached();
bool acceptsCursor() const;
- void setAcceptsCursor(bool acceptsCursor);
-
bool hasCursor() const;
-
bool trapsCursor() const;
- void setTrapsCursor(bool trapsCursor);
+ QQuickItem *escapeTarget() const;
QQuickItem *item() const;
+public slots:
+ void setAcceptsCursor(bool acceptsCursor);
+ void setTrapsCursor(bool trapsCursor);
+ void setEscapeTarget(QQuickItem * escapeTarget);
+
signals:
void acceptsCursorChanged(bool acceptsCursor);
void hasCursorChanged(bool hasCursor);
void trapsCursorChanged(bool trapsCursor);
+ void escapeTargetChanged(QQuickItem * escapeTarget);
+
private slots:
void onWindowChanged(QQuickWindow *window);
private:
void setHasCursor(bool hasCursor);
- QList<CursorNavigationAttached*> &siblings();
+ //QList<CursorNavigationAttached*> &siblings();
CursorNavigation *m_cursorNavigation;
CursorNavigationAttached *m_parentNavigable;
@@ -57,6 +63,7 @@ private:
bool m_trapsCursor;
friend class CursorNavigation;
+ QQuickItem * m_escapeTarget;
};
#endif // CURSORNAVIGATIONATTACHED_H