Beispiel #1
0
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();      
  }
}
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() << "'");
  }

}
Beispiel #3
0
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();      
  }
}
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();      
  }
}
void ThermalZonesController::onAddObject(const openstudio::model::ModelObject& modelObject)
{
  OS_ASSERT(IddObjectType::OS_ThermalZone == modelObject.iddObjectType().value());
  openstudio::model::ThermalZone(this->model());
}
Beispiel #6
0
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);
}