diff options
author | Antti Hölttä <AHoelttae@luxoft.com> | 2018-11-13 15:40:13 +0100 |
---|---|---|
committer | Antti Hölttä <AHoelttae@luxoft.com> | 2019-03-18 16:33:53 +0100 |
commit | c9a97de34ca56d4cab671beeeb6d27a66ac3da4e (patch) | |
tree | 652a2fc55284fa22506795eccb2e043aa18446b5 /plugin/spatialnavigation360.h | |
parent | 67dd94b0daecc445bbd3af7b5956ddcbdbdb5f39 (diff) |
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.
Diffstat (limited to 'plugin/spatialnavigation360.h')
-rw-r--r-- | plugin/spatialnavigation360.h | 29 |
1 files changed, 29 insertions, 0 deletions
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<CursorNavigationAttached*> &candidates, + const CursorNavigationAttached *currentItem, + const CursorNavigationCommand& cmd); + +private: + +}; + +#endif // SPATIALNAVIGATION360_H |