Changeset 9383 in ntrip for trunk/BNC/qwt/qwt_slider.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_slider.cpp

    r8127 r9383  
    2121#include <qapplication.h>
    2222
    23 static QSize qwtHandleSize( const QSize &size, 
     23static QSize qwtHandleSize( const QSize &size,
    2424    Qt::Orientation orientation, bool hasTrough )
    2525{
     
    4242}
    4343
    44 static QwtScaleDraw::Alignment qwtScaleDrawAlignment( 
     44static QwtScaleDraw::Alignment qwtScaleDrawAlignment(
    4545    Qt::Orientation orientation, QwtSlider::ScalePosition scalePos )
    4646{
     
    108108/*!
    109109  Construct vertical slider in QwtSlider::Trough style
    110   with a scale to the left. 
     110  with a scale to the left.
    111111
    112112  The scale is initialized to [0.0, 100.0] and the value set to 0.0.
     
    131131
    132132  \param parent Parent widget
    133   \param orientation Orientation of the slider. 
     133  \param orientation Orientation of the slider.
    134134*/
    135135QwtSlider::QwtSlider( Qt::Orientation orientation, QWidget *parent ):
     
    158158    d_data->orientation = orientation;
    159159
    160     scaleDraw()->setAlignment( 
     160    scaleDraw()->setAlignment(
    161161        qwtScaleDrawAlignment( orientation, d_data->scalePosition ) );
    162162    scaleDraw()->setLength( 100 );
     
    179179    d_data->orientation = orientation;
    180180
    181     scaleDraw()->setAlignment( 
     181    scaleDraw()->setAlignment(
    182182        qwtScaleDrawAlignment( orientation, d_data->scalePosition ) );
    183183
     
    216216
    217217    d_data->scalePosition = scalePosition;
    218     scaleDraw()->setAlignment( 
     218    scaleDraw()->setAlignment(
    219219        qwtScaleDrawAlignment( d_data->orientation, scalePosition ) );
    220220
     
    223223}
    224224
    225 /*! 
     225/*!
    226226  \return Position of the scale
    227227  \sa setScalePosition()
     
    412412   \param sliderRect Bounding rectangle of the slider
    413413*/
    414 void QwtSlider::drawSlider( 
     414void QwtSlider::drawSlider(
    415415    QPainter *painter, const QRect &sliderRect ) const
    416416{
     
    434434        const int slotMargin = 4;
    435435
    436         QRect slotRect; 
     436        QRect slotRect;
    437437        if ( orientation() == Qt::Horizontal )
    438438        {
     
    470470  \param pos Position of the handle marker in widget coordinates
    471471*/
    472 void QwtSlider::drawHandle( QPainter *painter, 
     472void QwtSlider::drawHandle( QPainter *painter,
    473473    const QRect &handleRect, int pos ) const
    474474{
    475475    const int bw = d_data->borderWidth;
    476476
    477     qDrawShadePanel( painter, 
     477    qDrawShadePanel( painter,
    478478        handleRect, palette(), false, bw,
    479479        &palette().brush( QPalette::Button ) );
     
    497497  \param pos Mouse position
    498498
    499   \retval True, when handleRect() contains pos 
     499  \retval True, when handleRect() contains pos
    500500  \sa scrolledTo()
    501501*/
     
    504504    if ( handleRect().contains( pos ) )
    505505    {
    506         const double v = ( orientation() == Qt::Horizontal ) 
     506        const double v = ( orientation() == Qt::Horizontal )
    507507            ? pos.x() : pos.y();
    508508
     
    525525double QwtSlider::scrolledTo( const QPoint &pos ) const
    526526{
    527     int p = ( orientation() == Qt::Horizontal ) 
     527    int p = ( orientation() == Qt::Horizontal )
    528528        ? pos.x() : pos.y();
    529529
     
    629629
    630630   \param event Mouse event
    631 */ 
     631*/
    632632void QwtSlider::timerEvent( QTimerEvent *event )
    633633{
     
    663663        killTimer( d_data->repeatTimerId );
    664664        d_data->repeatTimerId = startTimer( updateInterval() );
    665        
     665
    666666        d_data->timerTick = true;
    667     }   
     667    }
    668668}
    669669
     
    710710void QwtSlider::changeEvent( QEvent *event )
    711711{
    712     if ( event->type() == QEvent::StyleChange || 
     712    if ( event->type() == QEvent::StyleChange ||
    713713        event->type() == QEvent::FontChange )
    714714    {
     
    740740    /*
    741741       The marker line of the handle needs to be aligned to
    742        the scale. But the marker is in the center 
     742       the scale. But the marker is in the center
    743743       and we need space enough to display the rest of the handle.
    744744
     
    878878    {
    879879        d_data->hasGroove = on;
    880        
     880
    881881        if ( testAttribute( Qt::WA_WState_Polished ) )
    882882            layoutSlider( true );
     
    891891{
    892892    return d_data->hasGroove;
    893 } 
     893}
    894894
    895895/*!
     
    918918        bw = d_data->borderWidth;
    919919
    920     int sliderLength = 0; 
     920    int sliderLength = 0;
    921921    int scaleExtent = 0;
    922922
Note: See TracChangeset for help on using the changeset viewer.