|
QGIS API Documentation
2.6.0-Brighton
|
Abstraction of composer scale bar style. More...
#include <qgsscalebarstyle.h>

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 QgsComposerScaleBar * | mScaleBar |
Abstraction of composer scale bar style.
Subclasses draw themselves, have the possibility to implement custom labeling and calculate corresponding box size.
| QgsScaleBarStyle::QgsScaleBarStyle | ( | const QgsComposerScaleBar * | bar | ) |
|
virtual |
|
virtual |
Reimplemented in QgsNumericScaleBarStyle.
|
pure virtual |
Draws the style.
| p | painter object |
| xOffset | offset to account for centered labeling |
Implemented in QgsTicksScaleBarStyle, QgsSingleBoxScaleBarStyle, QgsDoubleBoxScaleBarStyle, and QgsNumericScaleBarStyle.
|
virtual |
|
pure virtual |
Implemented in QgsTicksScaleBarStyle, QgsSingleBoxScaleBarStyle, QgsDoubleBoxScaleBarStyle, and QgsNumericScaleBarStyle.
|
protected |
1.8.1.2