Quantum GIS API Documentation  1.8
Public Member Functions | Protected Attributes | Private Member Functions
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

Definition at line 22 of file qgsscalebarstyle.cpp.

Definition at line 32 of file qgsscalebarstyle.cpp.

Definition at line 27 of file qgsscalebarstyle.cpp.

Member Function Documentation

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

Draws the style.

ppainter object
xOffsetoffset to account for centered labeling

Implemented in QgsTicksScaleBarStyle, QgsSingleBoxScaleBarStyle, QgsDoubleBoxScaleBarStyle, and QgsNumericScaleBarStyle.

Referenced by QgsComposerScaleBar::paint().

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

Member Data Documentation

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines