From c7a5d816839d05dd97eac5bec6fa3e095479510b Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Tue, 30 Dec 2014 21:13:50 -0200 Subject: Set data model for the MeanDepth line This way we can poke around data for the mean depth line. Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- qt-ui/profile/diveprofileitem.cpp | 4 ++++ qt-ui/profile/diveprofileitem.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/qt-ui/profile/diveprofileitem.cpp b/qt-ui/profile/diveprofileitem.cpp index d96059173..1d930ad6a 100644 --- a/qt-ui/profile/diveprofileitem.cpp +++ b/qt-ui/profile/diveprofileitem.cpp @@ -822,6 +822,10 @@ MeanDepthLine::MeanDepthLine() : meanDepth(0), leftText(new DiveTextItem(this)), 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); diff --git a/qt-ui/profile/diveprofileitem.h b/qt-ui/profile/diveprofileitem.h index 7f375f110..d7e3814a6 100644 --- a/qt-ui/profile/diveprofileitem.h +++ b/qt-ui/profile/diveprofileitem.h @@ -194,6 +194,7 @@ public: 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(); @@ -202,6 +203,7 @@ private: int meanDepth; DiveTextItem *leftText; DiveTextItem *rightText; + DivePlotDataModel *model; }; class InstantMeanDepthLine : public MeanDepthLine { -- cgit v1.2.3-70-g09d2