mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
New profile: improve mean depth line
Show decimal depth and make the line length more appropriate for the dive profile shown. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
e0f8ec7144
commit
582fb693a0
2 changed files with 3 additions and 2 deletions
|
@ -531,8 +531,8 @@ void MeanDepthLine::setLine(qreal x1, qreal y1, qreal x2, qreal y2)
|
||||||
|
|
||||||
void MeanDepthLine::setMeanDepth(int value)
|
void MeanDepthLine::setMeanDepth(int value)
|
||||||
{
|
{
|
||||||
leftText->setText(get_depth_string(value, false, false));
|
leftText->setText(get_depth_string(value, false, true));
|
||||||
rightText->setText(get_depth_string(value, false, false));
|
rightText->setText(get_depth_string(value, false, true));
|
||||||
meanDepth = value;
|
meanDepth = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -347,6 +347,7 @@ void ProfileWidget2::plotDives(QList<dive*> dives)
|
||||||
cylinderPressureAxis->setMinimum(pInfo.minpressure);
|
cylinderPressureAxis->setMinimum(pInfo.minpressure);
|
||||||
cylinderPressureAxis->setMaximum(pInfo.maxpressure);
|
cylinderPressureAxis->setMaximum(pInfo.maxpressure);
|
||||||
meanDepth->setMeanDepth(pInfo.meandepth);
|
meanDepth->setMeanDepth(pInfo.meandepth);
|
||||||
|
meanDepth->setLine(0,0,timeAxis->posAtValue(d->duration.seconds),0);
|
||||||
meanDepth->animateMoveTo(3, profileYAxis->posAtValue(pInfo.meandepth));
|
meanDepth->animateMoveTo(3, profileYAxis->posAtValue(pInfo.meandepth));
|
||||||
|
|
||||||
dataModel->emitDataChanged();
|
dataModel->emitDataChanged();
|
||||||
|
|
Loading…
Add table
Reference in a new issue