本文整理汇总了C++中NodeInstance::instanceId方法的典型用法代码示例。如果您正苦于以下问题:C++ NodeInstance::instanceId方法的具体用法?C++ NodeInstance::instanceId怎么用?C++ NodeInstance::instanceId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NodeInstance
的用法示例。
在下文中一共展示了NodeInstance::instanceId方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: insertInstanceRelationships
void NodeInstanceView::insertInstanceRelationships(const NodeInstance &instance)
{
Q_ASSERT(instance.instanceId() >=0);
if (m_nodeInstanceHash.contains(instance.modelNode()))
return;
m_nodeInstanceHash.insert(instance.modelNode(), instance);
}
示例2: nodeSourceChanged
void NodeInstanceView::nodeSourceChanged(const ModelNode &node, const QString & newNodeSource)
{
if (hasInstanceForModelNode(node)) {
NodeInstance instance = instanceForModelNode(node);
ChangeNodeSourceCommand changeNodeSourceCommand(instance.instanceId(), newNodeSource);
nodeInstanceServer()->changeNodeSource(changeNodeSourceCommand);
}
}
示例3: auxiliaryDataChanged
void NodeInstanceView::auxiliaryDataChanged(const ModelNode &node, const PropertyName &name, const QVariant &data)
{
if ((node.isRootNode() && (name == "width" || name == "height")) || name.endsWith(PropertyName("@NodeInstance"))) {
if (hasInstanceForModelNode(node)) {
NodeInstance instance = instanceForModelNode(node);
QVariant value = data;
if (value.isValid()) {
PropertyValueContainer container(instance.instanceId(), name, value, TypeName());
ChangeAuxiliaryCommand changeAuxiliaryCommand(QVector<PropertyValueContainer>() << container);
nodeInstanceServer()->changeAuxiliaryValues(changeAuxiliaryCommand);
} else {
if (node.hasVariantProperty(name)) {
PropertyValueContainer container(instance.instanceId(), name, node.variantProperty(name).value(), TypeName());
ChangeValuesCommand changeValueCommand(QVector<PropertyValueContainer>() << container);
nodeInstanceServer()->changePropertyValues(changeValueCommand);
} else if (node.hasBindingProperty(name)) {
PropertyBindingContainer container(instance.instanceId(), name, node.bindingProperty(name).expression(), TypeName());
ChangeBindingsCommand changeValueCommand(QVector<PropertyBindingContainer>() << container);
nodeInstanceServer()->changePropertyBindings(changeValueCommand);
}
}
}
}
}
示例4:
bool operator ==(const NodeInstance &first, const NodeInstance &second)
{
return first.instanceId() >= 0 && first.instanceId() == second.instanceId();
}