summaryrefslogtreecommitdiffstats
path: root/qt-ui/profile/diveprofileitem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/profile/diveprofileitem.cpp')
-rw-r--r--qt-ui/profile/diveprofileitem.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/qt-ui/profile/diveprofileitem.cpp b/qt-ui/profile/diveprofileitem.cpp
index f8a37aeba..0b1d32a4e 100644
--- a/qt-ui/profile/diveprofileitem.cpp
+++ b/qt-ui/profile/diveprofileitem.cpp
@@ -534,6 +534,18 @@ void MeanDepthLine::setMeanDepth(int value)
{
leftText->setText(get_depth_string(value, false, false));
rightText->setText(get_depth_string(value, false, false));
+ meanDepth = value;
+}
+
+void MeanDepthLine::setAxis(DiveCartesianAxis* a)
+{
+ connect(a, SIGNAL(sizeChanged()), this, SLOT(axisLineChanged()));
+}
+
+void MeanDepthLine::axisLineChanged()
+{
+ DiveCartesianAxis *axis = qobject_cast<DiveCartesianAxis*>(sender());
+ animateMoveTo(x(),axis->posAtValue(meanDepth));
}
void PartialPressureGasItem::modelDataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight)