aboutsummaryrefslogtreecommitdiffstats
path: root/core/subsurface-qt/diveobjecthelper.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-12-15 16:18:06 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-12-17 13:03:56 -0800
commit79f95b7f7dbdec1b7e1638056981d305e588969d (patch)
tree0b5520ba650195305823c3649e246e7963d2c5a6 /core/subsurface-qt/diveobjecthelper.h
parent1037c15b98bf9e2e4734e9e6ee2d5c6387f131a9 (diff)
downloadsubsurface-79f95b7f7dbdec1b7e1638056981d305e588969d.tar.gz
core: remove DiveObjectHelper
Since switching to the mobile-models and removing grantlee, DiveObjectHelper was demoted to a thin wrapper around string formatting functions. The last user was removed in a previous commit. It was never a good idea, given QML's strange memory-management. Let's remove it. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/subsurface-qt/diveobjecthelper.h')
-rw-r--r--core/subsurface-qt/diveobjecthelper.h99
1 files changed, 0 insertions, 99 deletions
diff --git a/core/subsurface-qt/diveobjecthelper.h b/core/subsurface-qt/diveobjecthelper.h
deleted file mode 100644
index 8b328673f..000000000
--- a/core/subsurface-qt/diveobjecthelper.h
+++ /dev/null
@@ -1,99 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-#ifndef DIVE_QOBJECT_H
-#define DIVE_QOBJECT_H
-
-#include "core/units.h"
-#include <QObject>
-#include <QString>
-#include <QStringList>
-#include <QVector>
-#include <QVariant>
-
-class DiveObjectHelper {
- Q_GADGET
- Q_PROPERTY(int number MEMBER number CONSTANT)
- Q_PROPERTY(int id MEMBER id CONSTANT)
- Q_PROPERTY(int rating MEMBER rating CONSTANT)
- Q_PROPERTY(int visibility MEMBER visibility CONSTANT)
- Q_PROPERTY(int wavesize MEMBER wavesize CONSTANT)
- Q_PROPERTY(int current MEMBER current CONSTANT)
- Q_PROPERTY(int surge MEMBER surge CONSTANT)
- Q_PROPERTY(int chill MEMBER chill CONSTANT)
- Q_PROPERTY(QString date READ date CONSTANT)
- Q_PROPERTY(QString time READ time CONSTANT)
- Q_PROPERTY(int timestamp MEMBER timestamp CONSTANT)
- Q_PROPERTY(QString location MEMBER location CONSTANT)
- Q_PROPERTY(QString gps MEMBER gps CONSTANT)
- Q_PROPERTY(QString gps_decimal MEMBER gps_decimal CONSTANT)
- Q_PROPERTY(QVariant dive_site MEMBER dive_site CONSTANT)
- Q_PROPERTY(QString duration MEMBER duration CONSTANT)
- Q_PROPERTY(bool noDive MEMBER noDive CONSTANT)
- Q_PROPERTY(QString depth MEMBER depth CONSTANT)
- Q_PROPERTY(QString divemaster MEMBER divemaster CONSTANT)
- Q_PROPERTY(QString buddy MEMBER buddy CONSTANT)
- Q_PROPERTY(QString airTemp MEMBER airTemp CONSTANT)
- Q_PROPERTY(QString waterTemp MEMBER waterTemp CONSTANT)
- Q_PROPERTY(QString notes MEMBER notes CONSTANT)
- Q_PROPERTY(QString tags MEMBER tags CONSTANT)
- Q_PROPERTY(QString gas MEMBER gas CONSTANT)
- Q_PROPERTY(QString sac MEMBER sac CONSTANT)
- Q_PROPERTY(QString weightList MEMBER weightList CONSTANT)
- Q_PROPERTY(QStringList weights MEMBER weights CONSTANT)
- Q_PROPERTY(bool singleWeight MEMBER singleWeight CONSTANT)
- Q_PROPERTY(QString suit MEMBER suit CONSTANT)
- Q_PROPERTY(QStringList cylinderList READ cylinderList CONSTANT)
- Q_PROPERTY(QStringList cylinders MEMBER cylinders CONSTANT)
- Q_PROPERTY(int maxcns MEMBER maxcns CONSTANT)
- Q_PROPERTY(int otu MEMBER otu CONSTANT)
- Q_PROPERTY(QString sumWeight MEMBER sumWeight CONSTANT)
- Q_PROPERTY(QStringList getCylinder MEMBER getCylinder CONSTANT)
- Q_PROPERTY(QStringList startPressure MEMBER startPressure CONSTANT)
- Q_PROPERTY(QStringList endPressure MEMBER endPressure CONSTANT)
- Q_PROPERTY(QStringList firstGas MEMBER firstGas CONSTANT)
-public:
- DiveObjectHelper(); // This is only to be used by Qt's metatype system!
- DiveObjectHelper(const struct dive *dive);
- int number;
- int id;
- int rating;
- int visibility;
- int wavesize;
- int current;
- int surge;
- int chill;
- QString date() const;
- timestamp_t timestamp;
- QString time() const;
- QString location;
- QString gps;
- QString gps_decimal;
- QVariant dive_site;
- QString duration;
- bool noDive;
- QString depth;
- QString divemaster;
- QString buddy;
- QString airTemp;
- QString waterTemp;
- QString notes;
- QString tags;
- QString gas;
- QString sac;
- QString weightList;
- QStringList weights;
- bool singleWeight;
- QString suit;
- QStringList cylinderList() const;
- QStringList cylinders;
- int maxcns;
- int otu;
- QString sumWeight;
- QStringList getCylinder;
- QStringList startPressure;
- QStringList endPressure;
- QStringList firstGas;
- QString salinity;
- QString waterType;
-};
-
-#endif