void ScheduleSetsController::onAddObject(const openstudio::IddObjectType& iddObjectType)
{
  switch(iddObjectType.value()){
    case IddObjectType::OS_DefaultScheduleSet:
      openstudio::model::DefaultScheduleSet(this->model());
      break;
    default:
      LOG_FREE_AND_THROW("ScheduleSetsController", "Unknown IddObjectType '" << iddObjectType.valueName() << "'");
  }
}
Exemplo n.º 2
0
void MaterialsController::onAddObject(const openstudio::IddObjectType& iddObjectType)
{
  model::Model model = this->model();
  boost::optional<model::Material> mat;

  switch(iddObjectType.value()){
    case IddObjectType::OS_Material:
      mat = openstudio::model::StandardOpaqueMaterial(model);
      break;
    case IddObjectType::OS_Material_NoMass:
      mat = openstudio::model::MasslessOpaqueMaterial(model);
      break;
    case IddObjectType::OS_Material_AirGap:
      mat = openstudio::model::AirGap(model);
      break;
    case IddObjectType::OS_Material_AirWall:
      mat = openstudio::model::AirWallMaterial(model);
      break;
    case IddObjectType::OS_Material_InfraredTransparent:
      mat = openstudio::model::InfraredTransparentMaterial(model);
      break;
    case IddObjectType::OS_Material_RoofVegetation:
      mat = openstudio::model::RoofVegetation(model);
      break;
    case IddObjectType::OS_WindowMaterial_SimpleGlazingSystem:
      mat = openstudio::model::SimpleGlazing(model);
      break;
    case IddObjectType::OS_WindowMaterial_Glazing:
      mat = openstudio::model::StandardGlazing(model);
      break;
    case IddObjectType::OS_WindowMaterial_Gas:
      mat = openstudio::model::Gas(model);
      break;
    case IddObjectType::OS_WindowMaterial_GasMixture:
      mat = openstudio::model::GasMixture(model);
      break;
    case IddObjectType::OS_WindowMaterial_Blind:
      mat = openstudio::model::Blind(model);
      break;
    case IddObjectType::OS_WindowMaterial_Screen:
      mat = openstudio::model::Screen(model);
      break;
    case IddObjectType::OS_WindowMaterial_Shade:
      mat = openstudio::model::Shade(model);
      break;
    case IddObjectType::OS_WindowMaterial_Glazing_RefractionExtinctionMethod:
      mat = openstudio::model::RefractionExtinctionGlazing(model);
      break;
    case IddObjectType::OS_WindowMaterial_GlazingGroup_Thermochromic:
      mat = openstudio::model::ThermochromicGlazing(model);
      break;
    default:
      LOG_FREE_AND_THROW("MaterialsController", "Unknown IddObjectType '" << iddObjectType.valueName() << "'");
  }
}
Exemplo n.º 3
0
  void VariablesList::onRemoved(const WorkspaceObject&, const openstudio::IddObjectType& type, const openstudio::UUID&)
  {
    LOG(Debug, "onRemoved " << type.valueName());

    /// \todo if the user is remove to add an output variable through some other means it will not show up here and now
    if (type != openstudio::IddObjectType::OS_Output_Variable)
    {
      if (!m_dirty){
        m_dirty = true;
        QTimer::singleShot(0, this, SLOT(updateVariableList()));
      }
    }
  }
void ConstructionsController::onAddObject(const openstudio::IddObjectType& iddObjectType)
{
  switch(iddObjectType.value()){
    case IddObjectType::OS_Construction:
      openstudio::model::Construction(this->model());
      break;
    case IddObjectType::OS_Construction_InternalSource:
      openstudio::model::ConstructionWithInternalSource(this->model());
      break;
    case IddObjectType::OS_Construction_CfactorUndergroundWall:
      openstudio::model::CFactorUndergroundWallConstruction(this->model());
      break;
    case IddObjectType::OS_Construction_FfactorGroundFloor:
      openstudio::model::FFactorGroundFloorConstruction(this->model());
      break;
    case IddObjectType::OS_Construction_WindowDataFile:
      openstudio::model::WindowDataFile(this->model());
      break;
    default:
      LOG_FREE_AND_THROW("ConstructionsController", "Unknown IddObjectType '" << iddObjectType.valueName() << "'");
  }
}