mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
bf8261c001
commit
d9942269a9
6 changed files with 42 additions and 69 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue