本文整理汇总了C++中QmlItemNode::hasBindingProperty方法的典型用法代码示例。如果您正苦于以下问题:C++ QmlItemNode::hasBindingProperty方法的具体用法?C++ QmlItemNode::hasBindingProperty怎么用?C++ QmlItemNode::hasBindingProperty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QmlItemNode
的用法示例。
在下文中一共展示了QmlItemNode::hasBindingProperty方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setItems
void BindingIndicator::setItems(const QList<FormEditorItem *> &itemList)
{
clear();
if (itemList.count() == 1) {
m_formEditorItem = itemList.first();
QmlItemNode qmlItemNode = m_formEditorItem->qmlItemNode();
if (qmlItemNode.hasBindingProperty("x")) {
m_indicatorTopShape = new BindingIndicatorGraphicsItem(m_layerItem.data());
m_indicatorTopShape->updateBindingIndicator(leftLine(qmlItemNode));
}
if (qmlItemNode.hasBindingProperty("y")) {
m_indicatorLeftShape = new BindingIndicatorGraphicsItem(m_layerItem.data());
m_indicatorLeftShape->updateBindingIndicator(topLine(qmlItemNode));
}
if (qmlItemNode.hasBindingProperty("width")) {
m_indicatorRightShape = new BindingIndicatorGraphicsItem(m_layerItem.data());
m_indicatorRightShape->updateBindingIndicator(rightLine(qmlItemNode));
}
if (qmlItemNode.hasBindingProperty("height")) {
m_indicatorBottomShape = new BindingIndicatorGraphicsItem(m_layerItem.data());
m_indicatorBottomShape->updateBindingIndicator(bottomLine(qmlItemNode));
}
}
}
示例2: foreach
foreach (FormEditorItem *formEditorItem, itemList) {
if (formEditorItem == m_formEditorItem) {
QmlItemNode qmlItemNode = m_formEditorItem->qmlItemNode();
if (qmlItemNode.hasBindingProperty("x")) {
if (m_indicatorTopShape.isNull())
m_indicatorTopShape = new BindingIndicatorGraphicsItem(m_layerItem.data());
m_indicatorTopShape->updateBindingIndicator(leftLine(qmlItemNode));
} else {
delete m_indicatorTopShape;
}
if (qmlItemNode.hasBindingProperty("y")) {
if (m_indicatorLeftShape.isNull())
m_indicatorLeftShape = new BindingIndicatorGraphicsItem(m_layerItem.data());
m_indicatorLeftShape->updateBindingIndicator(topLine(qmlItemNode));
} else {
delete m_indicatorLeftShape;
}
if (qmlItemNode.hasBindingProperty("width")) {
if (m_indicatorRightShape.isNull())
m_indicatorRightShape = new BindingIndicatorGraphicsItem(m_layerItem.data());
m_indicatorRightShape->updateBindingIndicator(rightLine(qmlItemNode));
} else {
delete m_indicatorRightShape;
}
if (qmlItemNode.hasBindingProperty("height")) {
if (m_indicatorBottomShape.isNull())
m_indicatorBottomShape = new BindingIndicatorGraphicsItem(m_layerItem.data());
m_indicatorBottomShape->updateBindingIndicator(bottomLine(qmlItemNode));
} else {
delete m_indicatorBottomShape;
}
return;
}
}