QGIS API Documentation
2.18.21-Las Palmas (9fba24a)
|
Abstraction of composer scale bar style. More...
#include <qgsscalebarstyle.h>
Public Member Functions | |
QgsScaleBarStyle (const QgsComposerScaleBar *bar) | |
virtual | ~QgsScaleBarStyle () |
virtual QRectF | calculateBoxSize () const |
virtual void | draw (QPainter *p, double xOffset=0) const =0 |
Draws the style. More... | |
virtual void | drawLabels (QPainter *p) 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.
Definition at line 30 of file qgsscalebarstyle.h.
QgsScaleBarStyle::QgsScaleBarStyle | ( | const QgsComposerScaleBar * | bar | ) |
Definition at line 23 of file qgsscalebarstyle.cpp.
|
virtual |
Definition at line 33 of file qgsscalebarstyle.cpp.
|
virtual |
Reimplemented in QgsNumericScaleBarStyle.
Definition at line 105 of file qgsscalebarstyle.cpp.
|
pure virtual |
Draws the style.
p | painter object |
xOffset | offset to account for centered labeling |
Implemented in QgsTicksScaleBarStyle, QgsSingleBoxScaleBarStyle, QgsDoubleBoxScaleBarStyle, and QgsNumericScaleBarStyle.
|
virtual |
Definition at line 38 of file qgsscalebarstyle.cpp.
|
pure virtual |
Implemented in QgsTicksScaleBarStyle, QgsSingleBoxScaleBarStyle, QgsDoubleBoxScaleBarStyle, and QgsNumericScaleBarStyle.
|
protected |
Definition at line 48 of file qgsscalebarstyle.h.