diff options
author | Tim Wootton <tim@tee-jay.org.uk> | 2016-07-31 22:27:07 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-08-10 15:00:33 -0700 |
commit | bd40ef7f424604013e1fe1b5feea648ab6304b72 (patch) | |
tree | ba57a9d6c9a3ea710bd75d1efd71c73e22da14cb /core/CMakeLists.txt | |
parent | 430f5b77c583e5c29a5299740763ddfc9a098570 (diff) | |
download | subsurface-bd40ef7f424604013e1fe1b5feea648ab6304b72.tar.gz |
Adds Cylinder helper class for cylinder info access in grantlee templates
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>
Diffstat (limited to 'core/CMakeLists.txt')
-rw-r--r-- | core/CMakeLists.txt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index d9b1d3421..5c22e2306 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -86,6 +86,7 @@ set(SUBSURFACE_CORE_LIB_SRCS #Subsurface Qt have the Subsurface structs QObjectified for easy access via QML. subsurface-qt/DiveObjectHelper.cpp + subsurface-qt/CylinderObjectHelper.cpp subsurface-qt/SettingsObjectWrapper.cpp ${SERIAL_FTDI} ${PLATFORM_SRC} |