diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-11-25 07:31:19 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-12-12 15:52:40 -0800 |
commit | bb76cb56d42e957e03cc705a9f8fd9f637733b5d (patch) | |
tree | 3a92f6c4f2e681f2b60702a1fcf0f899fd5aa97d /desktop-widgets/mainwindow.h | |
parent | 16f86f2f65e73935496e3324bb16f9b8cd4d7953 (diff) | |
download | subsurface-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/mainwindow.h')
-rw-r--r-- | desktop-widgets/mainwindow.h | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/desktop-widgets/mainwindow.h b/desktop-widgets/mainwindow.h index e0d53b20d..141f1d623 100644 --- a/desktop-widgets/mainwindow.h +++ b/desktop-widgets/mainwindow.h @@ -35,10 +35,8 @@ class QWebView; class QSettings; class UpdateManager; class UserManual; -class DivePlannerWidget; +class PlannerWidgets; class ProfileWidget2; -class PlannerDetails; -class PlannerSettingsWidget; class LocationInformationWidget; typedef std::pair<QByteArray, QVariant> WidgetProperty; @@ -73,7 +71,6 @@ public: void loadFiles(const QStringList files); void importFiles(const QStringList importFiles); void setToolButtonsEnabled(bool enabled); - void printPlan(); void setApplicationState(ApplicationState state); bool inPlanner(); NotificationWidget *getNotificationWidget(); @@ -82,10 +79,8 @@ public: void editDiveSite(dive_site *ds); std::unique_ptr<MainTab> mainTab; - PlannerDetails *plannerDetails; - PlannerSettingsWidget *divePlannerSettingsWidget; + std::unique_ptr<PlannerWidgets> plannerWidgets; ProfileWidget2 *graphics; - DivePlannerWidget *divePlannerWidget; DiveListView *diveList; private slots: @@ -164,7 +159,6 @@ slots: void planCanceled(); void planCreated(); void setEnabledToolbar(bool arg1); - void setPlanNotes(QString plan); // Some shortcuts like "change DC" or "copy/paste dive components" // should only be enabled when the profile's visible. void disableShortcuts(bool disablePaste = true); |