Commit Graph

31 Commits

Author SHA1 Message Date
Miikka Heikkinen
f146b846cd QmlDesigner: Implement proper preview for pure 3D scenes
Refactored the existing 3D node preview generation to be done
synchronously, which enables their use also for creating state
and item library previews for 3D nodes with ease.

Fixes: QDS-5785
Change-Id: Ib493eccbc239f33bcad3301673a865494616a901
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-02-10 14:47:26 +00:00
Miikka Heikkinen
9b6f60992c QmlDesigner: Update repeater parent when repeater properties change
Any time repeater properties change, the repeater parent should be
dirtied to ensure it rerenders. Often the rerender is triggered
incidentally due to other triggers, but e.g. in case model value is
changed to zero, or if model property is removed, no other trigger
causes rerender.

Also moved the repeater parent checks into QuickItemNodeInstance
to avoid polluting Qt5NodeInstanceServer with such stuff.

Fixes: QDS-5233
Change-Id: Idd89e23c5ad022d26f443d665dac81dc2cbb0b28
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-10-11 08:44:13 +00:00
Thomas Hartmann
870b619c85 QmlDesigner: Render effects on document level
Rendering effects requires actually rendering another item.
The effect is defined by another item that is rendered instead
of the original item.

For items that have an effect we do not render the children, since
the effect is only applied to the layer not the individual items.

We set layer.enabled temporarily to false, this ensures the effect
is not rendered as part of its parent item.

To detect the effect we use the source property an check if it points
to the ShaderEffectSource.

If one of the children inside the effect is transformed we have
to update the effect item.

If layer.enabled or layer.effect is changed we set the dirty flag
on the item and all children.

Change-Id: Iff61ef950e62a7a598b4bfa181ea70cb144368f3
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-08-30 12:07:06 +00:00
Thomas Hartmann
30827fe401 QmlDesigner: Implement visibility for unified render path
If the item is set to invisible we set visible to false in
the render and preview puppets. This will have no effect on the
value in the property editor.

Changing the actual value of visible can have side-effects on
the rendering in some rare cases.

Task-number: QDS-4932
Change-Id: I5ce0925ebff8f5e4e64bc71fd5d33d6154b85f91
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2021-08-26 14:18:37 +00:00
Miikka Heikkinen
8aad2c803a QmdDesigner: Enable rendering single items again for render puppet
Change the form editor rendering to be done by item basis instead of
just rendering the entire scene (unified rendering).

Fixes: QDS-2933
Change-Id: I999cbc834791bc6e96334eab8273d97e4f58975f
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-08-25 15:38:17 +00:00
Miikka Heikkinen
bab69fff77 QmlPuppet: Fix crash at puppet reset
Puppet cleanup was not handled properly, so derefFromEffectItem() was
not called for all objects that needed it, causing puppet to crash
at shutdown.

Fixes: QDS-3461
Change-Id: I22c0552fe1223789fa42b276ab377d4a9e929955
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-01-05 09:28:45 +00:00
Thomas Hartmann
29c833d54f QmlDesigner: Implement different render path for Qt 6
When building with Qt 6 or if qmlpuppet_unifiedRenderPath is set
in the environment we switch to a different render path.
In this case we use QQuickWindow::grabWindow() and render the root item.
No composition is done in the Qt Creator process anymore.
This is a similar approach we already take for the 3D view.
Performance is acceptable and we fix rendering issues related to
effects and layers.

Change-Id: Ic963eca047e0bf16ca3a099ec94658ae2af0fb63
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2020-10-09 15:13:39 +00:00
Thomas Hartmann
3caafb2b81 QmlDesigner: Inspect components for existing states
For each created items we retrieve a list of the names
of all existing states.

Task-number: QDS-1978
Change-Id: I8e85e439fce3c6204cb8bcf69f6be847cc8dae5c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-04-21 10:57:26 +00:00
Thomas Hartmann
2cb238471a QmlDesigner: Modernize
modernize-use-using

Change-Id: Ia8eef3d97db7b99ec813a030e1f39ee492d6cf9a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2018-08-01 07:42:47 +00:00
Tobias Hunger
0e71ed1bfc QmlPuppet: Use override consistently
clang-tidy fixes from modernize-use-override check.

Change-Id: Ia9785ef4d5d236d9740abec26359495eaea2fad1
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-05-07 15:43:28 +00:00
Thomas Hartmann
8a8b8c4602 QmlDesigner: Add meta hint if item renders children directly
In some cases items render their children directly using an effect.
In this case we do not want to hide the children when calling
refFromEffectItem().
If the hint takesOverRenderingOfChildren is set in the .metainfo hints
for a parent item we forward a flag to the puppet and refFromEffectItem()
is not hiding this item,

Change-Id: I37a8c0ad8a15bc914c220e03b1b744779431d655
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2018-03-09 15:05:22 +00:00
hjk
39a38d5679 Wholesale conversion to #pragma once
Kudos to cgmb and https://github.com/cgmb/guardonce

Change-Id: Ifa8970734b8d43fd08c9260c645bdb0228633791
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-03-30 15:20:19 +00:00
Tobias Hunger
38cce7eb83 Update License according to agreement with Free Qt Foundation
* Update all files in share folder

Change-Id: I8a82c3eb2eb614d4339dd4c4e690f54b5f29d813
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2016-01-19 16:05:29 +00:00
Alessandro Portale
374f84acc7 Qt Quick Designer: License change to Qt Commercial + GPLv3
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>
2015-09-18 12:12:57 +00:00
Thomas Hartmann
6dfd03596f QmlDesigner.QmlPuppet: Fix compile for Qt 5.6
Change-Id: I231bcf61e813db14c0958565cf76dd4df56b4e99
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2015-07-14 10:28:10 +00:00
Tobias Hunger
ae477c3a4b qml2puppet: s/Q_DECL_OVERRIDE/override/g
Change-Id: I4c582486572df9d94c53163321212b15dcc042cf
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2015-06-08 10:51:24 +00:00
Eike Ziller
3c85058694 Update License
Change-Id: I711d5fb475ef814a1dc9d2822740e827f3f67125
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2015-01-16 12:37:56 +01:00
Eike Ziller
8295b503be License update
Change-Id: I3c22ef2685d7aa589f5d0ab74d693653a4c32082
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2014-10-09 11:41:44 +02:00
Marco Bubke
37b1dc871f QmlDesigner: Merge GraphicalNodeInstance back in QuickItemNodeInstance
Change-Id: I2f5412887a66186d215e56101a63bacfda4f8e0a
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
2014-04-17 18:02:06 +02:00
Marco Bubke
9818f714f4 QmlDesigner: Use the root NodeInstance for item collection
Change-Id: I0ed67997c371af8acb3db480446ea5d577380804
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
2014-04-17 18:01:02 +02:00
Robert Loehning
746c5d8863 Incremented year in copyright info
Change-Id: Ib5423fdd064e4546f848c0b640b0ed0514c26d3a
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-01-08 08:29:47 +01:00
Marco Bubke
b97422b710 QmlDesigner: Add container item support in node instances
Change-Id: I30e0d11346b8c63188d052b46656e7ede179e55d
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2013-05-30 14:11:57 +02:00
Marco Bubke
40b62e1cfa QmlDesigner: Add GraphicalNodeInstance as abstraction for item and window
Change-Id: Icaba711464f672a3bfbb9d83a449d47e72ba11ff
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2013-04-22 17:03:23 +02:00
Marco Bubke
2b698e31ed QmlDesigner: Add override to qml2puppet
Change-Id: Ibdf07c4a35b40f3fc78300a1675270f8295bec42
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2013-04-16 16:52:20 +02:00
Marco Bubke
359ef53280 QmlDesigner: Move implementation code in the node instances
updateDirtyNodeRecursive and renderPreviewImage belongs to quick image and
not in the node instance server.

Change-Id: I629b89c748036c0614e78bcfa0c837cb16ca6374
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2013-04-15 13:53:53 +02:00
Thomas Hartmann
d204ee0b43 QmlDesigner: Type of the propertyname is now PropertyName
And PropertyName is a typedef for QByteArray. Because we don't use the
features of QString and the source would be cluttered with QLatin1Strings
we changed the property name to QByteArray.

Change-Id: Ib70ef136bbc411504b450456bd9bb705ae93dd25
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
(cherry picked from commit ee4bf638ca)
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
2013-03-25 13:35:11 +01:00
Oswald Buddenhagen
1fda2111d4 Merge remote-tracking branch 'origin/2.6'
Conflicts:
	src/plugins/autotoolsprojectmanager/AutotoolsProjectManager.pluginspec.in
	src/plugins/debugger/qtmessageloghandler.cpp
	src/plugins/debugger/qtmessagelogwindow.cpp
	src/plugins/madde/maemodeployconfigurationwidget.cpp
	src/plugins/qmldesigner/components/integration/designdocumentcontroller.cpp
	src/plugins/qmldesigner/designercore/include/widgetqueryview.h
	src/plugins/qmldesigner/designercore/metainfo/metainfoparser.cpp
	src/plugins/qmldesigner/designercore/model/modelnodecontextmenu.cpp
	src/plugins/qmldesigner/designercore/model/modelnodecontextmenu.h
	src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp
	src/plugins/qnx/bardescriptormagicmatcher.h
	src/plugins/qt4projectmanager/profilekeywords.cpp
	src/plugins/remotelinux/deployablefilesperprofile.cpp
	src/plugins/remotelinux/deployablefilesperprofile.h
	src/plugins/remotelinux/deploymentinfo.cpp
	src/plugins/remotelinux/deploymentsettingsassistant.cpp
	src/plugins/remotelinux/profilesupdatedialog.cpp
	tests/auto/icheckbuild/ichecklib.cpp
	tests/auto/icheckbuild/parsemanager.cpp
	tests/auto/icheckbuild/parsemanager.h

Change-Id: Ie465a578446a089e1c502d1cb1096e84ca058104
2013-01-31 16:25:33 +01:00
Marco Bubke
6994079f96 QmlDesigner.NodeInstance: Better content check
Fix rendering bug for repeaters.

Change-Id: I1c56bb63ff91cd8f58e349b0f8b038d1dd7d40e9
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2012-10-23 10:44:51 +02:00
Eike Ziller
6fd252b0a5 Merge remote-tracking branch 'origin/2.6'
Conflicts:
	share/qtcreator/qml/qmlpuppet/commands/endpuppetcommand.cpp
	share/qtcreator/qml/qmlpuppet/commands/endpuppetcommand.h
	src/plugins/debugger/qtmessageloghandler.cpp
	src/plugins/debugger/qtmessageloghandler.h
	src/plugins/debugger/qtmessagelogwindow.cpp
	src/plugins/madde/maemodeployconfigurationwidget.cpp
	src/plugins/madde/maemodeployconfigurationwidget.h
	src/plugins/remotelinux/deployablefilesperprofile.cpp
	src/plugins/remotelinux/deployablefilesperprofile.h
	src/plugins/remotelinux/deploymentinfo.cpp
	src/plugins/remotelinux/deploymentinfo.h
	src/plugins/remotelinux/deploymentsettingsassistant.cpp
	src/plugins/remotelinux/profilesupdatedialog.cpp
	src/plugins/remotelinux/remotelinuxdeploymentdatamodel.h
	tests/auto/icheckbuild/ichecklib.cpp
	tests/auto/icheckbuild/ichecklib_global.h
	tests/auto/icheckbuild/parsemanager.cpp
	tests/auto/icheckbuild/parsemanager.h
	tests/manual/ssh/tunnel/tunnel.h

Change-Id: I04d7761df6bd936ad00e0547974284c967d39580
2012-10-05 21:20:50 +02:00
Marco Bubke
fb276230fe QmlDesigner.NodeInstances: Recover positioner support
Change-Id: Ib5e891a8563bfced2af93e4a516ef8f196e8ff1e
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2012-10-04 19:19:02 +02:00
Marco Bubke
2fc24f27d1 QmlDesigner.NodeInstances: Rename SG to Quick
Change-Id: I2180704df244a715a078385a7ecbf852f41ca68f
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2012-09-26 18:22:19 +02:00