mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
printing: remove CylinderObjectHelper
With the removal of grantlee, this became pointless glue code. Call the formatting functions directly. Since the printing code was the only user of CylinderObjectHelper, remove the whole thing. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
ae182c386b
commit
cc5ebd7414
7 changed files with 8 additions and 61 deletions
|
@ -10,7 +10,6 @@
|
|||
#include "core/selection.h"
|
||||
#include "core/qthelper.h"
|
||||
#include "core/string-format.h"
|
||||
#include "core/subsurface-qt/cylinderobjecthelper.h" // TODO: remove once grantlee supports Q_GADGET objects
|
||||
|
||||
QList<QString> grantlee_templates, grantlee_statistics_templates;
|
||||
|
||||
|
@ -499,19 +498,19 @@ QVariant TemplateLayout::getValue(QString list, QString property, const State &s
|
|||
} else if (list == "cylinderObjects") {
|
||||
if (!state.currentCylinderObject)
|
||||
return QVariant();
|
||||
const CylinderObjectHelper object(*state.currentCylinderObject);
|
||||
const cylinder_t *cylinder = *state.currentCylinderObject;
|
||||
if (property == "description") {
|
||||
return object.description;
|
||||
return cylinder->type.description;
|
||||
} else if (property == "size") {
|
||||
return object.size;
|
||||
return get_volume_string(cylinder->type.size, true);
|
||||
} else if (property == "workingPressure") {
|
||||
return object.workingPressure;
|
||||
return get_pressure_string(cylinder->type.workingpressure, true);
|
||||
} else if (property == "startPressure") {
|
||||
return object.startPressure;
|
||||
return get_pressure_string(cylinder->start, true);
|
||||
} else if (property == "endPressure") {
|
||||
return object.endPressure;
|
||||
return get_pressure_string(cylinder->end, true);
|
||||
} else if (property == "gasMix") {
|
||||
return object.gasMix;
|
||||
return get_gas_string(cylinder->gasmix);
|
||||
}
|
||||
} else if (list == "dives") {
|
||||
if (!state.currentDive)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue