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:
Tomaz Canabrava 2014-01-15 11:08:31 -02:00 committed by Dirk Hohndel
parent 67f2c0bcaa
commit 8773b4f9f0
2 changed files with 9 additions and 0 deletions

View file

@ -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);
}

View file

@ -48,4 +48,8 @@ protected:
QString textForValue(double value);
};
class TimeAxis : public DiveCartesianAxis {
protected:
QString textForValue(double value);
};
#endif