diff options
author | Antti Hölttä <AHoelttae@luxoft.com> | 2019-02-19 15:36:39 +0100 |
---|---|---|
committer | Antti Hölttä <AHoelttae@luxoft.com> | 2019-03-18 16:42:31 +0100 |
commit | 8489f36322c585ec78199e6eb183000c74afae19 (patch) | |
tree | 8989b7cf6275b8b6cbffaa3b44467f5bd4ecdbf5 /plugin/plugin.cpp | |
parent | a5120f26d509a3464c79404de84e9428b8ddc690 (diff) |
Add redirect feature for manually fine tuning the cursor's movement
Cursornavigation now has a property redirects, that allows defining
exceptions to the navigation behaviour. A redirect allows defining
a starting and an ending angle and a target object.
If the move command's direction falls between the limits, the algorithm
is bypassed and cursor is moved to the target object.
Diffstat (limited to 'plugin/plugin.cpp')
-rw-r--r-- | plugin/plugin.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/plugin/plugin.cpp b/plugin/plugin.cpp index 26d156a..87cc430 100644 --- a/plugin/plugin.cpp +++ b/plugin/plugin.cpp @@ -1,5 +1,6 @@ #include "plugin.h" #include "cursornavigation.h" +#include "redirect.h" #include "qqml.h" CursorNavigationPlugin::CursorNavigationPlugin() @@ -10,4 +11,5 @@ void CursorNavigationPlugin::registerTypes(const char *uri) { qmlRegisterUncreatableType<CursorNavigation>(uri, 1, 0, "CursorNavigation", QStringLiteral("CursorNavigation is not creatable, use the attached properties.")); + qmlRegisterType<Redirect>(uri, 1, 0, "Redirect"); } |