mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
16f86f2f65
commit
bb76cb56d4
4 changed files with 143 additions and 117 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue