summaryrefslogtreecommitdiff
path: root/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Improve edit view 3D "on top" logicqds/v1.4.0-rc1Mahmoud Badri2019-12-131-83/+34
| | | | | | | | | | | | | | | | | | | | | | - Proxy dialog removed - When the QDS window is minimized/maximized, the edit view 3D follows. The opposite is not true (edit view 3D can be minimized separately). - Edit view 3D is always on top of QDS window. Only exception is when a popup is shown (so that the user can handle the popup). - External apps go normally on top of the edit view 3D. Known (non critical) issues: - Activating the edit view 3D doesn't raise() the QDS window, so if an external app is on top of the edit view 3D then the view is clicked, the external app will be in between the view and the QDS window. - Closing the edit view 3D from the x button doesnt work (causes a restart). This is not in the scope of this commit. Task-number: QDS-1179 Change-Id: I1dd72590037be295b94735de96772307ba14c59c Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* QmlDesigner: Properly update 3D edit view cameras and lightsMiikka Heikkinen2019-12-131-15/+26
| | | | | | | | | | | Now edit view will create and remove cameras and light gizmos properly when cameras and lights are added or deleted. Change-Id: I858752c1410f3a40ea2adaf538c281aaee94ec58 Fixes: QDS-1267 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* QmlDesigner: Implement multiselection for edit 3D viewMiikka Heikkinen2019-11-281-21/+58
| | | | | | | | | Multiselection works in 3D edit view with ctrl-click just like it does on the Design Studio. Change-Id: I266f2de11758bed064f44dd97cd79189e3e1f831 Fixes: QDS-1265 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* QmlDesigner: Use proxy dialog for 3D edit viewThomas Hartmann2019-11-281-0/+84
| | | | | | | | | | | | | | | | | | | To integrate the 3D edit view in the qml2puppet process, we create a dialog in the Qt Creator process. This dialog acts as a proxy that manages the actual window. For this I introduced a new command that allows showing, hiding, resizing and moving of the 3D edit view. The 3D edit view always follows the proxy dialog. During moving and resizing we hide the window to avoid artefacts. At this point in time the proxy widget is a dialog, but it could also be a dockwidget or any other QWidget in the future. Task-number: QDS-1179 Change-Id: I67ccab49eb2de9ba23098a67b2f9577f6c7fd3ac Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* QmlDesigner: Implement group selection boxes in 3D edit viewMiikka Heikkinen2019-11-221-5/+15
| | | | | | | | | | | | Object's selection box now includes the bounds of all of its descendants. Selection boxes of immediate children of a selected object are also drawn. Individual/group selection buttons also now work as expected. Change-Id: Ice7ef9a536e32c6bb6da70fe23bf0a38e72c14f8 Fixes: QDS-1210 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* QmlDesigner: Fix build errorMiikka Heikkinen2019-11-221-0/+3
| | | | | Change-Id: I53d425d0b6f4e66c09bd988bd188218cbf51a99c Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* QmlDesigner: Implement selection box to 3D edit viewMiikka Heikkinen2019-11-221-0/+2
| | | | | | | Change-Id: Ib0b13ecd7946e3b7da8ed06d4f5965e06e51a152 Fixes: QDS-1210 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* QmlDesigner: Implement better camera navigation in 3D edit viewMiikka Heikkinen2019-11-221-4/+3
| | | | | | | | | | | | Edit camera is now controlled as in Qt 3D Studio: ALT + left button orbits camera. ALT + middle button pans camera. ALT + right button zooms camera. Wheel zooms camera. Task-number: QDS-1206 Change-Id: Ia72644073d172b00483ceed8bcc5ffb8dce68741 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* QmlDesigner: Implement proper helper grid for 3D edit viewMiikka Heikkinen2019-11-181-0/+2
| | | | | | | Change-Id: I9e33218d4b1528610155c5fb9bf94a9597ee23df Fixes: QDS-1204 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* Implement DnD 3D objects from the item library to the EditView3DMahmoud Badri2019-11-121-0/+23
| | | | | | | | | | Proof of concept drag and drop implementation. Basic functionality working but needs polish. Task-number: QDS-1132 Change-Id: Ie3b9e80de9a414c4955d6e38daf338045bc1e614 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* QmlDesigner: Implement camera frustum visualization for edit 3DMiikka Heikkinen2019-11-111-3/+31
| | | | | | | Task-number: QDS-1208 Change-Id: I3241fcdc68d01666a2536df32f170cd898cbd7af Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* QmlDesigner: Add ScaleGizmo to 3D edit viewMiikka Heikkinen2019-11-081-20/+29
| | | | | | | | | | | ScaleGizmo allows scaling in the direction of local or global axes, as well as uniform scaling. Any scale component cannot be made negative with ScaleGizmo. Change-Id: I9b98d9593e07ded340178b07b73fa1b72421ba20 Fixes: QDS-1195 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
* QmlDesigner: Avoid reflection when setting values from puppetThomas Hartmann2019-10-301-1/+27
| | | | | | | | | | | | | | | | | | When editing values in the puppet we did not take reflection into account. This means that any changes we did from the puppet for notified back from Qt Creator. Since those notifications are asynchronous this leads to various issues especially when more than one axis (property) was modified at once. This patch avoids reflection. The notifications are 'flagged' and then ignored in the Qt5InformationNodeInstanceServer. While a node is moved we ignore any changes to that specific node. Task-number: QDS-1191 Change-Id: Ic74e22ea71832ce12321f9085a7296c2a7d9893d Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* QmlDesigner: Add camera and light gizmos to 3D edit viewMiikka Heikkinen2019-10-291-0/+26
| | | | | | | | | | | A small icon and a placeholder mesh are displayed at the location of the lights and cameras in the scene, to provide a way to see and interact with them. Change-Id: I1f90fce77a643cab2c3fda3ee2105af53dea57a9 Task-number: QDS-1177 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* QmlDesigner: Use transactions in 3D Edit ViewThomas Hartmann2019-10-281-6/+48
| | | | | | | | | | | | | | | | | | | | | We send a ValuesModifiedCommand 'immediately' when the item is moved. This means the 2D form editor and property editor update while moving nodes in the 3D edit view. The updates are 'compressed' by 100ms. This is to avoid performance issues. The timer could be reduced to 50ms or even 10ms, but 100ms feel acceptable at least for me. The code was a bit refactored. Qt5InformationNodeInstanceServer::modifyVariantValue() can be used later to update other Vector3D based properties like rotation and scale. There is one issue left. MouseArea3D emits 'onReleased' only after the mouse is moved again. This delays the 'commit' of the transaction which is annoying and can triggers bugs. Change-Id: I834a1e2658278ff8dd39678f39e51735dee91b65 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Update EditView3D when selecting a 3D object in the navigatorMahmoud Badri2019-10-271-8/+23
| | | | | | | Task-number: QDS-1124 Change-Id: I8d7bf73612b07592cd9beb85a5249895a400316b Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* QmlDesigner: Fix setting position from qml2puppetThomas Hartmann2019-10-251-9/+37
| | | | | | | Change-Id: I1348fa3d761be7b185d5324a73e8cdd543be50e9 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* QmlDesigner: Add support for move gadget to 3D edit viewMiikka Heikkinen2019-10-251-3/+29
| | | | | | | | | | | This proof-of-concept move gadget is based on the move gadget in studio example of QtQuick3D. Change-Id: I1b596443a3e99c16ed214bc464c5367a0f7aa503 Fixes: QDS-1125 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: Pasi Keränen <pasi.keranen@qt.io>
* Deselect all objects when clicking an empty point in the 3D edit viewMahmoud Badri2019-10-241-3/+4
| | | | | | | Task-number: QDS-1124 Change-Id: I5a9ed39a69c467de27dd7c4564d53b7bf033dd92 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* Enable object selection in the 3D edit viewMahmoud Badri2019-10-241-1/+8
| | | | | | | | | | Clicking an object in the 3D object selection view, selects it in the creator side. Multiselection (i.e. Ctrl+click) is not implemented yet. Also selected object is not highlighted in the view yet. Task-number: QDS-1124 Change-Id: I0b10162539ecedc40ed117896e385975c52b04a9 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* QmlDesigner: Add Qt5InformationNodeInstanceServer::modifyProperties()Thomas Hartmann2019-10-241-0/+9
| | | | | | | | | | This method allows to modify properties in the data model from the puppet. For performance reasons, properties should be modified in bulks. Each bulk will be one step on the undo stack. Change-Id: I7dbef02781706c8638981512ca0ec45d24c54545 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* QmlDesigner: Do not crash if EditView3D contains errorsThomas Hartmann2019-10-231-0/+8
| | | | | | | | EditView3D.qml can contain errors, most likely because of QtQuick3D updates. Change-Id: I85879d9079ba8771a2af4478ba2e4e63a6aa9223 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Add edit camera controls for 3D edit viewPasi Keränen2019-10-211-1/+7
| | | | | | | | | Add edit camera controls and grid helper to 3D edit view. Task-number: QDS-1127 Change-Id: Ice5ea0fcca18d59dc8a2907710e16c6688b90628 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* QmlDesigner: Implement command for synchronising the selectionThomas Hartmann2019-10-211-0/+13
| | | | | | | | | | | | | | This patch implements the command and dispatchers for synchronising the selection between Qt Creator and the qml2puppet. Qt5InformationNodeInstanceServer::changeSelection() is called whenever the selection is changed in Qt Creator. Qt5InformationNodeInstanceServer::changeSelection() allows to change the selection from the qml2puppet. Change-Id: I73a64d8dc2a3f330433f966b42a10229cbbff649 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* QmlDesigner: Only show 3D edit view if enabledThomas Hartmann2019-10-161-1/+2
| | | | | | | | QMLDESIGNER_QUICK3D_MODE controls if the edit mode should be shown. Change-Id: I4522dc0887486f329fdb140079e6d644f601c77f Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* QmlDesigner: Show 3D scene with multiple objectsThomas Hartmann2019-10-151-9/+18
| | | | | | | | | A View3D can have multiple root nodes, which are automatically aggregated in a single root node. Change-Id: I3ad11eff5a8beadbd53f0fc8cdcaecd78772768b Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* QmlDesigner: Use core profile for edit viewThomas Hartmann2019-10-111-1/+11
| | | | | | Change-Id: Ic62ec2cc54d9bf30fa41cccdb5b10e9b75c67290 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* QmlDesigner: Enable 3D Edit View in Qt Quick DesignerThomas Hartmann2019-10-091-0/+50
| | | | | | | | | | | | | | | | | | | | | | | If we find a QQuick3DViewport or the root node is a QQuick3DNode, we create an 3D Edit View QQuickView for 3D editing in the 'editmode'. This requires to not use the DesignerWindowManager for the 'editmode'. The current implementation for the 3D Edit View is done in EditView3D.qml, but can be replaced by a custom EditView class later. At this point in time there is no hard dependency on QtQuick3D. Once we start to implement more advanceded editing features, EditView3D.qml has to be replaced by a custom C++ class with a hard dependency on QtQuick3D. Currently the scene can be rotated around the 'y' axis, it is possible to move the camera on the 'z' axis and the custom light can be turned on and off. This is simply a proof of concept that the 3D Edit View already allows some user interaction. Change-Id: I96400e72b0853dde7939c693d1d7300f9c2ab142 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* QmlDesigner: Fix custom qml2puppet buildThomas Hartmann2019-07-311-4/+2
| | | | | | | | | The build of a custom qml2puppet was failing, because of utils/algorithm.h missing. We should minimize Qt Creator dependencies in the puppet. Change-Id: Iba8dd1a3979dbeeb1bfa860b50ba586bea20c7a7 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* More Utils::toSet/toListhjk2019-07-041-2/+5
| | | | | | | ... and unrelated cosmetic changes. Change-Id: I591b17fd5289831e701b683f8fb47816efd1fa67 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* QmlPuppet: Make compile without QT_RESTRICTED_CAST_FROM_ASCII removedhjk2016-03-181-3/+1
| | | | | Change-Id: I535efad65b2224337c133463da075953cc878c6c Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
* Update License according to agreement with Free Qt FoundationTobias Hunger2016-01-191-10/+10
| | | | | | | * Update all files in share folder Change-Id: I8a82c3eb2eb614d4339dd4c4e690f54b5f29d813 Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
* Qt Quick Designer: License change to Qt Commercial + GPLv3Alessandro Portale2015-09-181-12/+7
| | | | | | | | Change-Id: I7f7aecd02892b6c616cd148fa5d845e7bc0d3b4f Reviewed-by: Tuukka Turunen <tuukka.turunen@digia.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com> Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
* QmlDesigner.QmlPuppet: Fix compile for Qt 5.6Thomas Hartmann2015-07-141-1/+1
| | | | | Change-Id: I231bcf61e813db14c0958565cf76dd4df56b4e99 Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
* Update LicenseEike Ziller2015-01-161-6/+6
| | | | | Change-Id: I711d5fb475ef814a1dc9d2822740e827f3f67125 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* License updateEike Ziller2014-10-091-7/+8
| | | | | Change-Id: I3c22ef2685d7aa589f5d0ab74d693653a4c32082 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* QmlDesigner: Always test if there is a instance for an id or objectMarco Bubke2014-07-031-9/+15
| | | | | Change-Id: I90ff8861de8879e300932bd61afb29f8ec3b9fc4 Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
* QmlDesigner: Do the dirty test only for non node instancesMarco Bubke2014-06-241-2/+2
| | | | | | | The test should stop at the next node instance. Change-Id: I99daf1215edea34b36434720c44ea7844c4bef34 Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
* QmlDesigner: Don't try to access invalid node instancesMarco Bubke2014-06-181-7/+9
| | | | | | Task-number: QTCREATORBUG-12444 Change-Id: I021e9669137de51c8feb0d7227d6d4c65a4d710c Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
* QmlPuppet: Pass const strings by referenceOrgad Shaneh2014-05-211-1/+1
| | | | | Change-Id: I6bf60d6484f13817dcbe36a4bfc099f3edf7559c Reviewed-by: Marco Bubke <marco.bubke@digia.com>
* QmlDesigner: Fix drag and dropMarco Bubke2014-05-141-5/+5
| | | | | | Task-number: QTCREATORBUG-12227 Change-Id: I02c3bd81ab2b6585d35bab60550788f461e77732 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
* QmlDesigner: Fix wrong order after dropping a item in the navigatorMarco Bubke2014-05-081-5/+5
| | | | | | | | | The component complete command is reparenting a item so it is appended. To get the right order the ChildrenChangedCommand should be sent after ComponentCompletedCommand. Change-Id: Id4c1025fc7b4d7f25a7db7511029013c24441dd3 Reviewed-by: Marco Bubke <marco.bubke@digia.com>
* Incremented year in copyright infoRobert Loehning2014-01-081-1/+1
| | | | | | Change-Id: Ib5423fdd064e4546f848c0b640b0ed0514c26d3a Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* QmlDesigner: Fix non updating of scene matrix if parent transform changedMarco Bubke2013-11-071-1/+20
| | | | | | Task-number: QTCREATORBUG-10644 Change-Id: Ib112352e539fde4eefb8c029080c688bed8a0ebd Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
* Merge branch '2.7'Oswald Buddenhagen2013-05-151-3/+6
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/src/qtquick/qtquick-components.qdoc doc/src/qtquick/qtquick-designer.qdoc qtcreator.pri qtcreator.qbs src/plugins/cppeditor/cppinsertdecldef.cpp src/plugins/qnx/qnxruncontrolfactory.cpp Change-Id: I0a37a07c42719bc0d9ef5b3ac4641d01a63c0d88
| * QmlDesigner: Fix recursive dirty testMarco Bubke2013-05-061-3/+6
| | | | | | | | | | Change-Id: I62cb968eb21bb8399cd1918d68e405c9abe5d6e0 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
* | Merge remote-tracking branch 'origin/2.7'Eike Ziller2013-04-301-22/+21
|\ \ | |/ | | | | | | | | | | Conflicts: src/plugins/qmldesigner/components/formeditor/abstractcustomtool.cpp Change-Id: I4e0a85795e7f4bfcdc21d106517517b527f85104
| * QmlDesigner: Fix gcc compilation warningsKai Koehne2013-04-251-16/+0
| | | | | | | | | | | | | | Fix warnings from gcc 4.8. Change-Id: If4fc311ea021d1014141cb123f1d765577efd831 Reviewed-by: Marco Bubke <marco.bubke@digia.com>
| * QmlDesigner: We should test if untracked items are dirty tooMarco Bubke2013-04-241-6/+21
| | | | | | | | | | Change-Id: I94db08fff3e7e38a9cc377d06a5aabc6d886b64e Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
* | Fix Krazy warnings about duplicate includes.Friedemann Kleint2013-03-201-1/+0
|/ | | | | Change-Id: Ied32236a84d20225b1ca4a192f3a346fbfbd09b4 Reviewed-by: hjk <hjk121@nokiamail.com>