39 switch ( mTickPosition )
42 return "Line Ticks Up";
44 return "Line Ticks Down";
46 return "Line Ticks Middle";
63 p->setRenderHint( QPainter::Antialiasing,
true );
66 QList<QPair<double, double> > segmentInfo;
69 QList<QPair<double, double> >::const_iterator segmentIt = segmentInfo.constBegin();
70 for ( ; segmentIt != segmentInfo.constEnd(); ++segmentIt )
72 p->drawLine( QLineF( segmentIt->first + xOffset, barTopPosition, segmentIt->first + xOffset, barTopPosition +
mScaleBar->
height() ) );
76 if ( !segmentInfo.isEmpty() )
80 switch ( mTickPosition )
83 verticalPos = barTopPosition;
86 verticalPos = middlePosition;
89 verticalPos = bottomPosition;
93 p->drawLine( QLineF( xOffset + segmentInfo.at( 0 ).first, verticalPos, lastTickPositionX, verticalPos ) );
95 p->drawLine( QLineF( lastTickPositionX, barTopPosition, lastTickPositionX, barTopPosition +
mScaleBar->
height() ) );