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.
virtual void drawLabels(QPainter *p) const
void setRenderHint(RenderHint hint, bool on)
double boxContentSpace() 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...
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.
void setPen(const QColor &color)
double labelBarSpace() const
QString name() const override
void setBrush(const QBrush &brush)
Abstraction of composer scale bar style.
QPen pen() const
Returns the pen used for drawing the scalebar.
const QgsComposerScaleBar * mScaleBar
QgsDoubleBoxScaleBarStyle(const QgsComposerScaleBar *bar)
~QgsDoubleBoxScaleBarStyle()
QBrush brush() const
Returns the primary brush for the scalebar.
QBrush brush2() const
Returns the secondary brush for the scalebar.
const_iterator constEnd() const
const_iterator constBegin() const