diff options
author | Lubomir I. Ivanov <neolit123@gmail.com> | 2013-07-11 12:40:08 +0300 |
---|---|---|
committer | Lubomir I. Ivanov <neolit123@gmail.com> | 2013-07-11 12:40:08 +0300 |
commit | adb7dc6fac214dd150208c573a2db9838fbed78d (patch) | |
tree | 75c499f07a3238c71ccbfb113c78aac6dc73ff23 /qt-ui | |
parent | eab31855f51623d1e816f557792860fb10430be8 (diff) | |
download | subsurface-adb7dc6fac214dd150208c573a2db9838fbed78d.tar.gz |
Models: move the declaration of DiveItem to the header
This should allow external use of the type by
including models.h.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/models.cpp | 15 | ||||
-rw-r--r-- | qt-ui/models.h | 15 |
2 files changed, 15 insertions, 15 deletions
diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp index 1fd5f74cb..ba325e149 100644 --- a/qt-ui/models.cpp +++ b/qt-ui/models.cpp @@ -926,21 +926,6 @@ QVariant TripItem::data(int column, int role) const return ret; } -struct DiveItem : public TreeItem { - enum Column {NR, DATE, RATING, DEPTH, DURATION, TEMPERATURE, TOTALWEIGHT, - SUIT, CYLINDER, NITROX, SAC, OTU, MAXCNS, LOCATION, COLUMNS }; - - virtual QVariant data(int column, int role) const; - struct dive* dive; - - QString displayDuration() const; - QString displayDepth() const; - QString displayTemperature() const; - QString displayWeight() const; - QString displaySac() const; - int weight() const; -}; - static int nitrox_sort_value(struct dive *dive) { int o2, he, o2low; diff --git a/qt-ui/models.h b/qt-ui/models.h index ec15174f6..439ff05df 100644 --- a/qt-ui/models.h +++ b/qt-ui/models.h @@ -135,6 +135,21 @@ public: TreeItem *parent; }; +struct DiveItem : public TreeItem { + enum Column {NR, DATE, RATING, DEPTH, DURATION, TEMPERATURE, TOTALWEIGHT, + SUIT, CYLINDER, NITROX, SAC, OTU, MAXCNS, LOCATION, COLUMNS }; + + virtual QVariant data(int column, int role) const; + struct dive* dive; + + QString displayDuration() const; + QString displayDepth() const; + QString displayTemperature() const; + QString displayWeight() const; + QString displaySac() const; + int weight() const; +}; + struct TripItem; class TreeModel : public QAbstractItemModel |