mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
Create a Time Axis that knows how to plot the minutes.
Created a Time Axis based on the CartesianAxis that knows how to plot the minutes. This is needed because the CartesianAxis donesn't knows about minutes at all, and would plot the seconds instead. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
67f2c0bcaa
commit
8773b4f9f0
2 changed files with 9 additions and 0 deletions
|
@ -183,3 +183,8 @@ QString DepthAxis::textForValue(double value)
|
|||
{
|
||||
return get_depth_string(value, false, false);
|
||||
}
|
||||
|
||||
QString TimeAxis::textForValue(double value)
|
||||
{
|
||||
return QString::number(value / 60);
|
||||
}
|
|
@ -48,4 +48,8 @@ protected:
|
|||
QString textForValue(double value);
|
||||
};
|
||||
|
||||
class TimeAxis : public DiveCartesianAxis {
|
||||
protected:
|
||||
QString textForValue(double value);
|
||||
};
|
||||
#endif
|
Loading…
Add table
Reference in a new issue