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

Common code for drawing a horizontal axis external to the plot. More...

#include <ExternalAxisWidgetHorizontal.h>

Inheritance diagram for casa::ExternalAxisWidgetHorizontal:
casa::ExternalAxisWidget casa::ExternalAxisWidgetBottom casa::ExternalAxisWidgetTop

Public Member Functions

 ExternalAxisWidgetHorizontal (QWidget *parent, QwtPlot *plot, bool leftAxisInternal, bool bottomAxisInternal, bool rightAxisInternal)
 
virtual ~ExternalAxisWidgetHorizontal ()
 
- Public Member Functions inherited from casa::ExternalAxisWidget
 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 int getStartX () const
 Return the x pixel coordinate for the start of the axis. More...
 
virtual int getEndX () const
 Return the x pixel coordinate for the end of the axis. More...
 
virtual int getAxisLength () const
 Return the length of the axis in pixels. More...
 
virtual void drawTicks (QPainter *painter, int tickLength)
 Draw tick marks on the axis of the specified length. More...
 
virtual void drawTick (QPainter *painter, double xPixel, double value, int tickLength)=0
 
- Protected Member Functions inherited from casa::ExternalAxisWidget
virtual void defineAxis (QLine &axisLine)=0
 
virtual void drawAxisLabel (QPainter *painter)=0
 
virtual int getCanvasHeight () const
 
virtual int getCanvasWidth () const
 
virtual int getStartY () 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
 

Additional Inherited Members

- Protected Attributes inherited from casa::ExternalAxisWidget
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
 

Detailed Description

Common code for drawing a horizontal axis external to the plot.

Definition at line 37 of file ExternalAxisWidgetHorizontal.h.

Constructor & Destructor Documentation

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

Member Function Documentation

virtual void casa::ExternalAxisWidgetHorizontal::drawTick ( QPainter *  painter,
double  xPixel,
double  value,
int  tickLength 
)
protectedpure virtual
virtual void casa::ExternalAxisWidgetHorizontal::drawTicks ( QPainter *  painter,
int  tickLength 
)
protectedvirtual

Draw tick marks on the axis of the specified length.

Implements casa::ExternalAxisWidget.

virtual int casa::ExternalAxisWidgetHorizontal::getAxisLength ( ) const
protectedvirtual

Return the length of the axis in pixels.

Implements casa::ExternalAxisWidget.

virtual int casa::ExternalAxisWidgetHorizontal::getEndX ( ) const
protectedvirtual

Return the x pixel coordinate for the end of the axis.

virtual int casa::ExternalAxisWidgetHorizontal::getStartX ( ) const
protectedvirtual

Return the x pixel coordinate for the start of the axis.

Reimplemented from casa::ExternalAxisWidget.


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