Commit 4d3c15f8 authored by Marco Bubke's avatar Marco Bubke

QmlDesigner: Add defaultNodeAbstractProperty

Change-Id: Iebdb0604f02034a18a13b631ab553a84fccbc8ae
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@digia.com>
parent 99b9299f
...@@ -123,6 +123,7 @@ public: ...@@ -123,6 +123,7 @@ public:
NodeListProperty nodeListProperty(const PropertyName &name) const; NodeListProperty nodeListProperty(const PropertyName &name) const;
NodeProperty nodeProperty(const PropertyName &name) const; NodeProperty nodeProperty(const PropertyName &name) const;
NodeAbstractProperty nodeAbstractProperty(const PropertyName &name) const; NodeAbstractProperty nodeAbstractProperty(const PropertyName &name) const;
NodeAbstractProperty defaultNodeAbstractProperty() const;
void removeProperty(const PropertyName &name); //### also implement in AbstractProperty void removeProperty(const PropertyName &name); //### also implement in AbstractProperty
QList<AbstractProperty> properties() const; QList<AbstractProperty> properties() const;
......
...@@ -66,6 +66,7 @@ public: ...@@ -66,6 +66,7 @@ public:
void setVariantProperty(const PropertyName &name, const QVariant &value); void setVariantProperty(const PropertyName &name, const QVariant &value);
void setBindingProperty(const PropertyName &name, const QString &expression); void setBindingProperty(const PropertyName &name, const QString &expression);
NodeAbstractProperty nodeAbstractProperty(const PropertyName &name) const; NodeAbstractProperty nodeAbstractProperty(const PropertyName &name) const;
NodeAbstractProperty defaultNodeAbstractProperty() const;
NodeProperty nodeProperty(const PropertyName &name) const; NodeProperty nodeProperty(const PropertyName &name) const;
NodeListProperty nodeListProperty(const PropertyName &name) const; NodeListProperty nodeListProperty(const PropertyName &name) const;
......
...@@ -414,7 +414,12 @@ NodeAbstractProperty ModelNode::nodeAbstractProperty(const PropertyName &name) c ...@@ -414,7 +414,12 @@ NodeAbstractProperty ModelNode::nodeAbstractProperty(const PropertyName &name) c
if (!isValid()) if (!isValid())
throw InvalidModelNodeException(__LINE__, __FUNCTION__, __FILE__); throw InvalidModelNodeException(__LINE__, __FUNCTION__, __FILE__);
return NodeAbstractProperty(name, m_internalNode, model(), view()); return NodeAbstractProperty(name, m_internalNode, model(), view());
}
NodeAbstractProperty ModelNode::defaultNodeAbstractProperty() const
{
return nodeAbstractProperty(metaInfo().defaultPropertyName());
} }
......
...@@ -130,7 +130,12 @@ bool QmlObjectNode::hasBindingProperty(const PropertyName &name) const ...@@ -130,7 +130,12 @@ bool QmlObjectNode::hasBindingProperty(const PropertyName &name) const
NodeAbstractProperty QmlObjectNode::nodeAbstractProperty(const PropertyName &name) const NodeAbstractProperty QmlObjectNode::nodeAbstractProperty(const PropertyName &name) const
{ {
return modelNode().nodeAbstractProperty(name); return modelNode().nodeAbstractProperty(name);
}
NodeAbstractProperty QmlObjectNode::defaultNodeAbstractProperty() const
{
return modelNode().defaultNodeAbstractProperty();
} }
NodeProperty QmlObjectNode::nodeProperty(const PropertyName &name) const NodeProperty QmlObjectNode::nodeProperty(const PropertyName &name) const
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment