Commit ee45309a authored by Gerrit Erichsen's avatar Gerrit Erichsen
Browse files

Added Biomass and CSP to configuration and made models and configuration part...

Added Biomass and CSP to configuration and made models and configuration part of save/load project tasks
parent 8fdbb660
......@@ -667,7 +667,8 @@ void CharLGui::initWidgets()
m_nodeWidget = new NodesWidget(m_modelNodes,
m_modelSelectPlant, m_modelSelectStorage, m_modelSelectWind,
m_modelSelectPV, m_modelSelectLocation, m_preferences, this);
m_modelSelectPV, m_modelSelectBiomass, m_modelSelectCSP,
m_modelSelectLocation, m_preferences, this);
m_nodeWidget->setObjectName("NodeWidget");
m_gridWidget = new GridWidget(m_modelGridCapacities, m_modelGridImpedances,
......@@ -1192,18 +1193,24 @@ bool CharLGui::saveProject()
// tab units //////////////////////////////////////////////////////////////////////////////////
QDomElement units = project.createElement("power_units");
root.appendChild(units);
QDomElement conventionals = project.createElement("conventionals");
QDomElement conventionals = project.createElement(m_modelConventional->getParentXmlTag());
units.appendChild(conventionals);
m_modelConventional->writeToXml(project, conventionals);
QDomElement storages = project.createElement("storages");
QDomElement storages = project.createElement(m_modelStorage->getParentXmlTag());
units.appendChild(storages);
m_modelStorage->writeToXml(project, storages);
QDomElement solar = project.createElement("solar_parks");
QDomElement solar = project.createElement(m_modelSolar->getParentXmlTag());
units.appendChild(solar);
m_modelSolar->writeToXml(project, solar);
QDomElement wind = project.createElement("wind_parks");
QDomElement wind = project.createElement(m_modelWind->getParentXmlTag());
units.appendChild(wind);
m_modelWind->writeToXml(project, wind);
QDomElement biomass = project.createElement(m_modelBiomass->getParentXmlTag());
units.appendChild(biomass);
m_modelBiomass->writeToXml(project, biomass);
QDomElement csp = project.createElement(m_modelCSP->getParentXmlTag());
units.appendChild(csp);
m_modelCSP->writeToXml(project, csp);
// tab data ///////////////////////////////////////////////////////////////////////////////////
QDomElement data = project.createElement("data");
root.appendChild(data);
......@@ -1252,6 +1259,14 @@ bool CharLGui::saveProject()
node.appendChild(config);
config.setAttribute("type", "wind");
item->getWindTablePtr()->writeToXml(project, config);
config = project.createElement("config"); //biomass config
node.appendChild(config);
config.setAttribute("type", "biomass");
item->getBiomassTablePtr()->writeToXml(project, config);
config = project.createElement("config"); //csp config
node.appendChild(config);
config.setAttribute("type", "csp");
item->getCSPTablePtr()->writeToXml(project, config);
QDomElement mapPolygonElement = project.createElement("map_polygon");
QDomText mapPolygonText = project.createTextNode(PolygonCalculations::toString(item->getMapPolygon()));
mapPolygonElement.appendChild(mapPolygonText);
......@@ -1357,22 +1372,30 @@ bool CharLGui::loadProject()
while(!child.isNull())
{
QDomElement childElement = child.toElement();
if (childElement.tagName() == "conventionals")
if (childElement.tagName() == m_modelConventional->getParentXmlTag())
{
m_modelConventional->readFromXml(childElement);
}
else if (childElement.tagName() == "storages")
else if (childElement.tagName() == m_modelStorage->getParentXmlTag())
{
m_modelStorage->readFromXml(childElement);
}
else if (childElement.tagName() == "solar_parks")
else if (childElement.tagName() == m_modelSolar->getParentXmlTag())
{
m_modelSolar->readFromXml(childElement);
}
else if (childElement.tagName() == "wind_parks")
else if (childElement.tagName() == m_modelWind->getParentXmlTag())
{
m_modelWind->readFromXml(childElement);
}
else if (childElement.tagName() == m_modelBiomass->getParentXmlTag())
{
m_modelBiomass->readFromXml(childElement);
}
else if (childElement.tagName() == m_modelCSP->getParentXmlTag())
{
m_modelCSP->readFromXml(childElement);
}
child = child.nextSibling();
}
}
......@@ -1443,6 +1466,18 @@ bool CharLGui::loadProject()
item->getWindTablePtr()->setSelectorModelLocations(m_modelSelectLocation);
item->getWindTablePtr()->readFromXml(grandElement);
}
else if (grandElement.attribute("type") == "biomass")
{
item->getBiomassTablePtr()->setSelectorModelProducer(m_modelSelectBiomass);
item->getBiomassTablePtr()->setSelectorModelLocations(m_modelSelectLocation);
item->getBiomassTablePtr()->readFromXml(grandElement);
}
else if (grandElement.attribute("type") == "csp")
{
item->getCSPTablePtr()->setSelectorModelProducer(m_modelSelectCSP);
item->getCSPTablePtr()->setSelectorModelLocations(m_modelSelectLocation);
item->getCSPTablePtr()->readFromXml(grandElement);
}
else if (grandElement.tagName() == "map_polygon")
{
item->setMapPolygon(PolygonCalculations::fromString(grandElement.text()));
......
......@@ -7,7 +7,8 @@
//////////////////////////////////////////
/// ITEM IMPLEMENTATION ///////////////////////////////////////////////////////////////////////
//////////////////////////////////////////
ConfigTableItem::ConfigTableItem(int producerID, int locationID, double maxPower, double minPower, double stepSize, double area) :
ConfigTableItem::ConfigTableItem(int producerID, int locationID, double maxPower, double minPower,
double stepSize, double area) :
AbstractCharLItem("producerID: " + QString::number(producerID)),
m_selectedItemProducer(producerID),
m_selectedItemLocation(locationID),
......@@ -17,12 +18,17 @@ ConfigTableItem::ConfigTableItem(int producerID, int locationID, double maxPower
m_maxCapacity(0.),
m_minCapacity(0.),
m_stepSizeCapacity(0.),
m_maxPower2(0.),
m_minPower2(0.),
m_stepSizePower2(0.),
m_areaOfPark(area)
{
}
ConfigTableItem::ConfigTableItem(int producerID, int locationID, double maxPower, double minPower, double stepSize,
double maxCapacity, double minCapacity, double stepSizeCapacity) :
ConfigTableItem::ConfigTableItem(int producerID, int locationID, double maxPower, double minPower,
double stepSize, double maxCapacity, double minCapacity,
double stepSizeCapacity, double maxPower2, double minPower2,
double stepSizePower2) :
AbstractCharLItem("id: " + QString::number(producerID)),
m_selectedItemProducer(producerID),
m_selectedItemLocation(locationID),
......@@ -32,6 +38,9 @@ ConfigTableItem::ConfigTableItem(int producerID, int locationID, double maxPower
m_maxCapacity(maxCapacity),
m_minCapacity(minCapacity),
m_stepSizeCapacity(stepSizeCapacity),
m_maxPower2(maxPower2),
m_minPower2(minPower2),
m_stepSizePower2(stepSizePower2),
m_areaOfPark(0.)
{
}
......@@ -82,6 +91,11 @@ int ConfigTableModel::columnCount(const QModelIndex &parent) const
{
return 7;
}
else if (m_additionalInfo == AdditionalInfo::Storage
|| m_additionalInfo == AdditionalInfo::Biomass)
{
return 12;
}
return 6;
}
......@@ -169,6 +183,37 @@ QVariant ConfigTableModel::data(const QModelIndex &index, int role) const
return QVariant();
}
}
else if (m_additionalInfo == AdditionalInfo::Storage
|| m_additionalInfo == AdditionalInfo::Biomass)
{
switch (index.column())
{
case 0:
return m_namesProducer->data(m_namesProducer->index(m_data[index.row()].getSelectedItemProducer()));
case 1:
return m_namesLocations->data(m_namesLocations->index(m_data[index.row()].getSelectedItemLocation()));
case 2:
return m_data[index.row()].getMaxPower();
case 3:
return m_data[index.row()].getMinPower();
case 4:
return m_data[index.row()].getStepSizePower();
case 5:
return m_data[index.row()].getMaxCapacity();
case 6:
return m_data[index.row()].getMinCapacity();
case 7:
return m_data[index.row()].getStepSizeCapacity();
case 8:
return m_data[index.row()].getMaxPower2();
case 9:
return m_data[index.row()].getMinPower2();
case 10:
return m_data[index.row()].getStepSizePower2();
default:
return QVariant();
}
}
switch (index.column())
{
case 0:
......@@ -273,15 +318,25 @@ QVariant ConfigTableModel::headerData(int section, Qt::Orientation orientation,
case 1:
return QString("Location");
case 2:
return QString("Maximum Power [MW]");
if (m_additionalInfo == AdditionalInfo::Biomass)
{
return QString("Max Power Fermenter [MW]");
}
return QString("Max Power [MW]");
case 3:
return QString("Minimum Power [MW]");
if (m_additionalInfo == AdditionalInfo::Biomass)
{
return QString("Min Power Fermenter [MW]");
}
return QString("Min Power [MW]");
case 4:
return QString("Steps in Power [MW]");
case 5:
if (m_additionalInfo == AdditionalInfo::Capacity)
if (m_additionalInfo == AdditionalInfo::Capacity
|| m_additionalInfo == AdditionalInfo::Storage
|| m_additionalInfo == AdditionalInfo::Biomass)
{
return QString("Maximum Capacity [MWh]");
return QString("Max Capacity [MWh]");
}
else if (m_additionalInfo == AdditionalInfo::Area)
{
......@@ -289,17 +344,48 @@ QVariant ConfigTableModel::headerData(int section, Qt::Orientation orientation,
}
break;
case 6:
if (m_additionalInfo == AdditionalInfo::Capacity)
if (m_additionalInfo == AdditionalInfo::Capacity
|| m_additionalInfo == AdditionalInfo::Storage
|| m_additionalInfo == AdditionalInfo::Biomass)
{
return QString("Minimum Capacity [MWh]");
return QString("Min Capacity [MWh]");
}
break;
case 7:
if (m_additionalInfo == AdditionalInfo::Capacity)
if (m_additionalInfo == AdditionalInfo::Capacity
|| m_additionalInfo == AdditionalInfo::Storage
|| m_additionalInfo == AdditionalInfo::Biomass)
{
return QString("Steps in Capacity [MWh]");
}
break;
case 8:
if (m_additionalInfo == AdditionalInfo::Storage)
{
return QString("Max Power Discharge [MW]");
}
else if (m_additionalInfo == AdditionalInfo::Biomass)
{
return QVariant("Max Power Engine [MW]");
}
break;
case 9:
if (m_additionalInfo == AdditionalInfo::Storage)
{
return QString("Min Power Discharge [MW]");
}
else if (m_additionalInfo == AdditionalInfo::Biomass)
{
return QVariant("Min Power Engine [MW]");
}
break;
case 10:
if (m_additionalInfo == AdditionalInfo::Storage
|| m_additionalInfo == AdditionalInfo::Biomass)
{
return QString("Steps in Power [MW]");
}
break;
default:
return QVariant();
}
......@@ -319,7 +405,9 @@ QVariant ConfigTableModel::headerData(int section, Qt::Orientation orientation,
case 4:
return QString("step_power");
case 5:
if (m_additionalInfo == AdditionalInfo::Capacity)
if (m_additionalInfo == AdditionalInfo::Capacity
|| m_additionalInfo == AdditionalInfo::Storage
|| m_additionalInfo == AdditionalInfo::Biomass)
{
return QString("max_capacity");
}
......@@ -329,17 +417,39 @@ QVariant ConfigTableModel::headerData(int section, Qt::Orientation orientation,
}
break;
case 6:
if (m_additionalInfo == AdditionalInfo::Capacity)
if (m_additionalInfo == AdditionalInfo::Capacity
|| m_additionalInfo == AdditionalInfo::Storage
|| m_additionalInfo == AdditionalInfo::Biomass)
{
return QString("min_capacity");
}
break;
case 7:
if (m_additionalInfo == AdditionalInfo::Capacity)
if (m_additionalInfo == AdditionalInfo::Capacity
|| m_additionalInfo == AdditionalInfo::Storage
|| m_additionalInfo == AdditionalInfo::Biomass)
{
return QString("step_capacity");
}
break;
case 8:
if (m_additionalInfo == AdditionalInfo::Storage
|| m_additionalInfo == AdditionalInfo::Biomass)
{
return QString("max_power_2");
}
case 9:
if (m_additionalInfo == AdditionalInfo::Storage
|| m_additionalInfo == AdditionalInfo::Biomass)
{
return QString("min_power_2");
}
case 10:
if (m_additionalInfo == AdditionalInfo::Storage
|| m_additionalInfo == AdditionalInfo::Biomass)
{
return QString("step_power_2");
}
default:
return QVariant();
}
......@@ -473,6 +583,30 @@ bool ConfigTableModel::setData(const QModelIndex &index, const QVariant &value,
emit dataChanged(index, index);
return true;
}
case 8:
valueDouble = value.toDouble(&ok);
if (ok && valueDouble >= 0.)
{
m_data[index.row()].setMaxPower2(valueDouble);
emit dataChanged(index, index);
return true;
}
case 9:
valueDouble = value.toDouble(&ok);
if (ok && valueDouble >= 0.)
{
m_data[index.row()].setMinPower2(valueDouble);
emit dataChanged(index, index);
return true;
}
case 10:
valueDouble = value.toDouble(&ok);
if (ok && valueDouble >= 0.)
{
m_data[index.row()].setStepSizePower2(valueDouble);
emit dataChanged(index, index);
return true;
}
default:
return false;
}
......@@ -518,7 +652,7 @@ bool ConfigTableModel::addItem(const QStringList &entries)
return true;
}
else if (entries.count() == 8 && entries[0].toInt() < m_namesProducer->rowCount() && entries[1].toInt() < m_namesLocations->rowCount()) //storage
else if (entries.count() == 8 && entries[0].toInt() < m_namesProducer->rowCount() && entries[1].toInt() < m_namesLocations->rowCount()) //csp
{
this->addItem(ConfigTableItem(entries[0].toInt(), entries[1].toInt(), entries[2].toDouble(),
entries[3].toDouble(), entries[4].toDouble(),
......@@ -527,6 +661,16 @@ bool ConfigTableModel::addItem(const QStringList &entries)
return true;
}
else if (entries.count() == 11 && entries[0].toInt() < m_namesProducer->rowCount() && entries[1].toInt() < m_namesLocations->rowCount()) //storage or biomass
{
this->addItem(ConfigTableItem(entries[0].toInt(), entries[1].toInt(), entries[2].toDouble(),
entries[3].toDouble(), entries[4].toDouble(),
entries[5].toDouble(), entries[6].toDouble(),
entries[7].toDouble(), entries[8].toDouble(),
entries[9].toDouble(), entries[10].toDouble()));
return true;
}
return false;
}
......
......@@ -35,7 +35,10 @@ public:
double minPower, double stepSize,
double maxCapacity,
double minCapacity,
double stepSizeCapacity);
double stepSizeCapacity,
double maxPower2 = 0.,
double minPower2 = 0.,
double stepSizePower2 = 0.);
//get-Funktionen
int getSelectedItemProducer() const {return m_selectedItemProducer;}
......@@ -46,6 +49,9 @@ public:
double getMaxCapacity() const {return m_maxCapacity;}
double getMinCapacity() const {return m_minCapacity;}
double getStepSizeCapacity() const {return m_stepSizeCapacity;}
double getMaxPower2() const {return m_maxPower2;}
double getMinPower2() const {return m_minPower2;}
double getStepSizePower2() const {return m_stepSizePower2;}
double getAreaOfPark() const {return m_areaOfPark;}
//set-Funktionen
......@@ -57,6 +63,9 @@ public:
void setMaxCapacity(double capacity) {m_maxCapacity = capacity;}
void setMinCapacity(double capacity) {m_minCapacity = capacity;}
void setStepSizeCapacity(double capacity) {m_stepSizeCapacity = capacity;}
void setMaxPower2(double power) {m_maxPower2 = power;}
void setMinPower2(double power) {m_minPower2 = power;}
void setStepSizePower2(double power) {m_stepSizePower2 = power;}
void setAreaOfPark(double area) {m_areaOfPark = area;}
void addProducer(int id, double maxPower = 0., double minPower = 0., double stepSize = 0.);
......@@ -69,6 +78,9 @@ private:
double m_maxCapacity;
double m_minCapacity;
double m_stepSizeCapacity;
double m_maxPower2;
double m_minPower2;
double m_stepSizePower2;
double m_areaOfPark;
};
......@@ -76,7 +88,7 @@ class ConfigTableModel : public AbstractCharLTableModel
{
Q_OBJECT
public:
enum class AdditionalInfo {Capacity, Area, None};
enum class AdditionalInfo {Storage, Capacity, Area, Biomass, None};
public:
ConfigTableModel(AdditionalInfo addInfo = AdditionalInfo::None, QObject * parent = nullptr);
......
......@@ -14,9 +14,11 @@ NodesTableItem::NodesTableItem(QString name, double lat, double lon, int polygon
m_polygonObject(nullptr)
{
m_plantConfig = new ConfigTableModel;
m_storageConfig = new ConfigTableModel((ConfigTableModel::AdditionalInfo::Capacity));
m_storageConfig = new ConfigTableModel((ConfigTableModel::AdditionalInfo::Storage));
m_solarConfig = new ConfigTableModel(ConfigTableModel::AdditionalInfo::Area);
m_windConfig = new ConfigTableModel(ConfigTableModel::AdditionalInfo::Area);
m_biomassConfig = new ConfigTableModel(ConfigTableModel::AdditionalInfo::Biomass);
m_cspConfig = new ConfigTableModel(ConfigTableModel::AdditionalInfo::Capacity);
}
void NodesTableItem::setLatitude(double lat)
......
......@@ -53,6 +53,8 @@ public:
ConfigTableModel * getStorageTablePtr() {return m_storageConfig;}
ConfigTableModel * getSolarTablePtr() {return m_solarConfig;}
ConfigTableModel * getWindTablePtr() {return m_windConfig;}
ConfigTableModel * getBiomassTablePtr() {return m_biomassConfig;}
ConfigTableModel * getCSPTablePtr() {return m_cspConfig;}
PolygonObject * getPolygonObject() const;
int getLocationCount() const;
int getLocationsId(int index) const;
......@@ -84,6 +86,8 @@ private:
ConfigTableModel * m_storageConfig;
ConfigTableModel * m_solarConfig;
ConfigTableModel * m_windConfig;
ConfigTableModel * m_biomassConfig;
ConfigTableModel * m_cspConfig;
//associated locations
QVector<int> m_locations;
};
......
......@@ -9,6 +9,8 @@ ConfigurationWidget::ConfigurationWidget(SelectorListModel * plantSelect,
SelectorListModel * storageSelect,
SelectorListModel * windSelect,
SelectorListModel * pvSelect,
SelectorListModel * biomassSelect,
SelectorListModel * cspSelect,
SelectorListModel * locationSelect,
QWidget * parent) : QGroupBox(parent)
{
......@@ -25,15 +27,21 @@ ConfigurationWidget::ConfigurationWidget(SelectorListModel * plantSelect,
plantTableLabel->setFont(fontLabel);
QLabel * storageTableLabel = new QLabel("Select Storages", this);
storageTableLabel->setFont(fontLabel);
QLabel * solarTableLabel = new QLabel("Select PV Modules", this);
QLabel * solarTableLabel = new QLabel("Select PV Parks", this);
solarTableLabel->setFont(fontLabel);
QLabel * windTableLabel = new QLabel("Select Wind Turbines", this);
QLabel * windTableLabel = new QLabel("Select Wind Parks", this);
windTableLabel->setFont(fontLabel);
QLabel * biomassTableLabel = new QLabel("Select Biomass Plants", this);
biomassTableLabel->setFont(fontLabel);
QLabel * cspTableLabel = new QLabel("Select CSP Plants", this);
cspTableLabel->setFont(fontLabel);
m_plantConfigView = new QTableView(this);
m_storageConfigView = new QTableView(this);
m_solarConfigView = new QTableView(this);
m_windConfigView = new QTableView(this);
m_biomassConfigView = new QTableView(this);
m_cspConfigView = new QTableView(this);
m_plantConfigDelegate = new ConfigTableDelegate(this);
m_plantConfigDelegate->setSelectorModelProducer(plantSelect);
......@@ -55,6 +63,16 @@ ConfigurationWidget::ConfigurationWidget(SelectorListModel * plantSelect,
m_windConfigDelegate->setSelectorModelLocations(locationSelect);
m_windConfigView->setItemDelegate(m_windConfigDelegate);
m_biomassConfigDelegate = new ConfigTableDelegate(this);
m_biomassConfigDelegate->setSelectorModelProducer(biomassSelect);
m_biomassConfigDelegate->setSelectorModelLocations(locationSelect);
m_biomassConfigView->setItemDelegate(m_biomassConfigDelegate);
m_cspConfigDelegate = new ConfigTableDelegate(this);
m_cspConfigDelegate->setSelectorModelProducer(cspSelect);
m_cspConfigDelegate->setSelectorModelLocations(locationSelect);
m_cspConfigView->setItemDelegate(m_cspConfigDelegate);
m_node = nullptr;
QPixmap plusPix(":/buttons/icons/plusAdd.png");
......@@ -134,10 +152,45 @@ ConfigurationWidget::ConfigurationWidget(SelectorListModel * plantSelect,
layoutWind->addWidget(m_windConfigView);
layoutWind->addLayout(layoutButtonsWind);
QPushButton * btnAddBiomass = new QPushButton(this);
btnAddBiomass->setIcon(plusIcon);
btnAddBiomass->setIconSize(QSize(16,16));
btnAddBiomass->setFlat(true);
QPushButton * btnRemoveBiomass = new QPushButton(this);
btnRemoveBiomass->setIcon(minusIcon);
btnRemoveBiomass->setIconSize(QSize(16,16));
btnRemoveBiomass->setFlat(true);
QSpacerItem * biomassSpacer = new QSpacerItem(1, 10, QSizePolicy::Minimum, QSizePolicy::Expanding);
QHBoxLayout * layoutBiomass = new QHBoxLayout();
QVBoxLayout * layoutButtonsBiomass = new QVBoxLayout();
layoutButtonsBiomass->addWidget(btnAddBiomass);
layoutButtonsBiomass->addWidget(btnRemoveBiomass);
layoutButtonsBiomass->addSpacerItem(biomassSpacer);
layoutBiomass->addWidget(m_biomassConfigView);
layoutBiomass->addLayout(layoutButtonsBiomass);
QPushButton * btnAddCSP = new QPushButton(this);
btnAddCSP->setIcon(plusIcon);
btnAddCSP->setIconSize(QSize(16,16));
btnAddCSP->setFlat(true);
QPushButton * btnRemoveCSP = new QPushButton(this);
btnRemoveCSP->setIcon(minusIcon);
btnRemoveCSP->setIconSize(QSize(16,16));
btnRemoveCSP->setFlat(true);
QSpacerItem * cspSpacer = new QSpacerItem(1, 10, QSizePolicy::Minimum, QSizePolicy::Expanding);
QHBoxLayout * layoutCSP = new QHBoxLayout();
QVBoxLayout * layoutButtonsCSP = new QVBoxLayout();
layoutButtonsCSP->addWidget(btnAddCSP);
layoutButtonsCSP->addWidget(btnRemoveCSP);
layoutButtonsCSP->addSpacerItem(cspSpacer);
layoutCSP->addWidget(m_cspConfigView);
layoutCSP->addLayout(layoutButtonsCSP);
QHBoxLayout * mainLayout = new QHBoxLayout();
QVBoxLayout * leftLayout = new QVBoxLayout();
QVBoxLayout * rightLayout = new QVBoxLayout();
QSpacerItem * rightSpacer = new QSpacerItem(1, 10, QSizePolicy::Minimum, QSizePolicy::Expanding);
leftLayout->addWidget(plantTableLabel);
leftLayout->addLayout(layoutPlant);
......@@ -147,18 +200,38 @@ ConfigurationWidget::ConfigurationWidget(SelectorListModel * plantSelect,
leftLayout->addLayout(layoutSolar);
leftLayout->addWidget(windTableLabel);
leftLayout->addLayout(layoutWind);
leftLayout->addWidget(biomassTableLabel);
leftLayout->addLayout(layoutBiomass);
leftLayout->addWidget(cspTableLabel);
leftLayout->addLayout(layoutCSP);
mainLayout->addLayout(leftLayout);
mainLayout->addLayout(rightLayout);
connect(btnAddPlant, SIGNAL(released()), this, SLOT(onAddPlant()));
connect(btnRemovePlant, SIGNAL(released()), this, SLOT(onRemovePlant()));
connect(btnAddStorage, SIGNAL(released()), this, SLOT(onAddStorage()));
connect(btnRemoveStorage, SIGNAL(released()), this, SLOT(onRemoveStorage()));
connect(btnAddSolar, SIGNAL(released()), this, SLOT(onAddSolar()));
connect(btnRemoveSolar, SIGNAL(released()), this, SLOT(onRemoveSolar()));
connect(btnAddWind, SIGNAL(released()), this, SLOT(onAddWind()));
connect(btnRemoveWind, SIGNAL(released()), this, SLOT(onRemoveWind()));
connect(btnAddPlant, &QPushButton::released,
this, &ConfigurationWidget::onAddPlant);
connect(btnRemovePlant, &QPushButton::released,
this, &ConfigurationWidget::onRemovePlant);
connect(btnAddStorage, &QPushButton::released,
this, &ConfigurationWidget::onAddStorage);
connect(btnRemoveStorage, &QPushButton::released,
this, &ConfigurationWidget::onRemoveStorage);
connect(btnAddSolar, &QPushButton::released,
this, &ConfigurationWidget::onAddSolar);