QmlDesigner: Add and dispatch ValuesModifiedCommand

We already have valuesChanged() which notifies that a
property of the C++ QObject has changed.

This patch adds valuesModified() which notifies that values
in the data model should be changed.

While valuesChanged() only changes the so called instance value,
valuesModified() does change the internal data model and as
a result the QML code.
This is done in NodeInstanceView::valuesModified().

This enabled the qml2puppet to acutally change values,
like a property editor would.

Change-Id: I2493b9e626c4b194e332a7a096de3dbf2195514a
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Thomas Hartmann
2019-10-18 16:55:08 +02:00
parent b4bc204a7d
commit 49379bfda7
9 changed files with 58 additions and 6 deletions

View File

@@ -125,6 +125,9 @@ void NodeInstanceServerInterface::registerCommands()
qRegisterMetaType<ValuesChangedCommand>("ValuesChangedCommand");
qRegisterMetaTypeStreamOperators<ValuesChangedCommand>("ValuesChangedCommand");
qRegisterMetaType<ValuesModifiedCommand>("ValuesModifiedCommand");
qRegisterMetaTypeStreamOperators<ValuesModifiedCommand>("ValuesModifiedCommand");
qRegisterMetaType<PixmapChangedCommand>("PixmapChangedCommand");
qRegisterMetaTypeStreamOperators<PixmapChangedCommand>("PixmapChangedCommand");