diff options
author | Thomas Hartmann <thomas.hartmann@qt.io> | 2019-10-23 16:29:31 +0200 |
---|---|---|
committer | Thomas Hartmann <thomas.hartmann@qt.io> | 2019-10-24 08:22:11 +0000 |
commit | 946943203566167a2f8d3e785d6250ed8a8a87cd (patch) | |
tree | e823e51c05eba795eb549bca6e612047570ed845 /share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstanceserver.h | |
parent | 0ddd473cc026c2e4d33ac1a65ee8ffdeb9ac85af (diff) |
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 <miikka.heikkinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Diffstat (limited to 'share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstanceserver.h')
-rw-r--r-- | share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstanceserver.h | 7 |
1 files changed, 7 insertions, 0 deletions
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<qint32, QString>; using InstancePropertyPair= QPair<ServerNodeInstance, PropertyName>; using DummyPair = QPair<QString, QPointer<QObject> >; + using InstancePropertyValueTriple = struct { + ServerNodeInstance instance; + PropertyName propertyName; + QVariant propertyValue; + }; explicit NodeInstanceServer(NodeInstanceClientInterface *nodeInstanceClient); @@ -168,6 +174,7 @@ protected: ValuesChangedCommand createValuesChangedCommand(const QList<ServerNodeInstance> &instanceList) const; ValuesChangedCommand createValuesChangedCommand(const QVector<InstancePropertyPair> &propertyList) const; + ValuesModifiedCommand createValuesModifiedCommand(const QVector<InstancePropertyValueTriple> &propertyList) const; PixmapChangedCommand createPixmapChangedCommand(const QList<ServerNodeInstance> &instanceList) const; InformationChangedCommand createAllInformationChangedCommand(const QList<ServerNodeInstance> &instanceList, bool initial = false) const; ChildrenChangedCommand createChildrenChangedCommand(const ServerNodeInstance &parentInstance, const QList<ServerNodeInstance> &instanceList) const; |