Age | Commit message (Collapse) | Author | |
---|---|---|---|
2019-08-22 | Cleanup: turn CylinderObjectHelper into value type | Berthold Stoeger | |
CylinderObjectHelper is used for structured formatting of cylinder values in grantlee types. Instead of keeping a reference to a cylinder, turn it into a value type containing the formatted strings. This should be distinctly safer, as we don't risk having stale references flying around. Moreover, we don't have to use pointers but can use containers containing plain CylinderObjectHelper. Thus, no explicit memory management is needed, making the code distinctly easier to understand. Sadly, currently grantlee does not support Q_GADGET based Q_PROPERTY. Therefore a GRANTLEE_*_LOOKUP block has to be added. This can be removed in due course, as a patch to remedy this issue is in current grantlee master. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | |||
2019-08-22 | Cleanup: don't include dive.h in CylinderObjectHelper.hpp | Berthold Stoeger | |
This only needs the declaration of cylinder_t, which is found in equipment.h Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | |||
2017-04-29 | Add SPDX header to remaining core files | Dirk Hohndel | |
Signed-off-by: Dirk Hohndel <dirk@hohndel.org> | |||
2016-08-10 | Adds Cylinder helper class for cylinder info access in grantlee templates | Tim Wootton | |
to allow grantlee to access individual fields of the cylinder_t struct rather than a string representation of the whole cylinder info using a grantlee structure like this one: <table class="table_class"> <tr> <td>Cylinder</td> <td>Start press.</td> <td>End press.</td> <td>Gas mix</td> </tr> {% for cylinderObject in dive.cylinderObjects %} <tr> <td>{{ cylinderObject.description }}</td> <td>{{ cylinderObject.startPressure }}</td> <td>{{ cylinderObject.endPressure }}</td> <td>{{ cylinderObject.gasMix }}</td> </tr> {% endfor %} </table> Signed-off-by: Tim Wootton <tim@tee-jay.org.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org> |