Public Member Functions

PlotDateScale Class Reference

#include <PlotDateScale.h>

Inheritance diagram for PlotDateScale:
Inheritance graph
[legend]
Collaboration diagram for PlotDateScale:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 PlotDateScale (const QDate &date)
virtual ~PlotDateScale ()
virtual QwtText label (double value) const

Constructor & Destructor Documentation

PlotDateScale::PlotDateScale ( const QDate date  ) 

  : m_baseDate( date )
{
  //qDebug( "PlotDateScale::PlotDateScale" );

  setLabelRotation( -90 );
  setLabelAlignment( Qt::AlignLeft | Qt::AlignBottom );
}

PlotDateScale::~PlotDateScale (  )  [virtual]

{
  //qDebug( "PlotDateScale::~PlotDateScale" );
}


Member Function Documentation

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


The documentation for this class was generated from the following files: