本文整理汇总了C++中model::ModelObject::handle方法的典型用法代码示例。如果您正苦于以下问题:C++ ModelObject::handle方法的具体用法?C++ ModelObject::handle怎么用?C++ ModelObject::handle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类model::ModelObject
的用法示例。
在下文中一共展示了ModelObject::handle方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: attachOtherModelObject
void ModelObjectVectorController::attachOtherModelObject(const model::ModelObject& modelObject)
{
// check not already connected
for (const model::ModelObject& currentModelObject : m_otherModelObjects){
if (modelObject.handle() == currentModelObject.handle()){
return;
}
}
m_otherModelObjects.push_back(modelObject);
connect(modelObject.getImpl<model::detail::ModelObject_Impl>().get(), &model::detail::ModelObject_Impl::onRelationshipChange,
this, &ModelObjectVectorController::changeRelationship);
}
示例2: detachOtherModelObject
void ModelObjectVectorController::detachOtherModelObject(const model::ModelObject& modelObject)
{
std::vector<model::ModelObject>::const_iterator it = m_otherModelObjects.begin();
std::vector<model::ModelObject>::const_iterator itend = m_otherModelObjects.end();
std::vector<model::ModelObject> newVector;
for (; it != itend; ++it){
if (it->handle() == modelObject.handle()){
disconnect(modelObject.getImpl<model::detail::ModelObject_Impl>().get());
}else{
newVector.push_back(*it);
}
}
m_otherModelObjects.swap(newVector);
}
示例3: attachOtherModelObject
void ModelObjectVectorController::attachOtherModelObject(const model::ModelObject& modelObject)
{
// check not already connected
BOOST_FOREACH(const model::ModelObject& currentModelObject, m_otherModelObjects){
if (modelObject.handle() == currentModelObject.handle()){
return;
}
}
m_otherModelObjects.push_back(modelObject);
bool isConnected = false;
isConnected = connect(modelObject.getImpl<model::detail::ModelObject_Impl>().get(),
SIGNAL(onRelationshipChange(int, Handle, Handle)),
this,
SLOT(changeRelationship(int, Handle, Handle)));
OS_ASSERT(isConnected);
}
示例4: onDataChange
void SubSurfaceConstructionVectorController::onDataChange(const model::ModelObject& modelObject)
{
if (m_modelObject && (modelObject.handle() == m_modelObject->handle())){
emit itemIds(makeVector());
}
}