diff options
Diffstat (limited to 'core/subsurface-qt/CylinderObjectHelper.cpp')
-rw-r--r-- | core/subsurface-qt/CylinderObjectHelper.cpp | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/core/subsurface-qt/CylinderObjectHelper.cpp b/core/subsurface-qt/CylinderObjectHelper.cpp new file mode 100644 index 000000000..341d30b12 --- /dev/null +++ b/core/subsurface-qt/CylinderObjectHelper.cpp @@ -0,0 +1,37 @@ +#include "CylinderObjectHelper.h" +#include "../helpers.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); +} |