63 for ( ; segmentIt != segmentInfo.
constEnd(); ++segmentIt )
75 QRectF segmentRectTop( segmentIt->
first + xOffset, barTopPosition, segmentIt->second, segmentHeight );
89 QRectF segmentRectBottom( segmentIt->
first + xOffset, barTopPosition + segmentHeight, segmentIt->second, segmentHeight );
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.
QBrush brush2() const
Returns the secondary brush for the scalebar.
static double fontAscentMM(const QFont &font)
Calculate font ascent in millimeters, including workarounds for QT font rendering issues...
void drawRect(const QRectF &rectangle)
void draw(QPainter *p, double xOffset=0) const override
Draws the style.
QBrush brush() const
Returns the primary brush for the scalebar.
void setPen(const QColor &color)
QString name() const override
void setBrush(const QBrush &brush)
double labelBarSpace() const
Abstraction of composer scale bar style.
const QgsComposerScaleBar * mScaleBar
double boxContentSpace() const
QgsDoubleBoxScaleBarStyle(const QgsComposerScaleBar *bar)
~QgsDoubleBoxScaleBarStyle()
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