summaryrefslogtreecommitdiffstats
path: root/src/input
Commit message (Collapse)AuthorAgeFilesLines
* Qt3DInput: add QInputDeviceFactory and QInputDevicePluginPaul Lemire2015-11-165-2/+299
| | | | | Change-Id: Ic137060c4ab37fdff46f97066a3f24b763a7d1ac Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Qt3DInput : add QAbstractInputDevicePaul Lemire2015-11-162-1/+68
| | | | | | | | Will be used to allow having input devices plugins within the Qt3DInput aspect Change-Id: I58c446270c0cb52b14e609949a204e557138f947 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* d-pointer classes, private/public changesTomi Korpipää2015-10-305-5/+16
| | | | | | Change-Id: I4ca133aebad0c088296ab293f95f0a6d76d18395 Task-number: QTBUG-39946 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Doc: Updated the docs for the namespace changesVenugopal Shivashankar2015-10-276-12/+12
| | | | | | | | | | | | | | | | Each of the submodules now have there own namespace so the following changes are required to adapt: - Added \namespace docs for the new namespaces. - Updated all the \class and \instantiates entries to use the appropriate namespace qualifier. - Changed the \module and \qmlmodule names for Qt 3D Core and Qt 3D Render modules. - Added the missing \module and \qmlmodule pages for the Qt 3D Collision module. Change-Id: Ibc5bf30e4f50aecb6a3b24bc8536f17ed19d681d Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Add first person camera controller mode and make it the defaultSean Harmer2015-10-252-9/+75
| | | | | | | | | | | | | | For most scenes this is what people want in preference to the free-look mode. Keeping a consistent up vector is more natural for most people. This is a temporary hack until we get the InputManager completed and we have a proper abstraction for controllers. After all, who says the inputs should control the camera. They should be able to control any Entity with a Transform. This also requires the Transform refactoring to be completed before we can tie both sides together. Change-Id: If8f02c66febcdee31c13ee46b6651a0e923e8d09 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Remove some unreferenced variable warningsSean Harmer2015-10-252-0/+2
| | | | | Change-Id: I628d14c5be557aaf1ff50a86ac5020e600bc6311 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Make aspects use the QEventFilterServicePaul Lemire2015-10-245-30/+19
| | | | | Change-Id: Ieb1d985b919b50844a236959250e1a2e80972aa1 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Rename Renderer -> Render throughoutSean Harmer2015-10-191-1/+1
| | | | | | | | This is for consistency between the C++ namespaces and QML imports and with the other aspects. Change-Id: I73392f138b4e519b12888f52530123e3d0ba445e Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Move Qt3DCore into Qt3DCore namespaceSean Harmer2015-10-1337-198/+198
| | | | | | | Update other aspects, tests and examples accordingly. Change-Id: Ib1bcf0bdf4f5aec4422dc0c80bfc32b27fb1a317 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add "We mean it" warnings to private headersSean Harmer2015-10-1317-0/+187
| | | | | Change-Id: Ic4a69123255c33990765ea3601e01914c2d8cb70 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Move Input aspect to Qt3DInput namespaceSean Harmer2015-10-1343-428/+405
| | | | | | | Also update examples accordingly. Change-Id: I8d19c3165899e4b7b791deb33098af4fb439f44a Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Doc: Added \inmodule statement where it was missingNico Vertriest2015-10-063-0/+4
| | | | | | Change-Id: Ie653166790034f63740772b2a69ed6c9dea0522e Task-number: QTBUG-48602 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Add onStartup() and onShutdown() virtuals to QAbstractAspectSean Harmer2015-08-062-0/+10
| | | | | | | | | | | | | Gives aspects a chance to do work just prior to and just after the main loop in QAspectManager. Specifically the shutdown functionality is required for the upcoming logic aspect to ensure a clean shutdown. Added the onStartup() method for symmetry. Change-Id: If5f32d62629543cdceb2e6e3ff6383747acb7c99 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix crash when shutting down due to cloning a deleted objectSean Harmer2015-08-051-1/+6
| | | | | Change-Id: If5d6b12553aff5164e3edf351abb956f612b6fcf Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add a couple of missing QNode::cleanup() calls to input aspectSean Harmer2015-08-054-0/+25
| | | | | Change-Id: I3e134ced2dcf99f832d141ce98af08ff41c0722b Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Filter and dispatch mouse eventsRémi Benoit2015-08-0310-5/+382
| | | | | | | | For now events are sent to all MouseInputs regardless of their state (active/inactive) or if the event is targeted at an entity. Change-Id: I06d58bc72f994d211404c1f8a9ec862a2c65d300 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* MouseInput backend class for QMouseInputPaul Lemire2015-08-037-2/+271
| | | | | Change-Id: I24f302c28d944e18a1c19f7344f80abc5c86d309 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* MouseController backend class for QMouseControllerPaul Lemire2015-08-037-2/+241
| | | | | Change-Id: I8d042b79b58e9453f9836d55d2b5211f4ca1383c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* MouseInput API and example mockupRémi Benoit2015-08-039-2/+978
| | | | | | | | | | | | | | The meaning of exclusiveFocus is not set in stone for now. We know some kind of exclusive focus will be needed but defining it precisely will be done as the input aspect takes shape. QMouseController -> dispatch events to QMouseInput, specify the camera to be used to perform the picks. QMouseInput -> Component that offers a way to react to mouse events Q3DMouseEvent/Q3DWheelEvent -> Qt3D mapping of QMouseEvent/QWheelEvent Change-Id: I462bea2932d4bad6595d04a75ea1e0a67c7c8ba0 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QInputAspect: do not leak camera controller and input handlerPaul Lemire2015-07-122-6/+6
| | | | | | Change-Id: Ic34bb36caf607d47339acc5ad0ca14803d7a6af0 Reviewed-by: Rémi Benoit <remi.benoit@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Make Scene3D and Qt3D properly shutdownPaul Lemire2015-07-121-2/+3
| | | | | Change-Id: I1bb43323cf371ed12148a11c925e94488189695b Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QScene is now privatePaul Lemire2015-07-061-2/+3
| | | | | | | QSceneInterface was removed as it didn't make sense anymore Change-Id: I1110d1dcef72bd7654d773370ab304ac06515037 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Properly shutdown the rendererPaul Lemire2015-07-061-1/+3
| | | | | | | | | | | | | Now all pure Qt3D examples have a 0 exit code. Still need some work for QtQuick/Scene3D examples. The problem being that we hit the QOpenGLDebugger issue since we are unable to shutdown properly the Qt3D renderer because Scene3D being a QQuickItem is destroyed before the QQuickWindow and we never have a chance to receive the sceneGraphInvalidated signal. Change-Id: I1d30e0d883057630a55cd3f99eaa6bdb65a8df26 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Merge remote-tracking branch 'origin/5.5.0' into 5.5Paul Lemire2015-06-271-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/qt3d/planets-qml/CloudEffectDS.qml examples/qt3d/planets-qml/PlanetButton.qml examples/qt3d/planets-qml/PlanetEffectD.qml examples/qt3d/planets-qml/PlanetEffectDB.qml examples/qt3d/planets-qml/PlanetEffectDS.qml examples/qt3d/planets-qml/PlanetEffectDSB.qml examples/qt3d/planets-qml/PlanetMaterial.qml examples/qt3d/planets-qml/PlanetsMain.qml examples/qt3d/planets-qml/SolarSystem.qml examples/qt3d/planets-qml/doc/src/planets-qml.qdoc examples/qt3d/planets-qml/main.cpp examples/qt3d/planets-qml/planets-qml.pro examples/qt3d/planets-qml/planets-qml.qrc Change-Id: I9f311f3104c8fcf9d49e12b14f8bfad9ca8cf199
| * Map keyevents to correct signal names with namespaced argumentsSean Harmer2015-06-211-1/+1
| | | | | | | | | | | | Task-number: QTBUG-46752 Change-Id: I5e331849cbde6ca24cfd6dca3b019e6e8377dd3f Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Merge branch '5.5.0' into 5.5Sean Harmer2015-06-217-47/+344
|\| | | | | | | | | | | | | Conflicts: src/input/qkeyboardcontroller.cpp Change-Id: Ifb0b5af165fb11dbe07849f34d3b93d9cc78eeaa
| * Use fully qualified argument types in signalsSean Harmer2015-06-181-43/+43
| | | | | | | | | | | | | | Task-number: QTBUG-46752 Change-Id: I72f9c778eebf327d87d42a1eb20093700ee3e9eb Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * Doc: Add skeleton docs for Qt3D Input classes and QML typesTopi Reinio2015-06-154-0/+302
| | | | | | | | | | | | | | | | | | Not fully documented yet, but enables the classes and QML types to be visible in the documentation. Change-Id: I557aeae9ff6314b697bcc9313c1061543363b645 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * Remove unnecessary metatype declarationsSean Harmer2015-06-082-4/+0
| | | | | | | | | | | | Task-number: QTBUG-46539 Change-Id: I0e9e2d405da2fa5ecc2fc8b8efece6f7364e1b39 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | QNode parent changesPaul Lemire2015-06-115-2/+14
|/ | | | | | | | | | | | | | | - introduce QNode::setParent(QNode *) - QNode created with explicit parent now invoke QNodePrivate::_q_addChild - QNode::cleanup introduces, need to be added to the dtor of every QT3D_CLONABLE QNode subclass. Handles proper destruction. - QNode::cleanup added to all classes that should have it. - Updated unit tests of Nodes, Entity, Scene Change-Id: Id2c2784122a78edaae5580fe5976d88be5a1921c Task-number: QTBUG-45947 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Do not pass `this` to Private c-torKonstantin Ritt2015-05-204-8/+8
| | | | | | | For classes derived from QNodePrivate, it is not used anymore. Change-Id: I9573042500c2c7533687d251e72bac14cb793525 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Do not initialize q_ptr in classes derived from QObjectPrivateKonstantin Ritt2015-05-202-4/+4
| | | | | | | QObject does that behind the scenes, in a proper way. Change-Id: I92561060757d36358d1e507f4335ca605f681678 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* 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>