summaryrefslogtreecommitdiffstats
path: root/qt-ui/diveplanner.h
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-09-18 21:33:53 -0500
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-09-18 22:18:10 -0500
commit882b2c146b2dfc164c1dd2fadf606e92c77addd8 (patch)
tree24f07b6c0c1c8a2a5c5ef482d1a16f4456605290 /qt-ui/diveplanner.h
parent40462d5008de546d12038b3b062052e180b02930 (diff)
downloadsubsurface-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.h')
-rw-r--r--qt-ui/diveplanner.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/qt-ui/diveplanner.h b/qt-ui/diveplanner.h
index 8dd8db3e3..2f7000a6d 100644
--- a/qt-ui/diveplanner.h
+++ b/qt-ui/diveplanner.h
@@ -29,9 +29,12 @@ public:
virtual QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const;
virtual int rowCount(const QModelIndex& parent = QModelIndex()) const;
virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
- virtual bool setData(const QModelIndex& index, const QVariant& value, int role = Qt::EditRole);
- virtual Qt::ItemFlags flags(const QModelIndex& index) const;
+ virtual bool setData(const QModelIndex& index, const QVariant& value, int role = Qt::EditRole);
+ virtual Qt::ItemFlags flags(const QModelIndex& index) const;
void removeSelectedPoints(const QVector<int>& rows);
+ enum Modes { PLAN, ADD };
+ void setPlanMode(bool);
+ bool isPlanner();
/**
* @return the row number.
@@ -50,9 +53,9 @@ public slots:
void setLastStop6m(bool value);
void createPlan();
void remove(const QModelIndex& index);
- void cancelPlan();
- void createTemporaryPlan();
- void deleteTemporaryPlan();
+ void cancelPlan();
+ void createTemporaryPlan();
+ void deleteTemporaryPlan();
signals:
void planCreated();
@@ -61,6 +64,7 @@ signals:
private:
explicit DivePlannerPointsModel(QObject* parent = 0);
struct diveplan diveplan;
+ Modes mode;
QVector<divedatapoint> divepoints;
struct dive *tempDive;
void deleteTemporaryPlan(struct divedatapoint *dp);