diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-12-14 23:21:58 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-12-17 13:03:56 -0800 |
commit | d9942269a9b61bc35bd939b23858a7cb4a2515c3 (patch) | |
tree | 92a60687efdfbd89df1aa29d7a105487c3db16d3 /desktop-widgets/templatelayout.h | |
parent | bf8261c0014253634eaddf7c0a9cf79d3a8b4123 (diff) | |
download | subsurface-d9942269a9b61bc35bd939b23858a7cb4a2515c3.tar.gz |
printing: remove DiveObjectHelperGrantlee
This was a weird helper object, needed for grantlee. Instead
of storing this object, loop over cylinders and dives directly.
The actual accessor function is unchanged and now generates
a DiveObjectHelper or DiveCylinderHelper for every variable
access. Obviously, this is very inefficient. However, this
will be replaced in future commits by direct calls to formatting
functions.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/templatelayout.h')
-rw-r--r-- | desktop-widgets/templatelayout.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/desktop-widgets/templatelayout.h b/desktop-widgets/templatelayout.h index c7e3537aa..786cd055a 100644 --- a/desktop-widgets/templatelayout.h +++ b/desktop-widgets/templatelayout.h @@ -3,9 +3,9 @@ #define TEMPLATELAYOUT_H #include "core/statistics.h" +#include "core/equipment.h" #include <QStringList> -class DiveObjectHelperGrantlee; class CylinderObjectHelper; struct print_options; struct template_options; @@ -36,14 +36,14 @@ public: private: struct State { - QList<DiveObjectHelperGrantlee> dives; + QList<const dive *> dives; QList<stats_t *> years; QMap<QString, QString> types; int forloopiterator = -1; - const DiveObjectHelperGrantlee *currentDive = nullptr; + const dive * const *currentDive = nullptr; const stats_t * const *currentYear = nullptr; const QString *currentCylinder = nullptr; - const CylinderObjectHelper *currentCylinderObject = nullptr; + const cylinder_t * const *currentCylinderObject = nullptr; }; const print_options &printOptions; const template_options &templateOptions; |