diff --git a/commands/command_edit.cpp b/commands/command_edit.cpp index f2f652e54..e6e5f8e8e 100644 --- a/commands/command_edit.cpp +++ b/commands/command_edit.cpp @@ -854,7 +854,7 @@ void ReplanDive::undo() QVector divesToNotify = { d }; // Note that we have to emit cylindersReset before divesChanged, because the divesChanged - // updates the DivePlotDataModel, which is out-of-sync and gets confused. + // updates the profile, which is out-of-sync and gets confused. emit diveListNotifier.cylindersReset(divesToNotify); emit diveListNotifier.divesChanged(divesToNotify, DiveField::DATETIME | DiveField::DURATION | DiveField::DEPTH | DiveField::MODE | DiveField::NOTES | DiveField::SALINITY | DiveField::ATM_PRESS); diff --git a/profile-widget/divecartesianaxis.cpp b/profile-widget/divecartesianaxis.cpp index 12b9999c4..40b2cef99 100644 --- a/profile-widget/divecartesianaxis.cpp +++ b/profile-widget/divecartesianaxis.cpp @@ -3,7 +3,6 @@ #include "profile-widget/divetextitem.h" #include "core/qthelper.h" #include "core/subsurface-string.h" -#include "qt-models/diveplotdatamodel.h" #include "profile-widget/animationfunctions.h" #include "profile-widget/divelineitem.h" #include "profile-widget/profilescene.h" diff --git a/profile-widget/divepercentageitem.h b/profile-widget/divepercentageitem.h index 72bfaceca..08d7f0bdc 100644 --- a/profile-widget/divepercentageitem.h +++ b/profile-widget/divepercentageitem.h @@ -6,7 +6,6 @@ struct dive; struct divecomputer; struct plot_info; -class DivePlotDataModel; class DiveCartesianAxis; class DivePercentageItem : public QGraphicsPixmapItem { @@ -16,7 +15,6 @@ public: private: const DiveCartesianAxis &hAxis; const DiveCartesianAxis &vAxis; - int hDataColumn; double dpr; }; diff --git a/profile-widget/profilescene.cpp b/profile-widget/profilescene.cpp index 90671bf19..9639581fe 100644 --- a/profile-widget/profilescene.cpp +++ b/profile-widget/profilescene.cpp @@ -14,7 +14,6 @@ #include "core/qthelper.h" // for decoMode() #include "core/subsurface-string.h" #include "core/settings/qPrefDisplay.h" -#include "qt-models/diveplotdatamodel.h" #include "qt-models/diveplannermodel.h" #include @@ -92,7 +91,6 @@ ProfileScene::ProfileScene(double dpr, bool printMode, bool isGrayscale) : isGrayscale(isGrayscale), maxtime(-1), maxdepth(-1), - dataModel(new DivePlotDataModel(this)), profileYAxis(new DiveCartesianAxis(DiveCartesianAxis::Position::Left, true, 3, 0, TIME_GRID, Qt::red, true, true, dpr, 1.0, printMode, isGrayscale, *this)), gasYAxis(new DiveCartesianAxis(DiveCartesianAxis::Position::Right, false, 1, 2, TIME_GRID, Qt::black, true, true, @@ -191,8 +189,6 @@ ProfileScene::~ProfileScene() void ProfileScene::clear() { - dataModel->clear(); - for (AbstractProfilePolygonItem *item: profileItems) item->clear(); @@ -467,8 +463,6 @@ void ProfileScene::plotDive(const struct dive *dIn, int dcIn, DivePlannerPointsM maxdepth = newMaxDepth; } - dataModel->setDive(plotInfo); - // It seems that I'll have a lot of boilerplate setting the model / axis for // each item, I'll mostly like to fix this in the future, but I'll keep at this for now. profileYAxis->setBounds(0.0, maxdepth); diff --git a/profile-widget/profilescene.h b/profile-widget/profilescene.h index c512c4509..66ce6d6cb 100644 --- a/profile-widget/profilescene.h +++ b/profile-widget/profilescene.h @@ -11,9 +11,6 @@ #include #include -class DivePlannerPointsModel; -class DivePlotDataModel; - class AbstractProfilePolygonItem; class DiveCalculatedCeiling; class DiveCalculatedTissue; @@ -24,6 +21,7 @@ class DiveHeartrateItem; class DiveMeanDepthItem; class DivePercentageItem; class DivePixmaps; +class DivePlannerPointsModel; class DiveProfileItem; class DiveReportedCeiling; class DiveTemperatureItem; @@ -69,7 +67,6 @@ private: int maxtime; int maxdepth; - DivePlotDataModel *dataModel; struct plot_info plotInfo; DiveCartesianAxis *profileYAxis; DiveCartesianAxis *gasYAxis; diff --git a/profile-widget/profilewidget2.cpp b/profile-widget/profilewidget2.cpp index debc527db..20c38e73d 100644 --- a/profile-widget/profilewidget2.cpp +++ b/profile-widget/profilewidget2.cpp @@ -1,7 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 #include "profile-widget/profilewidget2.h" #include "profile-widget/profilescene.h" -#include "qt-models/diveplotdatamodel.h" #include "core/device.h" #include "core/event.h" #include "core/subsurface-string.h"