本文整理汇总了C++中DocumentObject::getOldLabel方法的典型用法代码示例。如果您正苦于以下问题:C++ DocumentObject::getOldLabel方法的具体用法?C++ DocumentObject::getOldLabel怎么用?C++ DocumentObject::getOldLabel使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DocumentObject
的用法示例。
在下文中一共展示了DocumentObject::getOldLabel方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: slotObjectRenamed
void PropertyExpressionEngine::slotObjectRenamed(const DocumentObject &obj)
{
#ifdef FC_PROPERTYEXPRESSIONENGINE_LOG
std::clog << "Object " << obj.getOldLabel() << " renamed to " << obj.Label.getValue() << std::endl;
#endif
DocumentObject * docObj = freecad_dynamic_cast<DocumentObject>(getContainer());
/* In a document object, and on undo stack? */
if (!docObj || docObj->getNameInDocument() == 0)
return;
RelabelDocumentObjectExpressionVisitor v(boost::bind( &PropertyExpressionEngine::aboutToSetValue, this),
boost::bind( &PropertyExpressionEngine::hasSetValue, this),
obj.getOldLabel(), obj.Label.getStrValue());
for (ExpressionMap::iterator it = expressions.begin(); it != expressions.end(); ++it) {
int changed = v.getChanged();
it->second.expression->visit(v);
if (changed != v.getChanged())
expressionChanged(it->first);
}
}
示例2: slotObjectRenamed
void PropertyExpressionEngine::slotObjectRenamed(const DocumentObject &obj)
{
#ifdef FC_PROPERTYEXPRESSIONENGINE_LOG
std::clog << "Object " << obj.getOldLabel() << " renamed to " << obj.Label.getValue() << std::endl;
#endif
RelabelDocumentObjectExpressionVisitor v(obj.getOldLabel(), obj.Label.getStrValue());
aboutToSetValue();
for (ExpressionMap::iterator it = expressions.begin(); it != expressions.end(); ++it)
it->second.expression->visit(v);
hasSetValue();
}