1 /***************************************************************************
3 * HeatLossElement.cpp Copyright (C) 2008 by Jon Rumble *
4 * j.w.rumble@reading.ac.uk *
6 * This file is part of HECS, *
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. *
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. *
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
19 * You should have received a copy of the GNU General Public License *
20 * along with this program. If not, see <http://www.gnu.org/licenses/>. *
21 ***************************************************************************/
23 #include "HeatLossElement.h"
24 // Constructors/Destructors
27 HeatLossElement::HeatLossElement() { }
29 HeatLossElement::~HeatLossElement () { }
32 void HeatLossElement::insertLoss(const QString
& name
,double area
, double uValue
)
34 HeatLossItem
item (area
,uValue
);
35 elemMap
.insert(name
,item
);
38 void HeatLossElement::removeLoss(const QString
& name
)
43 void HeatLossElement::updateLoss(const QString
& name
,double area
,double uValue
)
46 insertLoss(name
,area
,uValue
);
54 void HeatLossElement::calcElementTotal()
57 m_elementLossTotal
= 0.00;
58 m_elementAreaTotal
= 0.00;
59 QMapIterator
<QString
, HeatLossItem
> i (elemMap
);
64 HeatLossItem temp
= i
.value();
65 m_elementLossTotal
+= temp
.getwK();
66 m_elementAreaTotal
+= temp
.getArea();
75 double HeatLossElement::getElementLossTotal()
78 return m_elementLossTotal
;
81 void HeatLossElement::setElementLossTotal(double val_in
)
83 m_elementLossTotal
= val_in
;
86 double HeatLossElement::getElementAreaTotal()
89 return m_elementAreaTotal
;
92 void HeatLossElement::setAreaElementTotal(double val_in
)
94 m_elementLossTotal
= val_in
;