luminancerange_widget.cpp (pfstools-2.1.0.tgz) | : | luminancerange_widget.cpp (pfstools-2.2.0.tgz) | ||
---|---|---|---|---|
skipping to change at line 135 | skipping to change at line 135 | |||
} | } | |||
// Paint scale | // Paint scale | |||
QFont labelFont( "SansSerif", 8 ); | QFont labelFont( "SansSerif", 8 ); | |||
p.setFont( labelFont ); | p.setFont( labelFont ); | |||
p.setPen( Qt::black ); | p.setPen( Qt::black ); | |||
QRect textBounding = p.boundingRect( fRect, Qt::AlignHCenter|Qt::AlignBottom, "-8" ); | QRect textBounding = p.boundingRect( fRect, Qt::AlignHCenter|Qt::AlignBottom, "-8" ); | |||
for( float x = ceil( minValue ); x <= floor( maxValue ); x++ ) { | for( float x = ceil( minValue ); x <= floor( maxValue ); x++ ) { | |||
int rx = getWindowX(x); | int rx = getWindowX(x); | |||
p.drawLine( rx, fRect.top(), rx, textBounding.top() ); | p.drawLine( rx, fRect.top(), rx, textBounding.top() ); | |||
char str[10]; | char str[14]; | |||
sprintf( str, "%g", x ); | sprintf( str, "%g", x ); | |||
p.drawText( rx-20, textBounding.top(), 40, textBounding.height(), | p.drawText( rx-20, textBounding.top(), 40, textBounding.height(), | |||
Qt::AlignHCenter|Qt::AlignBottom, str ); | Qt::AlignHCenter|Qt::AlignBottom, str ); | |||
} | } | |||
// Paint value pointer | // Paint value pointer | |||
if( showVP ) | if( showVP ) | |||
{ | { | |||
int x = getWindowX( valuePointer ); | int x = getWindowX( valuePointer ); | |||
if( fRect.contains( x, fRect.y() ) ) { | if( fRect.contains( x, fRect.y() ) ) { | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added |