summaryrefslogtreecommitdiffstats
path: root/core/subsurface-qt/DiveObjectHelper.h
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2016-04-04 22:02:03 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-04-04 22:33:58 -0700
commit7be962bfc2879a72c32ff67518731347dcdff6de (patch)
treed05bf7ab234a448ee37a15b608e2b939f2285d07 /core/subsurface-qt/DiveObjectHelper.h
parent2d760a7bff71c46c5aeba37c40d236ea16eefea2 (diff)
downloadsubsurface-7be962bfc2879a72c32ff67518731347dcdff6de.tar.gz
Move subsurface-core to core and qt-mobile to mobile-widgets
Having subsurface-core as a directory name really messes with autocomplete and is obviously redundant. Simmilarly, qt-mobile caused an autocomplete conflict and also was inconsistent with the desktop-widget name for the directory containing the "other" UI. And while cleaning up the resulting change in the path name for include files, I decided to clean up those even more to make them consistent overall. This could have been handled in more commits, but since this requires a make clean before the build, it seemed more sensible to do it all in one. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/subsurface-qt/DiveObjectHelper.h')
-rw-r--r--core/subsurface-qt/DiveObjectHelper.h89
1 files changed, 89 insertions, 0 deletions
diff --git a/core/subsurface-qt/DiveObjectHelper.h b/core/subsurface-qt/DiveObjectHelper.h
new file mode 100644
index 000000000..602775ef8
--- /dev/null
+++ b/core/subsurface-qt/DiveObjectHelper.h
@@ -0,0 +1,89 @@
+#ifndef DIVE_QOBJECT_H
+#define DIVE_QOBJECT_H
+
+#include "../dive.h"
+#include <QObject>
+#include <QString>
+#include <QStringList>
+
+class DiveObjectHelper : public QObject {
+ Q_OBJECT
+ Q_PROPERTY(int number READ number CONSTANT)
+ Q_PROPERTY(int id READ id CONSTANT)
+ Q_PROPERTY(int rating READ rating CONSTANT)
+ Q_PROPERTY(QString date READ date CONSTANT)
+ Q_PROPERTY(QString time READ time CONSTANT)
+ Q_PROPERTY(QString location READ location CONSTANT)
+ Q_PROPERTY(QString gps READ gps CONSTANT)
+ Q_PROPERTY(QString duration READ duration CONSTANT)
+ Q_PROPERTY(bool noDive READ noDive CONSTANT)
+ Q_PROPERTY(QString depth READ depth CONSTANT)
+ Q_PROPERTY(QString divemaster READ divemaster CONSTANT)
+ Q_PROPERTY(QString buddy READ buddy CONSTANT)
+ Q_PROPERTY(QString airTemp READ airTemp CONSTANT)
+ Q_PROPERTY(QString waterTemp READ waterTemp CONSTANT)
+ Q_PROPERTY(QString notes READ notes CONSTANT)
+ Q_PROPERTY(QString tags READ tags CONSTANT)
+ Q_PROPERTY(QString gas READ gas CONSTANT)
+ Q_PROPERTY(QString sac READ sac CONSTANT)
+ Q_PROPERTY(QString weightList READ weightList CONSTANT)
+ Q_PROPERTY(QStringList weights READ weights CONSTANT)
+ Q_PROPERTY(bool singleWeight READ singleWeight CONSTANT)
+ Q_PROPERTY(QString suit READ suit CONSTANT)
+ Q_PROPERTY(QString cylinderList READ cylinderList CONSTANT)
+ Q_PROPERTY(QStringList cylinders READ cylinders CONSTANT)
+ Q_PROPERTY(QString trip READ trip CONSTANT)
+ Q_PROPERTY(QString tripMeta READ tripMeta CONSTANT)
+ Q_PROPERTY(QString maxcns READ maxcns CONSTANT)
+ Q_PROPERTY(QString otu READ otu CONSTANT)
+ Q_PROPERTY(QString sumWeight READ sumWeight CONSTANT)
+ Q_PROPERTY(QString getCylinder READ getCylinder CONSTANT)
+ Q_PROPERTY(QString startPressure READ startPressure CONSTANT)
+ Q_PROPERTY(QString endPressure READ endPressure CONSTANT)
+ Q_PROPERTY(QString firstGas READ firstGas CONSTANT)
+public:
+ DiveObjectHelper(struct dive *dive = NULL);
+ ~DiveObjectHelper();
+ int number() const;
+ int id() const;
+ int rating() const;
+ QString date() const;
+ timestamp_t timestamp() const;
+ QString time() const;
+ QString location() const;
+ QString gps() const;
+ QString duration() const;
+ bool noDive() const;
+ QString depth() const;
+ QString divemaster() const;
+ QString buddy() const;
+ QString airTemp() const;
+ QString waterTemp() const;
+ QString notes() const;
+ QString tags() const;
+ QString gas() const;
+ QString sac() const;
+ QString weightList() const;
+ QStringList weights() const;
+ QString weight(int idx) const;
+ bool singleWeight() const;
+ QString suit() const;
+ QString cylinderList() const;
+ QStringList cylinders() const;
+ QString cylinder(int idx) const;
+ QString trip() const;
+ QString tripMeta() const;
+ QString maxcns() const;
+ QString otu() const;
+ QString sumWeight() const;
+ QString getCylinder() const;
+ QString startPressure() const;
+ QString endPressure() const;
+ QString firstGas() const;
+
+private:
+ struct dive *m_dive;
+};
+ Q_DECLARE_METATYPE(DiveObjectHelper *)
+
+#endif