aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/models.h
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-05-01 09:04:14 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-05-01 10:10:16 -0700
commit730e055e5aacd2f917be9d86140773853670e850 (patch)
treeae06b4b262a4d3fbbf2a5b81167d8140f9ad39b7 /qt-ui/models.h
parent0794f03b5e9dd1ba55e16b10b11cd6d61530b5b8 (diff)
downloadsubsurface-730e055e5aacd2f917be9d86140773853670e850.tar.gz
Use the existing current_dive macro in Qt code
Replicating this with the currentDive member seems to make no sense. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/models.h')
-rw-r--r--qt-ui/models.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/qt-ui/models.h b/qt-ui/models.h
index 9e4666dc7..b6bcdec78 100644
--- a/qt-ui/models.h
+++ b/qt-ui/models.h
@@ -47,12 +47,10 @@ public:
void clear();
void update();
private:
- dive *currentDive;
-
/* Since the dive doesn`t stores the number of cylinders that
* it has ( max 8 ) and since I don`t want to make a
* model-for-each-dive, let`s hack this here instead. */
- QMap<dive*, int> usedRows;
+ QMap<struct dive *, int> usedRows;
};
/* Encapsulation of the Weight Model, that represents
@@ -68,7 +66,8 @@ class WeightModel : public QAbstractTableModel {
void clear();
void update();
private:
- int rows;
+ /* Remember the number of rows in a dive */
+ QMap<struct dive *, int> usedRows;
};
/*! An AbstractItemModel for recording dive trip information such as a list of dives.