diff options
Diffstat (limited to 'core/subsurface-qt/cylinderobjecthelper.cpp')
-rw-r--r-- | core/subsurface-qt/cylinderobjecthelper.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/core/subsurface-qt/cylinderobjecthelper.cpp b/core/subsurface-qt/cylinderobjecthelper.cpp new file mode 100644 index 000000000..897746952 --- /dev/null +++ b/core/subsurface-qt/cylinderobjecthelper.cpp @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: GPL-2.0 +#include "cylinderobjecthelper.h" +#include "../qthelper.h" + +static QString EMPTY_CYLINDER_STRING = QStringLiteral(""); +CylinderObjectHelper::CylinderObjectHelper(const cylinder_t *cylinder) +{ + if (!cylinder) + return; + + description = cylinder->type.description ? cylinder->type.description: + EMPTY_CYLINDER_STRING; + size = get_volume_string(cylinder->type.size, true); + workingPressure = get_pressure_string(cylinder->type.workingpressure, true); + startPressure = get_pressure_string(cylinder->start, true); + endPressure = get_pressure_string(cylinder->end, true); + gasMix = get_gas_string(cylinder->gasmix); +} |