mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
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>
This commit is contained in:
parent
eab31855f5
commit
adb7dc6fac
2 changed files with 15 additions and 15 deletions
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue