mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-29 21:50:26 +00:00
36b9e5e31e
helpers.h included qthelper.h and all functions declared in helpers.h were defined in qthelper.h. Therefore fold the former into the latter, since the split seems completely arbitrary. While doing so, change the return-type of get_dc_nichname from "const QString" to "QString". Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
38 lines
989 B
C++
38 lines
989 B
C++
// SPDX-License-Identifier: GPL-2.0
|
|
#include "CylinderObjectHelper.h"
|
|
#include "../qthelper.h"
|
|
|
|
static QString EMPTY_CYLINDER_STRING = QStringLiteral("");
|
|
CylinderObjectHelper::CylinderObjectHelper(cylinder_t *cylinder) :
|
|
m_cyl(cylinder) {
|
|
}
|
|
|
|
CylinderObjectHelper::~CylinderObjectHelper() {
|
|
}
|
|
|
|
QString CylinderObjectHelper::description() const {
|
|
if (!m_cyl->type.description)
|
|
return QString(EMPTY_CYLINDER_STRING);
|
|
else
|
|
return QString(m_cyl->type.description);
|
|
}
|
|
|
|
QString CylinderObjectHelper::size() const {
|
|
return get_volume_string(m_cyl->type.size, true);
|
|
}
|
|
|
|
QString CylinderObjectHelper::workingPressure() const {
|
|
return get_pressure_string(m_cyl->type.workingpressure, true);
|
|
}
|
|
|
|
QString CylinderObjectHelper::startPressure() const {
|
|
return get_pressure_string(m_cyl->start, true);
|
|
}
|
|
|
|
QString CylinderObjectHelper::endPressure() const {
|
|
return get_pressure_string(m_cyl->end, true);
|
|
}
|
|
|
|
QString CylinderObjectHelper::gasMix() const {
|
|
return get_gas_string(m_cyl->gasmix);
|
|
}
|