Changeset 9383 in ntrip for trunk/BNC/qwt/qwt_thermo.cpp


Ignore:
Timestamp:
Mar 19, 2021, 9:15:03 AM (3 years ago)
Author:
stoecker
Message:

update to qwt verion 6.1.1 to fix build with newer Qt5

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/qwt/qwt_thermo.cpp

    r8127 r9383  
    2020#include <qmath.h>
    2121
    22 static inline void qwtDrawLine( QPainter *painter, int pos, 
     22static inline void qwtDrawLine( QPainter *painter, int pos,
    2323    const QColor &color, const QRect &pipeRect, const QRect &liquidRect,
    2424    Qt::Orientation orientation )
     
    5959            if ( v > lowerLimit && v < upperLimit )
    6060                values += v;
    61         }       
    62     }   
     61        }
     62    }
    6363
    6464    values += upperLimit;
    65    
     65
    6666    return values;
    6767}
     
    249249
    250250    const QBrush brush = palette().brush( QPalette::Base );
    251     qDrawShadePanel( &painter, 
     251    qDrawShadePanel( &painter,
    252252        tRect.adjusted( -bw, -bw, bw, bw ),
    253         palette(), true, bw, 
     253        palette(), true, bw,
    254254        d_data->autoFillPipe ? &brush : NULL );
    255255
     
    257257}
    258258
    259 /*! 
     259/*!
    260260  Resize event handler
    261261  \param event Resize event
     
    267267}
    268268
    269 /*! 
     269/*!
    270270  Qt change event handler
    271271  \param event Event
     
    411411        if ( d_data->scalePosition == QwtThermo::LeadingScale )
    412412            pipeRect.setLeft( bw );
    413         else 
     413        else
    414414            pipeRect.setLeft( cr.left() + cr.width() - bw - d_data->pipeWidth );
    415415
     
    540540   \param pipeRect Bounding rectangle of the pipe without borders
    541541*/
    542 void QwtThermo::drawLiquid( 
     542void QwtThermo::drawLiquid(
    543543    QPainter *painter, const QRect &pipeRect ) const
    544544{
     
    582582                const double v = scaleMap.invTransform( pos );
    583583
    584                 qwtDrawLine( painter, pos, 
     584                qwtDrawLine( painter, pos,
    585585                    d_data->colorMap->color( interval, v ),
    586586                    pipeRect, liquidRect, d_data->orientation );
     
    708708/*!
    709709  \brief Change the brush of the liquid.
    710  
     710
    711711  Changes the QPalette::ButtonText brush of the palette.
    712712
    713   \param brush New brush. 
     713  \param brush New brush.
    714714  \sa fillBrush(), QWidget::setPalette()
    715715*/
     
    722722
    723723/*!
    724   \return Liquid ( QPalette::ButtonText ) brush. 
     724  \return Liquid ( QPalette::ButtonText ) brush.
    725725  \sa setFillBrush(), QWidget::palette()
    726726*/
     
    735735  Changes the QPalette::Highlight brush of the palette.
    736736
    737   \param brush New brush. 
     737  \param brush New brush.
    738738  \sa alarmBrush(), QWidget::setPalette()
    739739
     
    825825}
    826826
    827 /*! 
     827/*!
    828828  \return True, when the alarm threshold is enabled.
    829829
     
    894894QRect QwtThermo::fillRect( const QRect &pipeRect ) const
    895895{
    896     double origin;       
     896    double origin;
    897897    if ( d_data->originMode == OriginMinimum )
    898898    {
     
    915915    if ( to < from )
    916916        qSwap( from, to );
    917    
     917
    918918    QRect fillRect = pipeRect;
    919919    if ( d_data->orientation == Qt::Horizontal )
     
    947947
    948948    const bool inverted = ( upperBound() < lowerBound() );
    949    
     949
    950950    bool increasing;
    951951    if ( d_data->originMode == OriginCustom )
     
    961961    const int alarmPos = qRound( map.transform( d_data->alarmLevel ) );
    962962    const int valuePos = qRound( map.transform( d_data->value ) );
    963    
     963
    964964    if ( d_data->orientation == Qt::Horizontal )
    965965    {
     
    10031003
    10041004    return alarmRect;
    1005 } 
     1005}
Note: See TracChangeset for help on using the changeset viewer.