From 06a8002a2de0dc731f0ecd5ec87cf210ec2b9c2c Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sat, 28 Jun 2014 08:07:28 -0700 Subject: 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 --- qt-ui/diveplanner.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'qt-ui/diveplanner.h') 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 #include +#include #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 > 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); -- cgit v1.2.3-70-g09d2