From a25814f4f251425ad1cec183823eaa0ea22e1435 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antti=20H=C3=B6ltt=C3=A4?= Date: Mon, 18 Mar 2019 13:58:29 +0100 Subject: Add existing isues as TODOs --- plugin/cursornavigation.cpp | 10 ++++++++++ plugin/cursornavigation.h | 2 ++ plugin/cursornavigationattached.cpp | 7 +++++++ plugin/cursornavigationattached.h | 1 + 4 files changed, 20 insertions(+) diff --git a/plugin/cursornavigation.cpp b/plugin/cursornavigation.cpp index e2b5856..1cce30f 100644 --- a/plugin/cursornavigation.cpp +++ b/plugin/cursornavigation.cpp @@ -225,6 +225,16 @@ void CursorNavigation::registerItem(CursorNavigationAttached* item) item->m_parentNavigable=m_rootItem; } + /* TODO fix unregistering and reregistering navigable items with navigable children + * + * currently, for est results, items should define if they accpet cursor already + * at the construction time. this will ensure that the tree is properly constructed + * currently, unregisterin a container, is going to unregister all of its + * navigable children too. reregisterin gthe container will reregister the children + * regitering a container after its navigable children have been registered, + * will not list the children under the container but as its siblings + */ + /* TODO reparenting from window to another kind of works, but reparenting * within a window not so well. problems arise when reaprenting items * contained in an item that is also navigable. for this to work, we would diff --git a/plugin/cursornavigation.h b/plugin/cursornavigation.h index ad1cf31..331726c 100644 --- a/plugin/cursornavigation.h +++ b/plugin/cursornavigation.h @@ -11,6 +11,8 @@ #include #include +//TODO remove useless debug prints and change over to categorized logging + class QQuickItem; class CursorNavigation : public QObject diff --git a/plugin/cursornavigationattached.cpp b/plugin/cursornavigationattached.cpp index 49fe5ae..232aaa9 100644 --- a/plugin/cursornavigationattached.cpp +++ b/plugin/cursornavigationattached.cpp @@ -241,6 +241,13 @@ QQmlListProperty CursorNavigationAttached::redirects() bool CursorNavigationAttached::available() const { + /* TODO think again if this is necessary or even limiting for the user + * reasons: all the conditions tested here can be done in the qml by the user if + * they see it necessary, eg; CursorNavigation.acceptsCursor : visible it could be useful to allow cursor also on + * disabled items (testing the intersection in qml is not that + * straightforward but enabling clipping sets clipped items invisible) + */ + if (m_acceptsCursor && item()->isVisible() && item()->isEnabled()) { QRectF parentRect(0,0,m_parentNavigable->item()->width(), m_parentNavigable->item()->height()); QRectF thisRect = item()->mapRectToItem(m_parentNavigable->item(), QRectF(0,0,item()->width(), item()->height())); diff --git a/plugin/cursornavigationattached.h b/plugin/cursornavigationattached.h index ed099c1..228fa47 100644 --- a/plugin/cursornavigationattached.h +++ b/plugin/cursornavigationattached.h @@ -108,6 +108,7 @@ private: bool m_trapsCursor; friend class CursorNavigation; + //TODO detect if the escape target is deleted QQuickItem * m_escapeTarget; QVector m_redirects; }; -- cgit v1.2.3