diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-06-28 08:07:28 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-06-28 08:07:28 -0700 |
commit | 06a8002a2de0dc731f0ecd5ec87cf210ec2b9c2c (patch) | |
tree | f94af845f029fba6d3cec0fefcdfc7c72b88850a /qt-ui/diveplanner.h | |
parent | 4b18da1f2251c37a17ef68d982cb69d344968c9d (diff) | |
download | subsurface-06a8002a2de0dc731f0ecd5ec87cf210ec2b9c2c.tar.gz |
Planner: implement sane way to set the start time of the planned dive
This uses the same widgets we use on the maintab.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/diveplanner.h')
-rw-r--r-- | qt-ui/diveplanner.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/qt-ui/diveplanner.h b/qt-ui/diveplanner.h index 378707d96..08a1ba519 100644 --- a/qt-ui/diveplanner.h +++ b/qt-ui/diveplanner.h @@ -3,6 +3,7 @@ #include <QGraphicsPathItem> #include <QAbstractTableModel> +#include <QDateTime> #include "dive.h" @@ -37,6 +38,7 @@ public: void setPlanMode(Mode mode); bool isPlanner(); void createSimpleDive(); + void setupStartTime(); void clear(); Mode currentMode() const; bool setRecalc(bool recalc); @@ -69,6 +71,7 @@ slots: void setBottomSac(int sac); void setDecoSac(int sac); void setStartTime(const QTime &t); + void setStartDate(const QDate &date); void setLastStop6m(bool value); void setDropStoneMode(bool value); void setVerbatim(bool value); @@ -88,6 +91,7 @@ signals: void planCreated(); void planCanceled(); void cylinderModelEdited(); + void startTimeChanged(QDateTime); private: explicit DivePlannerPointsModel(QObject *parent = 0); @@ -103,6 +107,7 @@ private: struct dive *stagingDive; QVector<QPair<int, int> > oldGases; bool drop_stone_mode; + QDateTime startTime; }; class DiveHandler : public QObject, public QGraphicsEllipseItem { @@ -129,9 +134,9 @@ class DivePlannerWidget : public QWidget { Q_OBJECT public: explicit DivePlannerWidget(QWidget *parent = 0, Qt::WindowFlags f = 0); - public slots: + void setupStartTime(QDateTime startTime); void settingsChanged(); void atmPressureChanged(const int pressure); void heightChanged(const int height); |