Changeset 9383 in ntrip for trunk/BNC/qwt/qwt_dial_needle.cpp
- Timestamp:
- Mar 19, 2021, 9:15:03 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/qwt/qwt_dial_needle.cpp
r8127 r9383 14 14 #include <qapplication.h> 15 15 #include <qpainter.h> 16 #include <qpainterpath.h> 16 17 17 18 #if QT_VERSION < 0x040601 … … 67 68 } 68 69 69 static void qwtDrawShadedPointer( QPainter *painter, 70 static void qwtDrawShadedPointer( QPainter *painter, 70 71 const QColor &lightColor, const QColor &darkColor, 71 72 double length, double width ) … … 171 172 172 173 QColor color[4]; 173 color[0] = darkColor.light ( 100 + colorOffset );174 color[1] = darkColor.dark ( 100 + colorOffset );175 color[2] = lightColor.light ( 100 + colorOffset );176 color[3] = lightColor.dark ( 100 + colorOffset );174 color[0] = darkColor.lighter( 100 + colorOffset ); 175 color[1] = darkColor.darker( 100 + colorOffset ); 176 color[2] = lightColor.lighter( 100 + colorOffset ); 177 color[3] = lightColor.darker( 100 + colorOffset ); 177 178 178 179 painter->setPen( Qt::NoPen ); … … 223 224 \param colorGroup Color group, used for painting 224 225 */ 225 void QwtDialNeedle::draw( QPainter *painter, 226 const QPointF ¢er, double length, double direction, 226 void QwtDialNeedle::draw( QPainter *painter, 227 const QPointF ¢er, double length, double direction, 227 228 QPalette::ColorGroup colorGroup ) const 228 229 { … … 316 317 \param colorGroup Color group, used for painting 317 318 */ 318 void QwtDialSimpleNeedle::drawNeedle( QPainter *painter, 319 void QwtDialSimpleNeedle::drawNeedle( QPainter *painter, 319 320 double length, QPalette::ColorGroup colorGroup ) const 320 321 { … … 327 328 width = qMax(length * 0.06, 6.0); 328 329 329 qwtDrawArrowNeedle( painter, 330 qwtDrawArrowNeedle( painter, 330 331 palette(), colorGroup, length, width ); 331 332 … … 336 337 if ( width <= 0.0 ) 337 338 width = 5.0; 338 339 339 340 QPen pen ( palette().brush( colorGroup, QPalette::Mid ), width ); 340 341 pen.setCapStyle( Qt::FlatCap ); 341 342 342 343 painter->setPen( pen ); 343 344 painter->drawLine( QPointF( 0.0, 0.0 ), QPointF( length, 0.0 ) ); … … 373 374 \param colorGroup Color group, used for painting 374 375 */ 375 void QwtCompassMagnetNeedle::drawNeedle( QPainter *painter, 376 void QwtCompassMagnetNeedle::drawNeedle( QPainter *painter, 376 377 double length, QPalette::ColorGroup colorGroup ) const 377 378 { … … 386 387 387 388 qwtDrawShadedPointer( painter, 388 dark.light ( 100 + colorOffset ),389 dark.dark ( 100 + colorOffset ),389 dark.lighter( 100 + colorOffset ), 390 dark.darker( 100 + colorOffset ), 390 391 length, width ); 391 392 392 393 painter->rotate( 180.0 ); 393 394 394 395 qwtDrawShadedPointer( painter, 395 light.light ( 100 + colorOffset ),396 light.dark ( 100 + colorOffset ),396 light.lighter( 100 + colorOffset ), 397 light.darker( 100 + colorOffset ), 397 398 length, width ); 398 399 399 400 const QBrush baseBrush = palette().brush( colorGroup, QPalette::Base ); 400 401 drawKnob( painter, width, baseBrush, true ); … … 431 432 \param colorGroup Color group, used for painting 432 433 */ 433 void QwtCompassWindArrow::drawNeedle( QPainter *painter, 434 void QwtCompassWindArrow::drawNeedle( QPainter *painter, 434 435 double length, QPalette::ColorGroup colorGroup ) const 435 436 {
Note:
See TracChangeset
for help on using the changeset viewer.