diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-09-18 21:33:53 -0500 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-09-18 22:18:10 -0500 |
commit | 882b2c146b2dfc164c1dd2fadf606e92c77addd8 (patch) | |
tree | 24f07b6c0c1c8a2a5c5ef482d1a16f4456605290 /qt-ui/diveplanner.cpp | |
parent | 40462d5008de546d12038b3b062052e180b02930 (diff) | |
download | subsurface-882b2c146b2dfc164c1dd2fadf606e92c77addd8.tar.gz |
Use Planner dialog to add dive
Right now this is just calling the same code and setting a flag whether we
are planning or adding a dive.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/diveplanner.cpp')
-rw-r--r-- | qt-ui/diveplanner.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp index ba578fed1..5356aa71f 100644 --- a/qt-ui/diveplanner.cpp +++ b/qt-ui/diveplanner.cpp @@ -894,6 +894,16 @@ void DivePlannerWidget::lastStopChanged(bool checked) plannerModel->setLastStop6m(checked); } +void DivePlannerPointsModel::setPlanMode(bool isPlan) +{ + mode = isPlan ? PLAN : ADD; +} + +bool DivePlannerPointsModel::isPlanner() +{ + return mode == PLAN; +} + int DivePlannerPointsModel::columnCount(const QModelIndex& parent) const { return COLUMNS; |