QgsScaleBarStyle Class Reference

Abstraction of composer scale bar style. More...

#include <qgsscalebarstyle.h>

Inheritance diagram for QgsScaleBarStyle:

Inheritance graph
Collaboration diagram for QgsScaleBarStyle:

Collaboration graph

List of all members.

Public Member Functions

 QgsScaleBarStyle (const QgsComposerScaleBar *bar)
virtual ~QgsScaleBarStyle ()
virtual void draw (QPainter *p, double xOffset=0) const =0
 Draws the style.
virtual void drawLabels (QPainter *p) const
virtual QRectF calculateBoxSize () const
virtual QString name () const =0

Protected Attributes

const QgsComposerScaleBarmScaleBar

Private Member Functions

 QgsScaleBarStyle ()

Detailed Description

Abstraction of composer scale bar style.

Subclasses draw themselves, have the possibility to implement custom labeling and calculate corresponding box size.

Definition at line 30 of file qgsscalebarstyle.h.

Constructor & Destructor Documentation

QgsScaleBarStyle::QgsScaleBarStyle ( const QgsComposerScaleBar bar  ) 

Definition at line 22 of file qgsscalebarstyle.cpp.

QgsScaleBarStyle::~QgsScaleBarStyle (  )  [virtual]

Definition at line 32 of file qgsscalebarstyle.cpp.

QgsScaleBarStyle::QgsScaleBarStyle (  )  [private]

Definition at line 27 of file qgsscalebarstyle.cpp.

Member Function Documentation

virtual void QgsScaleBarStyle::draw ( QPainter *  p,
double  xOffset = 0 
) const [pure virtual]

Draws the style.

p painter object
xOffset offset to account for centered labeling

Implemented in QgsDoubleBoxScaleBarStyle, QgsNumericScaleBarStyle, QgsSingleBoxScaleBarStyle, and QgsTicksScaleBarStyle.

Referenced by QgsComposerScaleBar::paint().

void QgsScaleBarStyle::drawLabels ( QPainter *  p  )  const [virtual]

QRectF QgsScaleBarStyle::calculateBoxSize (  )  const [virtual]

virtual QString QgsScaleBarStyle::name (  )  const [pure virtual]

Member Data Documentation

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

Generated on Sat Feb 4 19:17:51 2012 for Quantum GIS API Documentation by  doxygen 1.5.6