Esempio n. 1
0
NodeProperty ModelNode::nodeProperty(const QString &name) const
{
      if (!isValid())
        throw InvalidModelNodeException(__LINE__, __FUNCTION__, __FILE__);

    return NodeProperty(name, m_internalNode, model(), view());
}
Esempio n. 2
0
NodeProperty NodeTree::nodeProperty(NodeID nodeID, PropertyID propID)
{
    if(!validateNode(nodeID))
        return NodeProperty();

    return _nodes[nodeID].property(propID);
}
NodeProperty AbstractProperty::toNodeProperty() const
{
    if (!isValid())
        throw InvalidPropertyException(__LINE__, __FUNCTION__, __FILE__, m_propertyName);

    NodeProperty propertyNode(name(), internalNode(), model(), view());

    if (propertyNode.isNodeProperty())
        return propertyNode;

    return NodeProperty();
}