aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmldesigner/components/stateseditornew/propertymodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/qmldesigner/components/stateseditornew/propertymodel.cpp')
-rw-r--r--src/plugins/qmldesigner/components/stateseditornew/propertymodel.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/plugins/qmldesigner/components/stateseditornew/propertymodel.cpp b/src/plugins/qmldesigner/components/stateseditornew/propertymodel.cpp
index ef589465b9..f53ecce3af 100644
--- a/src/plugins/qmldesigner/components/stateseditornew/propertymodel.cpp
+++ b/src/plugins/qmldesigner/components/stateseditornew/propertymodel.cpp
@@ -114,6 +114,7 @@ void PropertyModel::setModelNodeBackend(const QVariant &modelNodeBackend)
setupModel();
emit modelNodeBackendChanged();
+ emit expandedChanged();
}
void PropertyModel::setExplicit(bool value)
@@ -146,6 +147,25 @@ void PropertyModel::removeProperty(const QString &name)
m_modelNode.removeProperty(name.toUtf8());
}
+void PropertyModel::setExpanded(bool value)
+{
+ if (!m_modelNode.isValid() || !m_modelNode.view()->isAttached())
+ return;
+
+ if (value)
+ m_modelNode.setAuxiliaryData("expanded@Internal", value);
+ else
+ m_modelNode.removeAuxiliaryData("expanded@Internal");
+}
+
+bool PropertyModel::expanded() const
+{
+ if (!m_modelNode.isValid() || !m_modelNode.view()->isAttached())
+ return false;
+
+ return m_modelNode.hasAuxiliaryData("expanded@Internal");
+}
+
void PropertyModel::registerDeclarativeType()
{
qmlRegisterType<PropertyModel>("HelperWidgets", 2, 0, "PropertyModel");