Details
-
Task
-
Resolution: Done
-
P2: Important
-
None
-
None
-
None
Description
Name: CursorManagement
Description: A plugin for enabling cursor based navigation in QML UIs. Moving the cursor is automatic, based on the location and geometry of user defined items.
Responsible persons: ahoelttae (AHoelttae@luxoft.com), vminenko
Desired repository name: qt-labs/cursormanagement
As a background, we have been working for some time on a focus/cursor handling plugin to be utilized in QML UIs. We have a working prototype and would like to further develop it along the Qt Automotive suite and use it in the Neptune3 UI.
The plugin is not a replacement for existing focus handling or key navigation, but adds more advanced features on top of them.
Cursor is an indicator for the target of user interactions in a GUI. In this case, it's more specifically a selector for individual UI elements, such as buttons, and not completely freely moving, like a mouse pointer. The purpose of the plugin is to provide a generic way of enabling cursor navigation in QML UIs with minimal configuration and ease of use in mind. Minimal configuration, in this case, would be in comparison to eg. Qt's existing key navigation, where the navigation path has to be defined explicitly on a per element basis.
Cursor navigation works by allowing the developer to define individual QML elements as navigable. The plugin's backend keeps track of the navigable items and their parent-child relations and position and geometry on the UI. Moving the cursor is handled by algorithms, and is based on the location and geometry of the items. There are 2 algorithm for spatial navigation: 4-way and free-directional. The simpler 4-way navigation is well suited for traditional, rectangular and structured UIs, while the 360-algorithm allows moving freely to any direction. The input might be coming from the keyboard or from any source, such as a gamepad.