39   switch ( mTickPosition )
    42       return "Line Ticks Up";
    44       return "Line Ticks Down";
    46       return "Line Ticks Middle";
    70   for ( ; segmentIt != segmentInfo.
constEnd(); ++segmentIt )
    79     double verticalPos = 0.0;
    80     switch ( mTickPosition )
    83         verticalPos = barTopPosition;
    86         verticalPos = middlePosition;
    89         verticalPos = bottomPosition;
    93     p->
drawLine( 
QLineF( xOffset + segmentInfo.
at( 0 ).first, verticalPos, lastTickPositionX, verticalPos ) );
 A scale bar item that can be added to a map composition. 
 
void setRenderHint(RenderHint hint, bool on)
 
QPen pen() const
Returns the pen used for drawing the scalebar. 
 
void draw(QPainter *p, double xOffset=0) const override
Draw method. 
 
const T & at(int i) const
 
static double fontAscentMM(const QFont &font)
Calculate font ascent in millimeters, including workarounds for QT font rendering issues...
 
void drawLine(const QLineF &line)
 
void setPen(const QColor &color)
 
QString name() const override
 
double labelBarSpace() const
 
Abstraction of composer scale bar style. 
 
QgsTicksScaleBarStyle(const QgsComposerScaleBar *bar)
 
const QgsComposerScaleBar * mScaleBar
 
double segmentMillimeters() const
 
double boxContentSpace() const
 
const_iterator constEnd() const
 
void segmentPositions(QList< QPair< double, double > > &posWidthList) const
Returns the x - positions of the segment borders (in item coordinates) and the width of the segment...
 
const_iterator constBegin() const
 
virtual void drawLabels(QPainter *p) const