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