casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
casa::ExternalAxisWidget Class Referenceabstract

Base class for classes that use the QwtScaleDiv information to draw their own axis. More...

#include <ExternalAxisWidget.h>

Inheritance diagram for casa::ExternalAxisWidget:
casa::ExternalAxisWidgetHorizontal casa::ExternalAxisWidgetVertical casa::ExternalAxisWidgetBottom casa::ExternalAxisWidgetTop casa::ExternalAxisWidgetLeft casa::ExternalAxisWidgetRight

Public Member Functions

 ExternalAxisWidget (QWidget *parent, QwtPlot *plot, bool leftAxisInternal, bool bottomAxisInternal, bool rightAxisInternal)
 
void setAxisLabel (const QString &label)
 
QString getAxisLabel () const
 
virtual void paintEvent (QPaintEvent *event)
 
void print (QPainter *painter, QRect imageRect)
 
void setDateFormat (const casacore::String &newFormat)
 Date formats. More...
 
void setRelativeDateFormat (const casacore::String &newFormat)
 
void setAxisScale (PlotAxisScale scale, casacore::uInt base=10)
 Axis scale. More...
 
void setReferenceValue (bool on, double value)
 
void setAxisFont (const QFont &font)
 Axis font. More...
 
virtual ~ExternalAxisWidget ()
 

Protected Member Functions

virtual void drawTicks (QPainter *painter, int tickLength)=0
 
virtual void defineAxis (QLine &axisLine)=0
 
virtual void drawAxisLabel (QPainter *painter)=0
 
virtual int getAxisLength () const =0
 
virtual int getCanvasHeight () const
 
virtual int getCanvasWidth () const
 
virtual int getStartY () const
 
virtual int getStartX () const
 
virtual int getEndY () const
 
int getTickIncrement (int tickCount) const
 
double getTickStartPixel (QwtPlot::Axis axis)
 
double getTickDistance (QwtPlot::Axis axis)
 
double getTickIncrement (double tickDistance, QwtPlot::Axis axis)
 
QString formatLabel (double value) const
 

Protected Attributes

QwtPlot * plot
 
QPScaleDraw * scaleDraw
 
QString axisLabel
 
QwtPlot::Axis plotAxis
 
bool leftAxisInternal
 Which axis are internal (drawn by the Qwt plot) More...
 
bool bottomAxisInternal
 
bool rightAxisInternal
 
const int AXIS_SMALL_SIDE
 
const int TICK_LENGTH
 
const int MARGIN
 
const int MIN_START_Y
 

Private Member Functions

void drawBackBone (QPainter *painter)
 
void drawTicks (QPainter *painter)
 
void drawLabel (QPainter *painter)
 

Private Attributes

QFont axisFont
 

Detailed Description

Base class for classes that use the QwtScaleDiv information to draw their own axis.

Definition at line 43 of file ExternalAxisWidget.h.

Constructor & Destructor Documentation

casa::ExternalAxisWidget::ExternalAxisWidget ( QWidget *  parent,
QwtPlot *  plot,
bool  leftAxisInternal,
bool  bottomAxisInternal,
bool  rightAxisInternal 
)
virtual casa::ExternalAxisWidget::~ExternalAxisWidget ( )
virtual

Member Function Documentation

virtual void casa::ExternalAxisWidget::defineAxis ( QLine &  axisLine)
protectedpure virtual
virtual void casa::ExternalAxisWidget::drawAxisLabel ( QPainter *  painter)
protectedpure virtual
void casa::ExternalAxisWidget::drawBackBone ( QPainter *  painter)
private
void casa::ExternalAxisWidget::drawLabel ( QPainter *  painter)
private
virtual void casa::ExternalAxisWidget::drawTicks ( QPainter *  painter,
int  tickLength 
)
protectedpure virtual
void casa::ExternalAxisWidget::drawTicks ( QPainter *  painter)
private
QString casa::ExternalAxisWidget::formatLabel ( double  value) const
protected
QString casa::ExternalAxisWidget::getAxisLabel ( ) const
virtual int casa::ExternalAxisWidget::getAxisLength ( ) const
protectedpure virtual
virtual int casa::ExternalAxisWidget::getCanvasHeight ( ) const
protectedvirtual
virtual int casa::ExternalAxisWidget::getCanvasWidth ( ) const
protectedvirtual
virtual int casa::ExternalAxisWidget::getEndY ( ) const
protectedvirtual
virtual int casa::ExternalAxisWidget::getStartX ( ) const
protectedvirtual
virtual int casa::ExternalAxisWidget::getStartY ( ) const
protectedvirtual
double casa::ExternalAxisWidget::getTickDistance ( QwtPlot::Axis  axis)
protected
int casa::ExternalAxisWidget::getTickIncrement ( int  tickCount) const
protected
double casa::ExternalAxisWidget::getTickIncrement ( double  tickDistance,
QwtPlot::Axis  axis 
)
protected
double casa::ExternalAxisWidget::getTickStartPixel ( QwtPlot::Axis  axis)
protected
virtual void casa::ExternalAxisWidget::paintEvent ( QPaintEvent *  event)
virtual
void casa::ExternalAxisWidget::print ( QPainter *  painter,
QRect  imageRect 
)
void casa::ExternalAxisWidget::setAxisFont ( const QFont &  font)

Axis font.

void casa::ExternalAxisWidget::setAxisLabel ( const QString &  label)
void casa::ExternalAxisWidget::setAxisScale ( PlotAxisScale  scale,
casacore::uInt  base = 10 
)

Axis scale.

void casa::ExternalAxisWidget::setDateFormat ( const casacore::String newFormat)

Date formats.

void casa::ExternalAxisWidget::setReferenceValue ( bool  on,
double  value 
)
void casa::ExternalAxisWidget::setRelativeDateFormat ( const casacore::String newFormat)

Member Data Documentation

const int casa::ExternalAxisWidget::AXIS_SMALL_SIDE
protected

Definition at line 95 of file ExternalAxisWidget.h.

QFont casa::ExternalAxisWidget::axisFont
private

Definition at line 104 of file ExternalAxisWidget.h.

QString casa::ExternalAxisWidget::axisLabel
protected

Definition at line 87 of file ExternalAxisWidget.h.

bool casa::ExternalAxisWidget::bottomAxisInternal
protected

Definition at line 92 of file ExternalAxisWidget.h.

bool casa::ExternalAxisWidget::leftAxisInternal
protected

Which axis are internal (drawn by the Qwt plot)

Definition at line 91 of file ExternalAxisWidget.h.

const int casa::ExternalAxisWidget::MARGIN
protected

Definition at line 97 of file ExternalAxisWidget.h.

const int casa::ExternalAxisWidget::MIN_START_Y
protected

Definition at line 98 of file ExternalAxisWidget.h.

QwtPlot* casa::ExternalAxisWidget::plot
protected

Definition at line 85 of file ExternalAxisWidget.h.

QwtPlot::Axis casa::ExternalAxisWidget::plotAxis
protected

Definition at line 88 of file ExternalAxisWidget.h.

bool casa::ExternalAxisWidget::rightAxisInternal
protected

Definition at line 93 of file ExternalAxisWidget.h.

QPScaleDraw* casa::ExternalAxisWidget::scaleDraw
protected

Definition at line 86 of file ExternalAxisWidget.h.

const int casa::ExternalAxisWidget::TICK_LENGTH
protected

Definition at line 96 of file ExternalAxisWidget.h.


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