Initial Commit
[HECS.git] / HeatLossElement.h
blob9d9d144350277963f66b9fb2b01e911da4d021a7
1 /***************************************************************************
2 * *
3 * HeatLossElement.h Copyright (C) 2008 by Jon Rumble *
4 * j.w.rumble@reading.ac.uk *
5 * *
6 * This file is part of HECS, *
7 * *
8 * HECS is free software: you can redistribute it and/or modify *
9 * it under the terms of the GNU General Public License as published by *
10 * the Free Software Foundation, either version 2 of the License, or *
11 * (at your option) any later version. *
12 * *
13 * HECS is distributed in the hope that it will be useful, *
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16 * GNU General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU General Public License *
19 * along with this program. If not, see <http://www.gnu.org/licenses/>. *
20 ***************************************************************************/
23 #ifndef HEATLOSSELEMENT_H
24 #define HEATLOSSELEMENT_H
26 #include "DwellingDimensions.h"
27 #include "HeatLossItem.h"
28 #include <QString>
29 #include <QMap>
30 #include <QMapIterator>
32 class HeatLossElement
35 public:
37 // Constructors/Destructors
41 /**
42 * CONSTRUCTORS
44 HeatLossElement();
45 ~HeatLossElement();
46 //HeatLossElement() {};
48 /**
49 * METHODS
52 void setElementLossTotal(double var_in);
53 double getElementLossTotal();
55 void insertLoss(const QString& name,double area,double uValue);
56 double getElementAreaTotal();
57 void setAreaElementTotal(double val_in);
58 void calcElementTotal();
59 private:
61 // Private attributes
65 QMap <QString, HeatLossItem> elemMap;
68 void removeLoss(const QString& name);
69 void updateLoss(const QString& name,double area,double uValue);
70 double m_elementLossTotal;
71 double m_elementAreaTotal;
75 #endif // HEATLOSSELEMENT_H