QInputAspect: set the Window to be used for events monitoring

Change-Id: Ia119595d728aa2eb02e58bbf2a5080f0590ee3d5
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
KeyboardEventFilter added

This will be used by the InputHandler to monitor events on a QWindow.
Key events will be store to be processed later on in an Aspect Job.

Change-Id: I01d5f8fbbc735dca9b554b2d1a39c8e19dc1996b
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
InputHandler: install KeyboardEventFilter on QWindow

Change-Id: I83a72ad3f05ec7932ba97ba10cf996cf357499cf
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
InputHandler/KeyboardEventFilter: QKeyEvents are stored

This will allow AspectJob to process those events for the next frame. Uses a
QMutex to protect concurrent accesses.

Change-Id: Iae925bbf9e27d4c1712b72ff74c2ca3e2974ecaa
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
QComponent: add array of referenced entities

This will allow us to easily check which entities reference a given
component. This will make sharing components easier and avoid us having to
have RenderEntity like classes in every aspect just to check if a Component
is being referenced.

Change-Id: Ie6876dba334249c10f93a8f815dc45c31a83c755
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
QInputAspect: Create backend nodes for frontend ones

Change-Id: Ic70314b8deb39c7f7834c32ab50047369fbdd0f6
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
QNode: protected QSceneInterface* getter

When receiving changes from the backend, it may be useful to have QNode
subclasses have access to the QSceneInterface so that they can lookup a
frontend node from a QNodeUuid without forcing the user to use the
QNodePrivate class.

Change-Id: I6afa6e2a1468419e87fe3a2f9eae4a453a2f048a
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
QKeyboardController added activeInput property

This will offer a way to access the QKeyboardInput that currently has the
focus.

Change-Id: I3080cdfa9a495a8245b6600c61f8a393eb51ed14
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
KeyboardController: empty requestFocusForInput method

Will be completed in a follow up patch.

Change-Id: I487100de5604f9d7f09469e029a5db52fb5a318a
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
KeyboardInput reacts when QKeyboardInput requests focus

In turn, KeyboardInput also updates QKeyboardInput when the focus changes,
some more piping needed to make all of this work.

Change-Id: I4fce87e0fa43407bd791414feb2b6ad1183f6043
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
KeyboardController: vector of KeyboardInputs and last requester saved

Contains a vector of QNodeUuid and a vector of HKeyboardInput containing
references to KeyboardInput that are managed by the controller.
Saves the id of the last KeyboardInput requesting focus, this will be the one
to have focus next frame.

Change-Id: I15bca4f445c9bed79cb270ef65fddd73002518f9
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
AssingKeyboardFocusJob added

This job should be run once per KeyboardController when the KeyboardInput
requesting focus changes.
This will decide which KeyboardInput should have the focus.

Change-Id: Icbaae802743e249119b7be9838db6a000614fec3
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
KeyboardInput: register/unregister ourselves with KeyboardController

Change-Id: I03d597d8403abc7399986588278fc71b1536c6c6
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
InputHandler maintains a vector of HKeyboardController

This will allow to easily loop over each active KeyboardController when we
need to create jobs.

Change-Id: Id7d8759c5a5ca75757046d49893599a0182bc878
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
KeyboardController: holds the id of the current focused input

Comparing that id to the last input to request focus will easily let us know
whether we need to create an AssignKeyboardFocus job or not.

Change-Id: Ia6e793abd1a7e0f57df520835fe7f9308351e067
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
InputHandler has a keyboardJob method

Returs a QVector of AspectJob to be performed for keyboard
handling. Internally handles all the dependencies between jobs.

Change-Id: Icfc2aa66dc716ffbadf341b77430bbbee3eb84c6
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
keyboardinput-qml example updated

Assign default focus property to center sphere and correction on scale-focus
binding.

Change-Id: Ida77a16b68a6935053aa0cc34ab9dbfb03b7893d
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
KeyEventDispatcherJob added

This jobs will take care of forwading all the pending key events to the input
that has focus for each controller.

Change-Id: Ic5a2c48af7da5c0cf421b08d3f7827cf8465f093
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
InputHandler keyboardJobs

Adds a dispatch keyboard events job. pendingKeyEvents now clears the
pendingKeyEvents list as well so that we clear only the number of
events that will be processed by the job for the current frame.

Change-Id: I2f5e604733d5ad5cd243b9997adc4c6ebdcdbe19
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Q3DKeyEvent wrapper around QKeyEvent

This is needed as we can only register QObject subclasses to QML.
Based on QQuickKeyEvent. Ideally both classes could be merge in a single one
in Qt6.

Change-Id: Iaa47beaf5fb295a6089272f8be843130bdebcd1d
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>