本文整理汇总了C++中openstudio::model::ModelObject::handle方法的典型用法代码示例。如果您正苦于以下问题:C++ ModelObject::handle方法的具体用法?C++ ModelObject::handle怎么用?C++ ModelObject::handle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类openstudio::model::ModelObject
的用法示例。
在下文中一共展示了ModelObject::handle方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OSItem
ModelObjectItem::ModelObjectItem(const openstudio::model::ModelObject& modelObject,
bool isDefaulted,
OSItemType type,
QWidget * parent )
: OSItem(modelObjectToItemId(modelObject, isDefaulted), type, parent),
m_handle(modelObject.handle()),
m_modelObject(modelObject)
{
this->setText(QString::fromStdString(m_modelObject.name().get()));
connect(m_modelObject.getImpl<model::detail::ModelObject_Impl>().get(), &model::detail::ModelObject_Impl::onChange,
this, &ModelObjectItem::onObjectChanged);
if (!modelObject.getModelObjectSources<model::ComponentData>().empty()){
m_measureBadge->setMeasureBadgeType(MeasureBadgeType::BCLMeasure);
}
}
示例2: OSItem
ModelObjectItem::ModelObjectItem(const openstudio::model::ModelObject& modelObject,
bool isDefaulted,
OSItem::Type type,
QWidget * parent )
: OSItem(modelObjectToItemId(modelObject, isDefaulted), type, parent),
m_handle(modelObject.handle()),
m_modelObject(modelObject)
{
this->setText(QString::fromStdString(m_modelObject.name().get()));
bool isConnected = false;
isConnected = connect( m_modelObject.getImpl<openstudio::model::detail::ModelObject_Impl>().get(),
SIGNAL(onChange()),
this,
SLOT(onObjectChanged()) );
OS_ASSERT(isConnected);
if (!modelObject.getModelObjectSources<model::ComponentData>().empty()){
m_bclBadge->setVisible(true);
}
}
示例3: modelObjectToItemId
OSItemId modelObjectToItemId(const openstudio::model::ModelObject& modelObject, bool isDefaulted)
{
std::stringstream ss;
ss << modelObject;
return OSItemId(modelObject.handle().toString(), modelToSourceId(modelObject.model()), isDefaulted, toQString(ss.str()));
}