#include <PlotDateScale.h>
Public Member Functions | |
PlotDateScale (const QDate &date) | |
virtual | ~PlotDateScale () |
virtual QwtText | label (double value) const |
PlotDateScale::PlotDateScale | ( | const QDate & | date | ) |
: m_baseDate( date ) { //qDebug( "PlotDateScale::PlotDateScale" ); setLabelRotation( -90 ); setLabelAlignment( Qt::AlignLeft | Qt::AlignBottom ); }
PlotDateScale::~PlotDateScale | ( | ) | [virtual] |
{
//qDebug( "PlotDateScale::~PlotDateScale" );
}
QwtText PlotDateScale::label | ( | double | value | ) | const [virtual] |
Reimplemented from QwtAbstractScaleDraw.
{ //qDebug( "PlotDateScale::label" ); QDate thisDate = m_baseDate.addDays( ( int )( floor( value / 86400.0 ) ) ); return thisDate.toString( QLocale::system().dateFormat( QLocale::ShortFormat ) ); }