mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 06:15:26 +00:00
Added a 'Depth' Axis that knows how to add its strings on screen.
The CartesianAxis used a simple method to put things on screen which is wrong for almost any case besides the 'current value here' since we store things in milimeters on the axis, we need to convert those to meters before showing on the profile. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
90fc7a23f2
commit
67f2c0bcaa
2 changed files with 10 additions and 0 deletions
|
@ -178,3 +178,8 @@ void DiveCartesianAxis::setColor(const QColor& color)
|
|||
defaultPen.setCosmetic(true);
|
||||
setPen(defaultPen);
|
||||
}
|
||||
|
||||
QString DepthAxis::textForValue(double value)
|
||||
{
|
||||
return get_depth_string(value, false, false);
|
||||
}
|
||||
|
|
|
@ -43,4 +43,9 @@ protected:
|
|||
QColor textColor;
|
||||
};
|
||||
|
||||
class DepthAxis : public DiveCartesianAxis {
|
||||
protected:
|
||||
QString textForValue(double value);
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Add table
Reference in a new issue