summaryrefslogtreecommitdiffstats
path: root/src/input
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Fix multiple C++ documentation issuesTopi Reinio2015-04-143-0/+14
| | | | | | | | | | | | | | | | | | | - Remove multiple \namespace commands for namespace Qt3D. QDoc in 5.5 is now able to collate namespace members from multiple modules. - Mark 'Q...Private' classes and functions taking private arguments as \internal - Use correct \qtvariable for Qt 3D Core and Render - Add src/plugins directory to Qt 3D Core documentation build to correctly generate Assimp-related documentation. - Ensure documentation for C++ properties is visible by using the \property command instead of documenting the setter/getter functions. - Add export and logging macros to qdoc ignore directives - Remove unnecessary use of \fn command - Language and styling fixes Change-Id: I2481fa30ad2f6869b85c038c20ff1730b8522d46 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QBackendNodeFunctor: get and destroy now take a QNodeIdPaul Lemire2015-02-284-13/+13
| | | | | | | | This will help fixing the dynamic destruction in follow up patches. Change-Id: Id44fbeac388628c0e563d288e13d1f15d7ac0c24 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* ChangeArbiter/SceneChange: use id as change subjectPaul Lemire2015-02-281-2/+2
| | | | | | | | | | | | Instead of having a QNode* or QObservable as the subject of a change, we use it's unique NodeId instead. That will prevent the ChangeArbiter from trying to distribute changes by looking at a QNode/QObservable id when the QNode/QObservable might have been destroyed in the meantime. Change-Id: Ia419d5b841434fd65522c8c65de552089cfe97cf Task-number: QTBUG-44628 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix: remove QByteArrayLiteral used when setting SceneChange property namesPaul Lemire2015-02-281-2/+2
| | | | | | | | This was probably forgotten when the property name was changed fron QByteArray to char *. Change-Id: Idd6a988703a241519b3aba7b1d127adae5e1375e Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Merge remote-tracking branch 'origin/dev' into 5.5Oswald Buddenhagen2015-02-231-16/+3
|\
| * Fix modifier key handling in input aspectLaszlo Agocs2015-02-191-16/+3
| | | | | | | | | | | | | | | | | | | | | | Relying on Alt press/releases has the annoying side effect that some systems (X11) will not give a KeyRelease for Alt when pressing Alt+Tab. It is better to handle such keys based on the modifier state. This avoids getting into an "Alt is stuck" situation when switching back to the application's window. Change-Id: I8e1675d9d4093e162fe0e42a2def26737d7a7467 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | headersclean: don't shadow members with variablesThiago Macieira2015-02-191-1/+1
| | | | | | | | | | | | | | qnode.h:60:16: error: declaration of ‘clone’ shadows a member of 'this' [-Werror=shadow] Change-Id: I1a800c709d3543699131ffff13c381333ae8cec0 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Mark it constSergio Martins2015-02-181-1/+1
|/ | | | | Change-Id: Ia2620f1d15400ab4490357f322050846d0deb705 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Copyright header change.Mika Salmela2015-02-0928-532/+392
| | | | | | | | As for preparation for Qt5.5 release the copyright header is updated to correspond the current license requirements. Change-Id: I36632918b66f455539453b42c369689fb11298ec Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Make QBackendNode use QBackendNodeFactoryKevin Ottens2015-02-084-4/+6
| | | | | | | | | For convenience we also provide a protected createBackendNode in QBackendNode itself. From now on it should be the preferred way to deal with node resolving. Change-Id: I22f490763026848a4dc8b55c98f649c36df258a3 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix static buildsGiuseppe D'Angelo2015-01-271-3/+7
| | | | | Change-Id: I3731706ea9aba29a422699f1a38bc48e3c1fdcf3 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Register all the standard aspects to the factoryKevin Ottens2015-01-251-0/+3
| | | | | Change-Id: I6e0f743bc12f91c4bdbacba1cfe4f670dfb7ea5b Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Input: check enabled flag before changing focused elementPaul Lemire2015-01-243-1/+23
| | | | | | | Also added a bit of doc Change-Id: I833bdf35e13572bf262055ccf24f26c564753a35 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* The input aspect don't need QWindow anymoreKevin Ottens2015-01-234-25/+21
| | | | | | | | | This aspect doesn't need to depend on a QWindow, any QObject can do as long as we can have an event filter on it and we see input events on it. Rename the whole concept to "view" in the process. Change-Id: Idce2fcc37c5679fe0f7915d27793685167dd59a6 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Move CameraController in the input aspectKevin Ottens2015-01-236-0/+511
| | | | | | | | | | | | | | | With this move it also becomes a private class. As a result I had to touch all the examples as you won't get camera navigation anymore if the input aspect is not registered. Quick3DConfiguration doesn't depend on the QuickWindow singleton hack anymore, it tries to get back to the aspects and set the camera on the ones having a corresponding property. It also mostly empties Window and QuickWindow. Change-Id: Ife1644bd338e51929bad1e99089bd5e4c68ebc68 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Change uuid -> id as it really isn't universally unique any longerSean Harmer2014-12-192-9/+9
| | | | | Change-Id: If25d1f71dfff62009db1cd4f72a1b0725b4c6d14 Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
* Pass the current time to the aspectsSean Harmer2014-12-152-2/+3
| | | | | | | | Also make the current time available as a standard uniform in the render aspect. Change-Id: I163187c432cf32bf57d0c4bf4ee6b8e5d8aac42c Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QKeyboardInput: few fixesPaul Lemire2014-12-103-8/+19
| | | | | | | | | | Note: a QKeyboardController cannot be declared inline in a QKeyboardInput, it must explicitly be defined as an external element. This is because a QKeyboardInput needs to know its controller when it is added to the scene. Change-Id: I65eb98158396ef086b89ce5a552244a421222ed1 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Make cloning available to third party QNodesKevin Ottens2014-11-271-1/+1
| | | | | | | | | | | Third party QNode subclasses won't have access to QNodePrivate, so move the clone() operation as a protected static method on QNode itself. This way third party nodes can implement deep copy in their copy() implementation as expected. Change-Id: I59d0414f4ea9c679f2b7e197ea90e36bd8a915a4 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Rename QNodeUuid to QNodeIdSean Harmer2014-11-1910-33/+33
| | | | | Change-Id: I0450a4d4708af1ccd3d4c8f2ddc5c9a5c9deca27 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Rename QResourcesManager -> QResourceManager and make privateSean Harmer2014-11-181-3/+3
| | | | | | | | Once we are happy with the API we can make this public for a future release. Change-Id: I914f087e10adddbadac1649a8b889b9f53f82fd2 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QKeyboardInput: process key eventsPaul Lemire2014-11-142-4/+128
| | | | | | | Signals for major key presses have been added (taken from QQ2) Change-Id: I9b939a5004ca66c521257a1baa851d23840879e4 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* KeyboardEventDispatcherJob sending events to KeyboardInputPaul Lemire2014-11-141-4/+2
| | | | | | | The KeyboardInput forwards those notifications to the frontend. Change-Id: I5b7aa56eefe65bad28fdf4efd68da38991d25874 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* KeyboardInput keyEvent methodPaul Lemire2014-11-142-1/+15
| | | | | | | | | | Forwards Q3DKeyEvent to the frontend QKeyboardInput Note: When sending backend notifications don't forget to set the targetNode property in the QBackendPropertyChange. Change-Id: I294114d6b6402e9a745b49fcf30041971d731714 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* KeyboardController doesn't need to be an observablePaul Lemire2014-11-141-1/+1
| | | | | Change-Id: I60d3a57d1db4d8e7b757f0e765a8fd4310061285 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Q3DKeyEvent wrapper around QKeyEventPaul Lemire2014-11-143-2/+164
| | | | | | | | | 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>
* InputHandler keyboardJobsPaul Lemire2014-11-142-11/+27
| | | | | | | | | 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>
* KeyEventDispatcherJob addedPaul Lemire2014-11-143-2/+161
| | | | | | | | 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 has a keyboardJob methodPaul Lemire2014-11-143-2/+25
| | | | | | | | 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>
* KeyboardController: holds the id of the current focused inputPaul Lemire2014-11-143-7/+18
| | | | | | | | 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 maintains a vector of HKeyboardControllerPaul Lemire2014-11-143-0/+17
| | | | | | | | 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>
* KeyboardInput: register/unregister ourselves with KeyboardControllerPaul Lemire2014-11-142-2/+12
| | | | | Change-Id: I03d597d8403abc7399986588278fc71b1536c6c6 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* AssingKeyboardFocusJob addedPaul Lemire2014-11-143-2/+160
| | | | | | | | | 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>
* KeyboardController: vector of KeyboardInputs and last requester savedPaul Lemire2014-11-142-2/+35
| | | | | | | | | | 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>
* KeyboardInput reacts when QKeyboardInput requests focusPaul Lemire2014-11-144-2/+61
| | | | | | | | 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: empty requestFocusForInput methodPaul Lemire2014-11-142-0/+9
| | | | | | | Will be completed in a follow up patch. Change-Id: I487100de5604f9d7f09469e029a5db52fb5a318a Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QKeyboardController added activeInput propertyPaul Lemire2014-11-144-4/+42
| | | | | | | | 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>
* QInputAspect: Create backend nodes for frontend onesPaul Lemire2014-11-141-2/+3
| | | | | Change-Id: Ic70314b8deb39c7f7834c32ab50047369fbdd0f6 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* InputHandler/KeyboardEventFilter: QKeyEvents are storedPaul Lemire2014-11-144-4/+38
| | | | | | | | 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>
* InputHandler: install KeyboardEventFilter on QWindowPaul Lemire2014-11-142-0/+11
| | | | | Change-Id: I83a72ad3f05ec7932ba97ba10cf996cf357499cf Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* KeyboardEventFilter addedPaul Lemire2014-11-143-2/+160
| | | | | | | | 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>
* QInputAspect: set the Window to be used for events monitoringPaul Lemire2014-11-143-2/+21
| | | | | Change-Id: Ia119595d728aa2eb02e58bbf2a5080f0590ee3d5 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QInputAspect: some preliminary work on building backend treePaul Lemire2014-11-142-5/+20
| | | | | Change-Id: Iaa2f4aeacb776e04d4da8f47dcd1ebbf61ef44d7 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QInputAspect: register backend creator functors to frontend typesPaul Lemire2014-11-141-0/+7
| | | | | Change-Id: Ia401232bb27e67250165b018b69b2fa1528da3b6 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* KeyboardController backend functor addedPaul Lemire2014-11-142-0/+40
| | | | | Change-Id: I0c608c822f832f10c783bd375a29d80b7cff224f Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* KeyboardInput backend functor creator addedPaul Lemire2014-11-142-0/+39
| | | | | Change-Id: I9025c3ad9201424c04a34dbf0f188749f00942c7 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QKeyboardInput: set shareable to falsePaul Lemire2014-11-141-0/+1
| | | | | | | | Common sense dictates that we cannot share a QKeyboardInput as an input. A QKeyboardInput should be unique for a given Entity. Change-Id: Iaca9e3b6dfe5841c3097d206512f1b4228f19281 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QKeyboardInput: add focus propertyPaul Lemire2014-11-143-0/+21
| | | | | | | | | | | Like Item focus in QtQuick the goal is to change the current QKeyboardInput focus for a given QKeyboardController when focus is set to true. Only a single QKeyboardInput for a given QKeyboardController can have its focus set to true at a given time. Setting focus to true should requests a focus change to the backend. Change-Id: Idaa42192076a6b67221fb112deb53642bfc2dd93 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QInputAspect: private class containing InputHandler instancePaul Lemire2014-11-144-2/+88
| | | | | Change-Id: Ic3c02e7f476dc29dfdb9c82c251d4d1730054585 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Input: Added Managers to InputHandlerPaul Lemire2014-11-142-0/+15
| | | | | Change-Id: I9d6ab0547c0eec5b26e00487d8c7f8a2005abf47 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>