From 946943203566167a2f8d3e785d6250ed8a8a87cd Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Wed, 23 Oct 2019 16:29:31 +0200 Subject: QmlDesigner: Add Qt5InformationNodeInstanceServer::modifyProperties() 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 Reviewed-by: Thomas Hartmann --- .../qml/qmlpuppet/qml2puppet/instances/nodeinstanceserver.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstanceserver.h') diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstanceserver.h b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstanceserver.h index 65c2bdfac1..7af63c0b5b 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstanceserver.h +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstanceserver.h @@ -60,6 +60,7 @@ namespace QmlDesigner { class NodeInstanceClientInterface; class ValuesChangedCommand; +class ValuesModifiedCommand; class PixmapChangedCommand; class InformationChangedCommand; class ChildrenChangedCommand; @@ -82,6 +83,11 @@ public: using IdPropertyPair = QPair; using InstancePropertyPair= QPair; using DummyPair = QPair >; + using InstancePropertyValueTriple = struct { + ServerNodeInstance instance; + PropertyName propertyName; + QVariant propertyValue; + }; explicit NodeInstanceServer(NodeInstanceClientInterface *nodeInstanceClient); @@ -168,6 +174,7 @@ protected: ValuesChangedCommand createValuesChangedCommand(const QList &instanceList) const; ValuesChangedCommand createValuesChangedCommand(const QVector &propertyList) const; + ValuesModifiedCommand createValuesModifiedCommand(const QVector &propertyList) const; PixmapChangedCommand createPixmapChangedCommand(const QList &instanceList) const; InformationChangedCommand createAllInformationChangedCommand(const QList &instanceList, bool initial = false) const; ChildrenChangedCommand createChildrenChangedCommand(const ServerNodeInstance &parentInstance, const QList &instanceList) const; -- cgit v1.2.3