aboutsummaryrefslogtreecommitdiffstats
path: root/plugin/cursornavigation.h
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/cursornavigation.h')
-rw-r--r--plugin/cursornavigation.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/plugin/cursornavigation.h b/plugin/cursornavigation.h
index 96c5e67..956d900 100644
--- a/plugin/cursornavigation.h
+++ b/plugin/cursornavigation.h
@@ -4,13 +4,14 @@
#include "cursornavigationattached.h"
#include "inputtypes.h"
#include "inputadapter.h"
+#include "spatialnavigation360.h"
+#include "spatialnavigation4dir.h"
#include <QObject>
#include <qqml.h>
#include <QStack>
class QQuickItem;
-class CursorNavigationAlgorithm;
class CursorNavigation : public QObject
{
@@ -19,7 +20,10 @@ class CursorNavigation : public QObject
public:
CursorNavigation(QQuickWindow *parent);
- bool inputCommand(const CursorNavigationCommand &cmd);
+ //bool inputCommand(const CursorNavigationCommand &cmd);
+ void move(qreal angle, qreal tolerance, bool discrete);
+ void move(const QVector2D& vector, qreal tolerance, bool discrete);
+ void action(Action action);
static CursorNavigationAttached *qmlAttachedProperties(QObject *object);
@@ -33,15 +37,16 @@ private:
void registerItem(CursorNavigationAttached* item);
void unregisterItem(CursorNavigationAttached* item);
- bool handleDirectionCommand(const CursorNavigationCommand &cmd);
- bool handleActionCommand(const CursorNavigationCommand &cmd);
+ bool handleMove(const CursorNavigationCommand &cmd, bool discrete);
private:
static const char windowPropertyName[];
QQuickWindow *m_window;
InputAdapter m_inputAdapter;
CursorNavigationAttached *m_currentItem; //item that currently has the cursor
- QList<CursorNavigationAlgorithm*> m_algorithms;
+ //QList<CursorNavigationAlgorithm*> m_algorithms;
+ SpatialNavigation360 m_navigation360;
+ SpatialNavigation4Dir m_navigation4Dir;
//a root item that is not tied to any actual QQuickItem
CursorNavigationAttached *m_rootItem;
//QStack<CursorNavigationAttached*> m_scopeStack;