diff options
author | Thomas Hartmann <thomas.hartmann@qt.io> | 2019-10-17 18:27:57 +0200 |
---|---|---|
committer | Thomas Hartmann <thomas.hartmann@qt.io> | 2019-10-21 11:30:19 +0000 |
commit | ac84f8a45717ce65f11be7e71190edd3425a85c8 (patch) | |
tree | 9aff8202db22db2be2a086dd3c82bbdc71e26a66 /share/qtcreator/qml/qmlpuppet/qml2puppet/instances/servernodeinstance.cpp | |
parent | b128d498b2da55a9f87cd2eabb802acc0c48e7d4 (diff) |
QmlDesigner: Implement Quick3DNodeInstance wrapper
We use Quick3DNodeInstance as a proxy class to wrap QQuick3DNode.
The access to private API like QQuick3DNodePrivate::setIsHiddenInEditor()
is restriced by such proxy classes.
Change-Id: If5191c3b730359000cf983c3af206dcffa07be74
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Pasi Keränen <pasi.keranen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Diffstat (limited to 'share/qtcreator/qml/qmlpuppet/qml2puppet/instances/servernodeinstance.cpp')
-rw-r--r-- | share/qtcreator/qml/qmlpuppet/qml2puppet/instances/servernodeinstance.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/servernodeinstance.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/servernodeinstance.cpp index 87aea97d8d..376ca29524 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/servernodeinstance.cpp +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/servernodeinstance.cpp @@ -39,6 +39,7 @@ #include "qt3dpresentationnodeinstance.h" #include "quickitemnodeinstance.h" +#include "quick3dnodeinstance.h" #include "nodeinstanceserver.h" #include "instancecontainer.h" @@ -170,6 +171,8 @@ Internal::ObjectNodeInstance::Pointer ServerNodeInstance::createInstance(QObject instance = Internal::LayoutNodeInstance::create(objectToBeWrapped); else if (isSubclassOf(objectToBeWrapped, "QQuickItem")) instance = Internal::QuickItemNodeInstance::create(objectToBeWrapped); + else if (isSubclassOf(objectToBeWrapped, "QQuick3DNode")) + instance = Internal::Quick3DNodeInstance::create(objectToBeWrapped); else if (isSubclassOf(objectToBeWrapped, "QQmlComponent")) instance = Internal::ComponentNodeInstance::create(objectToBeWrapped); else if (objectToBeWrapped->inherits("QQmlAnchorChanges")) @@ -312,6 +315,11 @@ void ServerNodeInstance::setPropertyBinding(const PropertyName &name, const QStr m_nodeInstance->setPropertyBinding(name, expression); } +void ServerNodeInstance::setHideInEditor(bool b) +{ + m_nodeInstance->setHideInEditor(b); +} + void ServerNodeInstance::resetProperty(const PropertyName &name) { m_nodeInstance->resetProperty(name); |