QmlDesigner: Add defaultNodeAbstractProperty

Change-Id: Iebdb0604f02034a18a13b631ab553a84fccbc8ae
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
This commit is contained in:
Marco Bubke
2013-07-30 17:27:17 +02:00
parent 99b9299f16
commit 4d3c15f87b
4 changed files with 14 additions and 2 deletions

View File

@@ -123,6 +123,7 @@ public:
NodeListProperty nodeListProperty(const PropertyName &name) const;
NodeProperty nodeProperty(const PropertyName &name) const;
NodeAbstractProperty nodeAbstractProperty(const PropertyName &name) const;
NodeAbstractProperty defaultNodeAbstractProperty() const;
void removeProperty(const PropertyName &name); //### also implement in AbstractProperty
QList<AbstractProperty> properties() const;

View File

@@ -66,6 +66,7 @@ public:
void setVariantProperty(const PropertyName &name, const QVariant &value);
void setBindingProperty(const PropertyName &name, const QString &expression);
NodeAbstractProperty nodeAbstractProperty(const PropertyName &name) const;
NodeAbstractProperty defaultNodeAbstractProperty() const;
NodeProperty nodeProperty(const PropertyName &name) const;
NodeListProperty nodeListProperty(const PropertyName &name) const;

View File

@@ -417,6 +417,11 @@ NodeAbstractProperty ModelNode::nodeAbstractProperty(const PropertyName &name) c
return NodeAbstractProperty(name, m_internalNode, model(), view());
}
NodeAbstractProperty ModelNode::defaultNodeAbstractProperty() const
{
return nodeAbstractProperty(metaInfo().defaultPropertyName());
}
/*!
\brief Returns a VariantProperty

View File

@@ -133,6 +133,11 @@ NodeAbstractProperty QmlObjectNode::nodeAbstractProperty(const PropertyName &nam
return modelNode().nodeAbstractProperty(name);
}
NodeAbstractProperty QmlObjectNode::defaultNodeAbstractProperty() const
{
return modelNode().defaultNodeAbstractProperty();
}
NodeProperty QmlObjectNode::nodeProperty(const PropertyName &name) const
{
return modelNode().nodeProperty(name);