本文整理汇总了C++中openstudio::model::ModelObject::iddObjectType方法的典型用法代码示例。如果您正苦于以下问题:C++ ModelObject::iddObjectType方法的具体用法?C++ ModelObject::iddObjectType怎么用?C++ ModelObject::iddObjectType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类openstudio::model::ModelObject
的用法示例。
在下文中一共展示了ModelObject::iddObjectType方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: onSelectModelObject
void LoadsInspectorView::onSelectModelObject(const openstudio::model::ModelObject& modelObject)
{
switch( modelObject.iddObjectType().value() )
{
case IddObjectType::OS_People_Definition:
this->showPeopleDefinitionsInspector(modelObject);
break;
case IddObjectType::OS_Lights_Definition:
this->showLightsDefinitionsInspector(modelObject);
break;
case IddObjectType::OS_Luminaire_Definition:
this->showLuminaireDefinitionsInspector(modelObject);
break;
case IddObjectType::OS_ElectricEquipment_Definition:
this->showElectricEquipmentDefinitionsInspector(modelObject);
break;
case IddObjectType::OS_GasEquipment_Definition:
this->showGasEquipmentDefinitionsInspector(modelObject);
break;
case IddObjectType::OS_SteamEquipment_Definition:
this->showSteamEquipmentDefinitionsInspector(modelObject);
break;
case IddObjectType::OS_OtherEquipment_Definition:
this->showOtherEquipmentDefinitionsInspector(modelObject);
break;
case IddObjectType::OS_InternalMass_Definition:
this->showInternalMassDefinitionsInspector(modelObject);
break;
case IddObjectType::OS_WaterUse_Equipment_Definition:
this->showWaterUseEquipmentDefinitionsInspector(modelObject);
break;
default:
showDefaultView();
}
}
示例2: onAddObject
void SpaceTypesController::onAddObject(const openstudio::model::ModelObject& modelObject)
{
if (IddObjectType::OS_SpaceType == modelObject.iddObjectType().value()) {
openstudio::model::SpaceType(this->model());
return;
}
boost::optional<model::ParentObject> parent = modelObject.parent();
OS_ASSERT(parent);
// Expect a load from the gridview loads tab
switch (modelObject.iddObjectType().value()){
case IddObjectType::OS_People:
openstudio::model::People(openstudio::model::PeopleDefinition(this->model())).setParent(*parent);
break;
case IddObjectType::OS_InternalMass:
openstudio::model::InternalMass(openstudio::model::InternalMassDefinition(this->model())).setParent(*parent);
break;
case IddObjectType::OS_Lights:
openstudio::model::Lights(openstudio::model::LightsDefinition(this->model())).setParent(*parent);
break;
case IddObjectType::OS_Luminaire:
openstudio::model::Luminaire(openstudio::model::LuminaireDefinition(this->model())).setParent(*parent);
break;
case IddObjectType::OS_ElectricEquipment:
openstudio::model::ElectricEquipment(openstudio::model::ElectricEquipmentDefinition(this->model())).setParent(*parent);
break;
case IddObjectType::OS_GasEquipment:
openstudio::model::GasEquipment(openstudio::model::GasEquipmentDefinition(this->model())).setParent(*parent);
break;
case IddObjectType::OS_SteamEquipment:
openstudio::model::SteamEquipment(openstudio::model::SteamEquipmentDefinition(this->model())).setParent(*parent);
break;
case IddObjectType::OS_OtherEquipment:
openstudio::model::OtherEquipment(openstudio::model::OtherEquipmentDefinition(this->model())).setParent(*parent);
break;
case IddObjectType::OS_WaterUse_Equipment:
openstudio::model::WaterUseEquipment(openstudio::model::WaterUseEquipmentDefinition(this->model())).setParent(*parent);
break;
default:
// Should not get here
OS_ASSERT(false);
LOG_FREE(Error, "LoadsController", "Unknown IddObjectType '" << modelObject.iddObjectType().valueName() << "'");
}
}
示例3: onSelectModelObject
void MaterialsInspectorView::onSelectModelObject(const openstudio::model::ModelObject& modelObject)
{
switch( modelObject.iddObjectType().value() )
{
case IddObjectType::OS_Material:
this->showMaterialInspectorView(modelObject);
break;
case IddObjectType::OS_Material_AirGap:
this->showMaterialAirGapInspectorView(modelObject);
break;
case IddObjectType::OS_Material_AirWall:
this->showMaterialAirWallInspectorView(modelObject);
break;
case IddObjectType::OS_Material_InfraredTransparent:
this->showMaterialInfraredTransparentInspectorView(modelObject);
break;
case IddObjectType::OS_Material_NoMass:
this->showMaterialNoMassInspectorView(modelObject);
break;
case IddObjectType::OS_Material_RoofVegetation:
this->showMaterialRoofVegetationInspectorView(modelObject);
break;
case IddObjectType::OS_WindowMaterial_Blind:
this->showWindowMaterialBlindInspectorView(modelObject);
break;
case IddObjectType::OS_WindowMaterial_Gas:
this->showWindowMaterialGasInspectorView(modelObject);
break;
case IddObjectType::OS_WindowMaterial_GasMixture:
this->showWindowMaterialGasMixtureInspectorView(modelObject);
break;
case IddObjectType::OS_WindowMaterial_Glazing:
this->showWindowMaterialGlazingInspectorView(modelObject);
break;
case IddObjectType::OS_WindowMaterial_Glazing_RefractionExtinctionMethod:
this->showWindowMaterialGlazingRefractionExtinctionMethodInspectorView(modelObject);
break;
case IddObjectType::OS_WindowMaterial_GlazingGroup_Thermochromic:
this->showWindowMaterialGlazingGroupThermochromicInspectorView(modelObject);
break;
case IddObjectType::OS_WindowMaterial_Screen:
this->showWindowMaterialScreenInspectorView(modelObject);
break;
case IddObjectType::OS_WindowMaterial_Shade:
this->showWindowMaterialShadeInspectorView(modelObject);
break;
case IddObjectType::OS_WindowMaterial_SimpleGlazingSystem:
this->showWindowMaterialSimpleGlazingSystemInspectorView(modelObject);
break;
default:
showDefaultView();
}
}
示例4: onSelectModelObject
void ConstructionsInspectorView::onSelectModelObject(const openstudio::model::ModelObject& modelObject)
{
switch( modelObject.iddObjectType().value() )
{
case IddObjectType::OS_Construction:
this->showConstructionInspector(modelObject);
break;
case IddObjectType::OS_Construction_CfactorUndergroundWall:
this->showCfactorUndergroundWallInspector(modelObject);
break;
case IddObjectType::OS_Construction_FfactorGroundFloor:
this->showFfactorGroundFloorInspector(modelObject);
break;
case IddObjectType::OS_Construction_InternalSource:
this->showInternalSourceInspector(modelObject);
break;
case IddObjectType::OS_Construction_WindowDataFile:
this->showWindowDataFileInspector(modelObject);
break;
default:
showDefaultView();
}
}
示例5: onAddObject
void ThermalZonesController::onAddObject(const openstudio::model::ModelObject& modelObject)
{
OS_ASSERT(IddObjectType::OS_ThermalZone == modelObject.iddObjectType().value());
openstudio::model::ThermalZone(this->model());
}
示例6: onSelectModelObject
void FacilityInspectorView::onSelectModelObject(const openstudio::model::ModelObject& modelObject)
{
int index = 1;
std::map<openstudio::IddObjectType, int>::const_iterator it = m_inspectorIndexMap.find(modelObject.iddObjectType());
if (it != m_inspectorIndexMap.end()){
index = it->second;
}
QWidget* widget = this->stackedWidget()->widget(index);
ModelObjectInspectorView* modelObjectInspectorView = qobject_cast<ModelObjectInspectorView*>(widget);
OS_ASSERT(modelObjectInspectorView);
modelObjectInspectorView->selectModelObject(modelObject);
this->stackedWidget()->setCurrentIndex(index);
}