#include <qgsnumericscalebarstyle.h>
Public Member Functions | |
QgsNumericScaleBarStyle (QgsComposerScaleBar *bar) | |
~QgsNumericScaleBarStyle () | |
QString | name () const |
void | draw (QPainter *p, double xOffset=0) const |
Draws the style. | |
QRectF | calculateBoxSize () const |
Private Member Functions | |
QgsNumericScaleBarStyle () | |
QString | scaleText () const |
Returns the text for the scale bar or an empty string in case of error. |
Definition at line 25 of file qgsnumericscalebarstyle.h.
QgsNumericScaleBarStyle::QgsNumericScaleBarStyle | ( | QgsComposerScaleBar * | bar | ) |
Definition at line 23 of file qgsnumericscalebarstyle.cpp.
QgsNumericScaleBarStyle::~QgsNumericScaleBarStyle | ( | ) |
Definition at line 33 of file qgsnumericscalebarstyle.cpp.
QgsNumericScaleBarStyle::QgsNumericScaleBarStyle | ( | ) | [private] |
Definition at line 28 of file qgsnumericscalebarstyle.cpp.
QString QgsNumericScaleBarStyle::name | ( | ) | const [virtual] |
void QgsNumericScaleBarStyle::draw | ( | QPainter * | p, | |
double | xOffset = 0 | |||
) | const [virtual] |
Draws the style.
p | painter object | |
xOffset | offset to account for centered labeling |
Implements QgsScaleBarStyle.
Definition at line 43 of file qgsnumericscalebarstyle.cpp.
References QgsComposerScaleBar::boxContentSpace(), QgsComposerItem::drawText(), QgsComposerScaleBar::font(), QgsComposerItem::fontAscentMillimeters(), QgsScaleBarStyle::mScaleBar, QgsComposerScaleBar::pen(), and scaleText().
QRectF QgsNumericScaleBarStyle::calculateBoxSize | ( | ) | const [virtual] |
Reimplemented from QgsScaleBarStyle.
Definition at line 58 of file qgsnumericscalebarstyle.cpp.
References QgsComposerScaleBar::boxContentSpace(), QgsComposerScaleBar::font(), QgsComposerItem::fontAscentMillimeters(), QgsScaleBarStyle::mScaleBar, QgsComposerScaleBar::pen(), scaleText(), and QgsComposerItem::textWidthMillimeters().
QString QgsNumericScaleBarStyle::scaleText | ( | ) | const [private] |
Returns the text for the scale bar or an empty string in case of error.
Definition at line 74 of file qgsnumericscalebarstyle.cpp.
References QgsComposerScaleBar::composerMap(), QgsScaleBarStyle::mScaleBar, and QgsComposerMap::scale().
Referenced by calculateBoxSize(), and draw().