59 double penWidth =
mScaleBar->QgsComposerItem::pen().widthF() / 2.0;
62 Qt::AlignmentFlag hAlign;
66 hAlign = Qt::AlignLeft;
69 hAlign = Qt::AlignHCenter;
72 hAlign = Qt::AlignRight;
75 hAlign = Qt::AlignLeft;
80 QRectF painterRect( penWidth + margin, penWidth + margin,
mScaleBar->rect().width() - 2 * penWidth - 2 * margin,
mScaleBar->rect().
height() - 2 * penWidth - 2 * margin );
112 QString scaleBarText;
116 double scaleDenominator = 1;
120 scaleDenominator = composerMap->
scale();
121 scaleBarText =
"1:" + QString(
"%L1" ).arg( scaleDenominator, 0,
'f', 0 );
123 scaleBarText =
"1:" + QString(
"%L1" ).arg( scaleDenominator, 0,
'f', 0 );