summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntti Hölttä <AHoelttae@luxoft.com>2019-03-18 13:58:29 +0100
committerAntti Hölttä <AHoelttae@luxoft.com>2019-03-18 16:43:30 +0100
commita25814f4f251425ad1cec183823eaa0ea22e1435 (patch)
tree573a7b5ecaefc135aed4e807880d5c9a29a18985
parentd62c290ee9e196b295f2dca172313c050b26dea4 (diff)
Add existing isues as TODOs
-rw-r--r--plugin/cursornavigation.cpp10
-rw-r--r--plugin/cursornavigation.h2
-rw-r--r--plugin/cursornavigationattached.cpp7
-rw-r--r--plugin/cursornavigationattached.h1
4 files changed, 20 insertions, 0 deletions
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 <qqml.h>
#include <QStack>
+//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<Redirect> 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<Redirect*> m_redirects;
};