mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
profile: remove ProfileScene::dataModel
All data access is now directly via the plot_info structure owned by the ProfileScene itself. Also removes DivePercentageItem::hColumn, which was an artifact from the DivePlotDataModel. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
bdbcb1b7e3
commit
7aacde3169
6 changed files with 2 additions and 15 deletions
|
|
@ -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 <QAbstractAnimation>
|
||||
|
||||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue