AbstractProperty ModelNode::property(const QString &name) const { if (!isValid()) throw InvalidModelNodeException(__LINE__, __FUNCTION__, __FILE__); return AbstractProperty(name, m_internalNode, model(), view()); }
AbstractProperty BindingProperty::resolveToProperty() const { if (!isValid()) throw InvalidModelNodeException(__LINE__, __FUNCTION__, __FILE__); QString binding = expression(); ModelNode node = parentModelNode(); QString element; if (binding.contains(QLatin1Char('.'))) { element = binding.split(QLatin1Char('.')).last(); QString nodeBinding = binding; nodeBinding.chop(element.length()); node = resolveBinding(nodeBinding, parentModelNode(), view()); } else { element = binding; } if (node.isValid()) return node.property(element); else return AbstractProperty(); }
uint qHash(const NodeAbstractProperty &property) { return qHash(AbstractProperty(property)); }
/*! \brief Returns if the the two property handles reference the same property in the same node */ bool operator ==(const NodeAbstractProperty &property1, const NodeAbstractProperty &property2) { return AbstractProperty(property1) == AbstractProperty(property2); }