2017-04-27 20:24:53 +02:00
|
|
|
// SPDX-License-Identifier: GPL-2.0
|
2020-02-03 19:33:06 +01:00
|
|
|
#include "cylinderobjecthelper.h"
|
2018-06-03 22:15:19 +02:00
|
|
|
#include "../qthelper.h"
|
2016-07-31 22:27:07 +01:00
|
|
|
|
|
|
|
static QString EMPTY_CYLINDER_STRING = QStringLiteral("");
|
2019-08-13 22:30:36 +02:00
|
|
|
CylinderObjectHelper::CylinderObjectHelper(const cylinder_t *cylinder)
|
2019-08-12 18:26:42 +02:00
|
|
|
{
|
|
|
|
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);
|
2016-07-31 22:27:07 +01:00
|
|
|
}
|