From 343b82708eeb3187aa15e207bab26cbdb414f1e3 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Wed, 28 Jan 2015 17:00:19 -0200 Subject: Remove dead code We changed this MeanDepthLine to the MeanDepthCurve (or something), no need to keep old code around. Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- qt-ui/profile/diveprofileitem.cpp | 40 --------------------------------------- qt-ui/profile/diveprofileitem.h | 19 ------------------- qt-ui/profile/profilewidget2.h | 1 - 3 files changed, 60 deletions(-) (limited to 'qt-ui') diff --git a/qt-ui/profile/diveprofileitem.cpp b/qt-ui/profile/diveprofileitem.cpp index 47d7e4b5e..ad4c5c25e 100644 --- a/qt-ui/profile/diveprofileitem.cpp +++ b/qt-ui/profile/diveprofileitem.cpp @@ -899,46 +899,6 @@ void DiveReportedCeiling::paint(QPainter *painter, const QStyleOptionGraphicsIte QGraphicsPolygonItem::paint(painter, option, widget); } -MeanDepthLine::MeanDepthLine() : meanDepth(0), leftText(new DiveTextItem(this)), rightText(new DiveTextItem(this)), model(NULL) -{ - leftText->setAlignment(Qt::AlignRight | Qt::AlignBottom); - leftText->setBrush(getColor(MEAN_DEPTH)); - rightText->setAlignment(Qt::AlignLeft | Qt::AlignBottom); - rightText->setBrush(getColor(MEAN_DEPTH)); - leftText->setPos(0, 0); - rightText->setPos(line().length(), 0); -} - -void MeanDepthLine::setModel(DivePlotDataModel *m) -{ - model = m; -} - -void MeanDepthLine::setLine(qreal x1, qreal y1, qreal x2, qreal y2) -{ - QGraphicsLineItem::setLine(x1, y1, x2, y2); - leftText->setPos(x1, 0); - rightText->setPos(x2, 0); -} - -void MeanDepthLine::setMeanDepth(int value) -{ - leftText->setText(get_depth_string(value, true, true)); - rightText->setText(get_depth_string(value, true, true)); - meanDepth = value; -} - -void MeanDepthLine::setAxis(DiveCartesianAxis *a) -{ - connect(a, SIGNAL(sizeChanged()), this, SLOT(axisLineChanged())); -} - -void MeanDepthLine::axisLineChanged() -{ - DiveCartesianAxis *axis = qobject_cast(sender()); - Animations::moveTo(this, x(), axis->posAtValue(meanDepth)); -} - void PartialPressureGasItem::modelDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight) { //AbstractProfilePolygonItem::modelDataChanged(); diff --git a/qt-ui/profile/diveprofileitem.h b/qt-ui/profile/diveprofileitem.h index a323e54ee..fcbf4cd97 100644 --- a/qt-ui/profile/diveprofileitem.h +++ b/qt-ui/profile/diveprofileitem.h @@ -204,25 +204,6 @@ public: virtual void settingsChanged(); }; -class MeanDepthLine : public DiveLineItem { - Q_OBJECT -public: - MeanDepthLine(); - void setMeanDepth(int value); - void setLine(qreal x1, qreal y1, qreal x2, qreal y2); - void setAxis(DiveCartesianAxis *a); - void setModel(DivePlotDataModel *m); -public -slots: - void axisLineChanged(); - -protected: - int meanDepth; - DiveTextItem *leftText; - DiveTextItem *rightText; - DivePlotDataModel *model; -}; - class PartialPressureGasItem : public AbstractProfilePolygonItem { Q_OBJECT public: diff --git a/qt-ui/profile/profilewidget2.h b/qt-ui/profile/profilewidget2.h index b4ae8b333..d594748cc 100644 --- a/qt-ui/profile/profilewidget2.h +++ b/qt-ui/profile/profilewidget2.h @@ -22,7 +22,6 @@ class RulerItem2; struct dive; struct plot_info; class ToolTipItem; -class MeanDepthLine; class DiveMeanDepth; class DiveReportedCeiling; class DiveTextItem; -- cgit v1.2.3-70-g09d2