aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmldesigner/components/stateseditornew/propertychangesmodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/qmldesigner/components/stateseditornew/propertychangesmodel.cpp')
-rw-r--r--src/plugins/qmldesigner/components/stateseditornew/propertychangesmodel.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/plugins/qmldesigner/components/stateseditornew/propertychangesmodel.cpp b/src/plugins/qmldesigner/components/stateseditornew/propertychangesmodel.cpp
index a2f022c119..85a81537b7 100644
--- a/src/plugins/qmldesigner/components/stateseditornew/propertychangesmodel.cpp
+++ b/src/plugins/qmldesigner/components/stateseditornew/propertychangesmodel.cpp
@@ -123,6 +123,7 @@ void PropertyChangesModel::setModelNodeBackend(const QVariant &modelNodeBackend)
m_view->registerPropertyChangesModel(this);
emit modelNodeBackendChanged();
+ emit propertyChangesVisibleChanged();
}
void PropertyChangesModel::reset()
@@ -138,6 +139,25 @@ int PropertyChangesModel::count() const
return rowCount();
}
+void PropertyChangesModel::setPropertyChangesVisible(bool value)
+{
+ if (!m_modelNode.isValid() || !m_modelNode.view()->isAttached())
+ return;
+
+ if (value)
+ m_modelNode.setAuxiliaryData("propertyChangesVisible@Internal", value);
+ else
+ m_modelNode.removeAuxiliaryData("propertyChangesVisible@Internal");
+}
+
+bool PropertyChangesModel::propertyChangesVisible() const
+{
+ if (!m_modelNode.isValid() || !m_modelNode.view()->isAttached())
+ return false;
+
+ return m_modelNode.hasAuxiliaryData("propertyChangesVisible@Internal");
+}
+
void PropertyChangesModel::registerDeclarativeType()
{
qmlRegisterType<PropertyChangesModel>("HelperWidgets", 2, 0, "PropertyChangesModel");