Changeset 9383 in ntrip for trunk/BNC/qwt/qwt_thermo.cpp
- Timestamp:
- Mar 19, 2021, 9:15:03 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/qwt/qwt_thermo.cpp
r8127 r9383 20 20 #include <qmath.h> 21 21 22 static inline void qwtDrawLine( QPainter *painter, int pos, 22 static inline void qwtDrawLine( QPainter *painter, int pos, 23 23 const QColor &color, const QRect &pipeRect, const QRect &liquidRect, 24 24 Qt::Orientation orientation ) … … 59 59 if ( v > lowerLimit && v < upperLimit ) 60 60 values += v; 61 } 62 } 61 } 62 } 63 63 64 64 values += upperLimit; 65 65 66 66 return values; 67 67 } … … 249 249 250 250 const QBrush brush = palette().brush( QPalette::Base ); 251 qDrawShadePanel( &painter, 251 qDrawShadePanel( &painter, 252 252 tRect.adjusted( -bw, -bw, bw, bw ), 253 palette(), true, bw, 253 palette(), true, bw, 254 254 d_data->autoFillPipe ? &brush : NULL ); 255 255 … … 257 257 } 258 258 259 /*! 259 /*! 260 260 Resize event handler 261 261 \param event Resize event … … 267 267 } 268 268 269 /*! 269 /*! 270 270 Qt change event handler 271 271 \param event Event … … 411 411 if ( d_data->scalePosition == QwtThermo::LeadingScale ) 412 412 pipeRect.setLeft( bw ); 413 else 413 else 414 414 pipeRect.setLeft( cr.left() + cr.width() - bw - d_data->pipeWidth ); 415 415 … … 540 540 \param pipeRect Bounding rectangle of the pipe without borders 541 541 */ 542 void QwtThermo::drawLiquid( 542 void QwtThermo::drawLiquid( 543 543 QPainter *painter, const QRect &pipeRect ) const 544 544 { … … 582 582 const double v = scaleMap.invTransform( pos ); 583 583 584 qwtDrawLine( painter, pos, 584 qwtDrawLine( painter, pos, 585 585 d_data->colorMap->color( interval, v ), 586 586 pipeRect, liquidRect, d_data->orientation ); … … 708 708 /*! 709 709 \brief Change the brush of the liquid. 710 710 711 711 Changes the QPalette::ButtonText brush of the palette. 712 712 713 \param brush New brush. 713 \param brush New brush. 714 714 \sa fillBrush(), QWidget::setPalette() 715 715 */ … … 722 722 723 723 /*! 724 \return Liquid ( QPalette::ButtonText ) brush. 724 \return Liquid ( QPalette::ButtonText ) brush. 725 725 \sa setFillBrush(), QWidget::palette() 726 726 */ … … 735 735 Changes the QPalette::Highlight brush of the palette. 736 736 737 \param brush New brush. 737 \param brush New brush. 738 738 \sa alarmBrush(), QWidget::setPalette() 739 739 … … 825 825 } 826 826 827 /*! 827 /*! 828 828 \return True, when the alarm threshold is enabled. 829 829 … … 894 894 QRect QwtThermo::fillRect( const QRect &pipeRect ) const 895 895 { 896 double origin; 896 double origin; 897 897 if ( d_data->originMode == OriginMinimum ) 898 898 { … … 915 915 if ( to < from ) 916 916 qSwap( from, to ); 917 917 918 918 QRect fillRect = pipeRect; 919 919 if ( d_data->orientation == Qt::Horizontal ) … … 947 947 948 948 const bool inverted = ( upperBound() < lowerBound() ); 949 949 950 950 bool increasing; 951 951 if ( d_data->originMode == OriginCustom ) … … 961 961 const int alarmPos = qRound( map.transform( d_data->alarmLevel ) ); 962 962 const int valuePos = qRound( map.transform( d_data->value ) ); 963 963 964 964 if ( d_data->orientation == Qt::Horizontal ) 965 965 { … … 1003 1003 1004 1004 return alarmRect; 1005 } 1005 }
Note:
See TracChangeset
for help on using the changeset viewer.