From c9a97de34ca56d4cab671beeeb6d27a66ac3da4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antti=20H=C3=B6ltt=C3=A4?= Date: Tue, 13 Nov 2018 15:40:13 +0100 Subject: Add 360 algorithm Add algorithm that allows navigation to any direction. Works somewhat well now. Example app has a page with a gamepad/stick support. --- plugin/spatialnavigation360.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 plugin/spatialnavigation360.h (limited to 'plugin/spatialnavigation360.h') diff --git a/plugin/spatialnavigation360.h b/plugin/spatialnavigation360.h new file mode 100644 index 0000000..3b9cdb9 --- /dev/null +++ b/plugin/spatialnavigation360.h @@ -0,0 +1,29 @@ +#ifndef SPATIALNAVIGATION360_H +#define SPATIALNAVIGATION360_H + +#include "cursornavigationalgorithm.h" + +/* algorithm for stepless 360 cursor navigation + * + * idea: allow user customization by providing a set of variables to use for + * selecting a candidate. for these, the user may set tolerances and weights. + * tolerance affects the first step of finding candidates. weights are + * used when choosing between multiple candidates, that are fit within the tolerances + * + */ + +class SpatialNavigation360 : public CursorNavigationAlgorithm +{ +public: + SpatialNavigation360(); + + virtual CursorNavigationAttached* getNextCandidate( + const QList &candidates, + const CursorNavigationAttached *currentItem, + const CursorNavigationCommand& cmd); + +private: + +}; + +#endif // SPATIALNAVIGATION360_H -- cgit v1.2.3