QGIS API Documentation
2.2.0-Valmiera
|
A scale bar that draws segments using short ticks. More...
#include <qgsticksscalebarstyle.h>
Public Types | |
enum | TickPosition { TicksUp, TicksDown, TicksMiddle } |
Public Member Functions | |
QgsTicksScaleBarStyle (const QgsComposerScaleBar *bar) | |
~QgsTicksScaleBarStyle () | |
QString | name () const |
void | draw (QPainter *p, double xOffset=0) const |
void | setTickPosition (TickPosition p) |
Public Member Functions inherited from QgsScaleBarStyle | |
QgsScaleBarStyle (const QgsComposerScaleBar *bar) | |
virtual | ~QgsScaleBarStyle () |
virtual void | drawLabels (QPainter *p) const |
virtual QRectF | calculateBoxSize () const |
Private Member Functions | |
QgsTicksScaleBarStyle () |
Private Attributes | |
TickPosition | mTickPosition |
Additional Inherited Members | |
Protected Attributes inherited from QgsScaleBarStyle | |
const QgsComposerScaleBar * | mScaleBar |
A scale bar that draws segments using short ticks.
Definition at line 25 of file qgsticksscalebarstyle.h.
Definition at line 28 of file qgsticksscalebarstyle.h.
QgsTicksScaleBarStyle::QgsTicksScaleBarStyle | ( | const QgsComposerScaleBar * | bar | ) |
Definition at line 21 of file qgsticksscalebarstyle.cpp.
References mTickPosition, and TicksMiddle.
QgsTicksScaleBarStyle::~QgsTicksScaleBarStyle | ( | ) |
Definition at line 31 of file qgsticksscalebarstyle.cpp.
|
private |
Definition at line 26 of file qgsticksscalebarstyle.cpp.
References mTickPosition, and TicksMiddle.
|
virtual |
draw method
p | painter object |
xOffset | offset |
Implements QgsScaleBarStyle.
Definition at line 50 of file qgsticksscalebarstyle.cpp.
References QgsComposerScaleBar::boxContentSpace(), QgsScaleBarStyle::drawLabels(), QgsComposerScaleBar::font(), QgsComposerItem::fontAscentMillimeters(), QgsComposerScaleBar::height(), QgsComposerScaleBar::labelBarSpace(), QgsScaleBarStyle::mScaleBar, mTickPosition, QgsComposerScaleBar::pen(), QgsComposerScaleBar::segmentMillimeters(), QgsComposerScaleBar::segmentPositions(), TicksDown, TicksMiddle, and TicksUp.
|
virtual |
Implements QgsScaleBarStyle.
Definition at line 36 of file qgsticksscalebarstyle.cpp.
References mTickPosition, TicksDown, TicksMiddle, and TicksUp.
|
inline |
Definition at line 46 of file qgsticksscalebarstyle.h.
Referenced by QgsComposerScaleBar::setStyle().
|
private |
Definition at line 51 of file qgsticksscalebarstyle.h.
Referenced by draw(), name(), and QgsTicksScaleBarStyle().