summaryrefslogtreecommitdiffstats
path: root/subsurface-core/qthelper.h
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2016-01-07 16:01:24 -0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-01-08 08:04:44 -0800
commit25aa80846b84c0b3cd3e0b0256a046e1e92fb1db (patch)
treec9934f39f2e039e5877af7ee0d3b0d96c5a1debf /subsurface-core/qthelper.h
parentc022f5c4f71f3e7670ed458d714d96fd6e88c55b (diff)
downloadsubsurface-25aa80846b84c0b3cd3e0b0256a046e1e92fb1db.tar.gz
Move Dive class from qthelper.h/cpp to it's own file
and rename it to DiveObjectHelper, since it should be an QObject based class to make it easier on the QML, grantlee and widgets side to display the dive's internal data. each Q_PROPERTY defined in the DiveObjectHelper.h file can be acessed directly via it's name. So, if you are on a model that returns a dive, acess it's name by dive.name Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'subsurface-core/qthelper.h')
-rw-r--r--subsurface-core/qthelper.h104
1 files changed, 0 insertions, 104 deletions
diff --git a/subsurface-core/qthelper.h b/subsurface-core/qthelper.h
index 0049e9bbd..842e40c36 100644
--- a/subsurface-core/qthelper.h
+++ b/subsurface-core/qthelper.h
@@ -9,110 +9,6 @@
#include <QTranslator>
#include <QDir>
-class Dive {
-private:
- int m_number;
- int m_id;
- int m_rating;
- QString m_date;
- timestamp_t m_timestamp;
- QString m_time;
- QString m_location;
- QString m_gps;
- QString m_duration;
- QString m_depth;
- QString m_divemaster;
- QString m_buddy;
- QString m_airTemp;
- QString m_waterTemp;
- QString m_notes;
- QString m_tags;
- QString m_gas;
- QString m_sac;
- QStringList m_weights;
- QString m_suit;
- QStringList m_cylinders;
- QString m_trip;
- QString m_maxcns;
- QString m_otu;
- struct dive *dive;
- void put_date_time();
- void put_timestamp();
- void put_location();
- void put_gps();
- void put_duration();
- void put_depth();
- void put_divemaster();
- void put_buddy();
- void put_temp();
- void put_notes();
- void put_tags();
- void put_gas();
- void put_sac();
- void put_weight();
- void put_suit();
- void put_cylinder();
- void put_trip();
- void put_maxcns();
- void put_otu();
-
-public:
- Dive(struct dive *dive)
- : dive(dive)
- {
- m_number = dive->number;
- m_id = dive->id;
- m_rating = dive->rating;
- put_date_time();
- put_location();
- put_gps();
- put_duration();
- put_depth();
- put_divemaster();
- put_buddy();
- put_temp();
- put_notes();
- put_tags();
- put_gas();
- put_sac();
- put_timestamp();
- put_weight();
- put_suit();
- put_cylinder();
- put_trip();
- put_maxcns();
- put_otu();
- }
- Dive();
- ~Dive();
- 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;
- 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 weights() const;
- QString weight(int idx) const;
- QString suit() const;
- QString cylinders() const;
- QString cylinder(int idx) const;
- QString trip() const;
- QString maxcns() const;
- QString otu() const;
-};
-
// global pointers for our translation
extern QTranslator *qtTranslator, *ssrfTranslator;