本文整理汇总了C++中model::ModelObject::model方法的典型用法代码示例。如果您正苦于以下问题:C++ ModelObject::model方法的具体用法?C++ ModelObject::model怎么用?C++ ModelObject::model使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类model::ModelObject
的用法示例。
在下文中一共展示了ModelObject::model方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: attach
void ModelObjectVectorController::attach(const model::ModelObject& modelObject)
{
detach();
m_modelObject = modelObject;
attachModel(modelObject.model());
connect(m_model->getImpl<model::detail::Model_Impl>().get(),
static_cast<void (model::detail::Model_Impl::*)(std::shared_ptr<detail::WorkspaceObject_Impl>, const IddObjectType &, const UUID &) const>(&model::detail::Model_Impl::addWorkspaceObject),
this,
&ModelObjectVectorController::objectAdded,
Qt::QueuedConnection);
connect(m_model->getImpl<model::detail::Model_Impl>().get(),
static_cast<void (model::detail::Model_Impl::*)(std::shared_ptr<detail::WorkspaceObject_Impl>, const IddObjectType &, const UUID &) const>(&model::detail::Model_Impl::removeWorkspaceObject),
this,
&ModelObjectVectorController::objectRemoved,
Qt::QueuedConnection);
connect(m_modelObject->getImpl<model::detail::ModelObject_Impl>().get(), &model::detail::ModelObject_Impl::onRelationshipChange,
this, &ModelObjectVectorController::changeRelationship);
connect(m_modelObject->getImpl<model::detail::ModelObject_Impl>().get(), &model::detail::ModelObject_Impl::onDataChange,
this, &ModelObjectVectorController::dataChange);
connect(m_modelObject->getImpl<model::detail::ModelObject_Impl>().get(), &model::detail::ModelObject_Impl::onChange,
this, &ModelObjectVectorController::change);
}
示例2: attach
void BuildingStorySpacesVectorController::attach(const model::ModelObject& modelObject)
{
ModelObjectVectorController::attach(modelObject);
BOOST_FOREACH(const model::Space& space, modelObject.model().getModelObjects<model::Space>()){
attachOtherModelObject(space);
}
}
示例3: attach
void SpaceSpaceTypeVectorController::attach(const model::ModelObject& modelObject)
{
ModelObjectVectorController::attach(modelObject);
model::Building building = modelObject.model().getUniqueModelObject<model::Building>();
attachOtherModelObject(building);
}