aboutsummaryrefslogtreecommitdiffstats
path: root/desktop-widgets/diveplanner.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-11-25 07:31:19 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-12-12 15:52:40 -0800
commitbb76cb56d42e957e03cc705a9f8fd9f637733b5d (patch)
tree3a92f6c4f2e681f2b60702a1fcf0f899fd5aa97d /desktop-widgets/diveplanner.h
parent16f86f2f65e73935496e3324bb16f9b8cd4d7953 (diff)
downloadsubsurface-bb76cb56d42e957e03cc705a9f8fd9f637733b5d.tar.gz
desktop: move planner-code to diveplanner.cpp
Around 2015 there was a push to move planner UI code from mainwindow.cpp to diveplanner.cpp. That never was completed, presumably because the planner is actually three widgets. Collect these widgets in one PlannerWidgets class and move the code there. This is not a full dis-entanglement, as the plannerwidgets have to access the profile via the mainwindow. But at least it collects the planner UI code at a single place. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/diveplanner.h')
-rw-r--r--desktop-widgets/diveplanner.h22
1 files changed, 19 insertions, 3 deletions
diff --git a/desktop-widgets/diveplanner.h b/desktop-widgets/diveplanner.h
index af38f83af..32c3d1a48 100644
--- a/desktop-widgets/diveplanner.h
+++ b/desktop-widgets/diveplanner.h
@@ -53,7 +53,6 @@ slots:
void heightChanged(const int height);
void waterTypeChanged(const int index);
void customSalinityChanged(double density);
- void printDecoPlan();
void setSurfacePressure(int surface_pressure);
void setSalinity(int salinity);
private:
@@ -72,7 +71,6 @@ public:
public
slots:
void settingsChanged();
- void printDecoPlan();
void setBackgasBreaks(bool dobreaks);
void disableDecoElements(int mode);
void disableBackgasBreaks(bool enabled);
@@ -92,10 +90,28 @@ public:
explicit PlannerDetails(QWidget *parent = 0);
QPushButton *printPlan() const { return ui.printPlan; }
QTextEdit *divePlanOutput() const { return ui.divePlanOutput; }
- QLabel *divePlannerOutputLabel() const { return ui.divePlanOutputLabel; }
+public
+slots:
+ void setPlanNotes(QString plan);
private:
Ui::plannerDetails ui;
};
+// The planner widgets make up three quadrants
+class PlannerWidgets : public QObject {
+ Q_OBJECT
+public:
+ PlannerWidgets();
+ void planDive();
+ void replanDive();
+public
+slots:
+ void printDecoPlan();
+public:
+ DivePlannerWidget plannerWidget;
+ PlannerSettingsWidget plannerSettingsWidget;
+ PlannerDetails plannerDetails;
+};
+
#endif // DIVEPLANNER_H