mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
profile: pass DivePlannerPointsModel at construction time
This model is only needed when in plan mode. To enable multiple profilewidgets at the same time (e.g. for the mobile app or for printing), make the pointer to DivePlannerPointsModel a member variable that is initialized at construction time. Moreover, allow passing null as the DivePlannerPointsModel, in which case planning will be disabled. This will be useful for simple printing. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
94633d2156
commit
b9673df60b
4 changed files with 29 additions and 36 deletions
|
@ -134,7 +134,7 @@ MainWindow::MainWindow() : QMainWindow(),
|
|||
// for the "default" mode
|
||||
mainTab.reset(new MainTab);
|
||||
diveList.reset(new DiveListView);
|
||||
graphics = new ProfileWidget2(this);
|
||||
graphics = new ProfileWidget2(DivePlannerPointsModel::instance(), this);
|
||||
mapWidget.reset(MapWidget::instance()); // Yes, this is ominous see comment in mapwidget.cpp.
|
||||
plannerWidgets.reset(new PlannerWidgets);
|
||||
statistics.reset(new StatsWidget);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue