diff options
author | Cristine Guadelupe <cristineguadelupe@me.com> | 2015-01-13 02:03:49 -0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-01-14 12:24:57 +1300 |
commit | 2b193416090f3ca9795513d94028557c96aed0b4 (patch) | |
tree | 7cda9150c7dd51f1e6aee5afbef1f6b246e4baae /qt-ui/profile/profilewidget2.cpp | |
parent | c9535b6547c60afdb89db0822608cd7a44b3f50e (diff) | |
download | subsurface-2b193416090f3ca9795513d94028557c96aed0b4.tar.gz |
Remove instantMeanDepthLine
Take instantMeanDepthLine out of the code. We have the moving average line
plus the exact data in the information overlay.
Signed-off-by: Cristine Guadelupe <cristineguadelupe@me.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile/profilewidget2.cpp')
-rw-r--r-- | qt-ui/profile/profilewidget2.cpp | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp index f24e17d6f..87339e2f1 100644 --- a/qt-ui/profile/profilewidget2.cpp +++ b/qt-ui/profile/profilewidget2.cpp @@ -103,7 +103,6 @@ ProfileWidget2::ProfileWidget2(QWidget *parent) : QGraphicsView(parent), mouseFollowerHorizontal(new DiveLineItem()), rulerItem(new RulerItem2()), tankItem(new TankItem()), - instantMeanDepth(new InstantMeanDepthLine()), isGrayscale(false), printMode(false), shouldCalculateMaxTime(true), @@ -118,7 +117,6 @@ ProfileWidget2::ProfileWidget2(QWidget *parent) : QGraphicsView(parent), addItemsToScene(); scene()->installEventFilter(this); connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), this, SLOT(settingsChanged())); - connect(this, SIGNAL(mouseMoved(int, int)), instantMeanDepth, SLOT(mouseMoved(int, int))); QAction *action = NULL; #define ADD_ACTION(SHORTCUT, Slot) \ action = new QAction(this); \ @@ -173,7 +171,6 @@ ProfileWidget2::~ProfileWidget2() delete mouseFollowerHorizontal; delete rulerItem; delete tankItem; - delete instantMeanDepth; } #define SUBSURFACE_OBJ_DATA 1 @@ -213,7 +210,6 @@ void ProfileWidget2::addItemsToScene() scene()->addItem(tankItem); scene()->addItem(mouseFollowerHorizontal); scene()->addItem(mouseFollowerVertical); - scene()->addItem(instantMeanDepth); QPen pen(QColor(Qt::red).lighter()); pen.setWidth(0); mouseFollowerHorizontal->setPen(pen); @@ -274,12 +270,6 @@ void ProfileWidget2::setupItemOnScene() cylinderPressureAxis->setTickInterval(30000); - instantMeanDepth->setLine(0, 0, 96, 0); - instantMeanDepth->setX(3); - instantMeanDepth->setPen(QPen(QBrush(Qt::red), 0, Qt::SolidLine)); - instantMeanDepth->setZValue(1); - instantMeanDepth->setAxis(profileYAxis); - diveComputerText->setAlignment(Qt::AlignRight | Qt::AlignTop); diveComputerText->setBrush(getColor(TIME_TEXT, isGrayscale)); @@ -605,11 +595,6 @@ void ProfileWidget2::plotDive(struct dive *d, bool force) rulerItem->setPlotInfo(plotInfo); tankItem->setData(dataModel, &plotInfo, &displayed_dive); - instantMeanDepth->vAxis = profileYAxis; - instantMeanDepth->hAxis = timeAxis; - instantMeanDepth->setVisible(prefs.show_average_depth && !printMode); - instantMeanDepth->setModel(dataModel); - dataModel->emitDataChanged(); // The event items are a bit special since we don't know how many events are going to // exist on a dive, so I cant create cache items for that. that's why they are here @@ -847,8 +832,6 @@ void ProfileWidget2::mouseMoveEvent(QMouseEvent *event) if (timeAxis->maximum() >= hValue && timeAxis->minimum() <= hValue) { mouseFollowerVertical->setPos(pos.x(), profileYAxis->line().y1()); } - if (timeAxis->maximum() >= hValue && timeAxis->minimum() <= hValue && profileYAxis->maximum() >= vValue && profileYAxis->minimum() <= vValue) - emit mouseMoved(hValue, vValue); } bool ProfileWidget2::eventFilter(QObject *object, QEvent *event) |