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

    r8127 r9383  
    5555        wrapping( false )
    5656    {
    57     };
     57    }
    5858
    5959    Qt::Orientation orientation;
     
    114114  \brief En/Disable tracking
    115115
    116   If tracking is enabled (the default), the wheel emits the valueChanged() 
    117   signal while the wheel is moving. If tracking is disabled, the wheel 
     116  If tracking is enabled (the default), the wheel emits the valueChanged()
     117  signal while the wheel is moving. If tracking is disabled, the wheel
    118118  emits the valueChanged() signal only when the wheel movement is terminated.
    119119
     
    162162   \brief Mouse press event handler
    163163
    164    Start movement of the wheel. 
     164   Start movement of the wheel.
    165165
    166166   \param event Mouse event
     
    209209        d_data->speed = ( mouseValue - d_data->mouseValue ) / ms;
    210210    }
    211    
    212     d_data->mouseValue = mouseValue; 
     211
     212    d_data->mouseValue = mouseValue;
    213213
    214214    double value = boundedValue( mouseValue - d_data->mouseOffset );
    215215    if ( d_data->stepAlignment )
    216216        value = alignedValue( value );
    217        
     217
    218218    if ( value != d_data->value )
    219219    {
     
    238238
    239239   \param event Mouse event
    240 */ 
     240*/
    241241
    242242void QwtWheel::mouseReleaseEvent( QMouseEvent *event )
     
    260260    if ( startFlying )
    261261    {
    262         d_data->flyingValue = 
     262        d_data->flyingValue =
    263263            boundedValue( d_data->mouseValue - d_data->mouseOffset );
    264264
     
    281281
    282282  The flying wheel effect is implemented using a timer
    283    
     283
    284284  \param event Timer event
    285285
     
    323323  \brief Handle wheel events
    324324
    325   In/Decrement the value 
     325  In/Decrement the value
    326326
    327327  \param event Wheel event
     
    342342    double increment = 0.0;
    343343
    344     if ( ( event->modifiers() & Qt::ControlModifier) || 
     344    if ( ( event->modifiers() & Qt::ControlModifier) ||
    345345        ( event->modifiers() & Qt::ShiftModifier ) )
    346346    {
     
    384384
    385385  - Qt::Key_Up\n
    386     In case of a horizontal or not inverted vertical wheel the value 
     386    In case of a horizontal or not inverted vertical wheel the value
    387387    will be incremented by the step size. For an inverted vertical wheel
    388388    the value will be decremented by the step size.
    389389
    390390  - Qt::Key_Down\n
    391     In case of a horizontal or not inverted vertical wheel the value 
     391    In case of a horizontal or not inverted vertical wheel the value
    392392    will be decremented by the step size. For an inverted vertical wheel
    393393    the value will be incremented by the step size.
     
    482482    if ( event->isAccepted() )
    483483        stopFlying();
    484    
     484
    485485    if ( increment != 0.0 )
    486486    {
     
    552552
    553553/*!
    554    \return Wheel border width 
     554   \return Wheel border width
    555555   \sa setWheelBorderWidth()
    556556*/
     
    561561
    562562/*!
    563   \brief Set the border width 
     563  \brief Set the border width
    564564
    565565  The border defaults to 2.
     
    575575
    576576/*!
    577    \return Border width 
     577   \return Border width
    578578   \sa setBorderWidth()
    579579*/
     
    683683}
    684684
    685 /*! 
     685/*!
    686686  Determine the value corresponding to a specified point
    687687
     
    724724}
    725725
    726 /*! 
     726/*!
    727727   \brief Qt Paint Event
    728728   \param event Paint event
     
    737737    style()->drawPrimitive(QStyle::PE_Widget, &opt, &painter, this);
    738738
    739     qDrawShadePanel( &painter, 
     739    qDrawShadePanel( &painter,
    740740        contentsRect(), palette(), true, d_data->borderWidth );
    741741
     
    753753   \param rect Geometry for the wheel
    754754*/
    755 void QwtWheel::drawWheelBackground( 
     755void QwtWheel::drawWheelBackground(
    756756    QPainter *painter, const QRectF &rect )
    757757{
     
    761761
    762762    //  draw shaded background
    763     QLinearGradient gradient( rect.topLeft(), 
     763    QLinearGradient gradient( rect.topLeft(),
    764764        ( d_data->orientation == Qt::Horizontal ) ? rect.topRight() : rect.bottomLeft() );
    765765    gradient.setColorAt( 0.0, pal.color( QPalette::Button ) );
     
    772772    // draw internal border
    773773
    774     const QPen lightPen( palette().color( QPalette::Light ), 
     774    const QPen lightPen( palette().color( QPalette::Light ),
    775775        d_data->wheelBorderWidth, Qt::SolidLine, Qt::FlatCap );
    776     const QPen darkPen( pal.color( QPalette::Dark ), 
     776    const QPen darkPen( pal.color( QPalette::Dark ),
    777777        d_data->wheelBorderWidth, Qt::SolidLine, Qt::FlatCap );
    778778
     
    782782    {
    783783        painter->setPen( lightPen );
    784         painter->drawLine( QPointF( rect.left(), rect.top() + bw2 ), 
     784        painter->drawLine( QPointF( rect.left(), rect.top() + bw2 ),
    785785            QPointF( rect.right(), rect.top() + bw2 ) );
    786786
    787787        painter->setPen( darkPen );
    788         painter->drawLine( QPointF( rect.left(), rect.bottom() - bw2 ), 
     788        painter->drawLine( QPointF( rect.left(), rect.bottom() - bw2 ),
    789789            QPointF( rect.right(), rect.bottom() - bw2 ) );
    790790    }
     
    792792    {
    793793        painter->setPen( lightPen );
    794         painter->drawLine( QPointF( rect.left() + bw2, rect.top() ), 
     794        painter->drawLine( QPointF( rect.left() + bw2, rect.top() ),
    795795            QPointF( rect.left() + bw2, rect.bottom() ) );
    796796
    797797        painter->setPen( darkPen );
    798         painter->drawLine( QPointF( rect.right() - bw2, rect.top() ), 
     798        painter->drawLine( QPointF( rect.right() - bw2, rect.top() ),
    799799            QPointF( rect.right() - bw2, rect.bottom() ) );
    800800    }
     
    818818    }
    819819
    820     const QPen lightPen( palette().color( QPalette::Light ), 
     820    const QPen lightPen( palette().color( QPalette::Light ),
    821821        0, Qt::SolidLine, Qt::FlatCap );
    822     const QPen darkPen( palette().color( QPalette::Dark ), 
     822    const QPen darkPen( palette().color( QPalette::Dark ),
    823823        0, Qt::SolidLine, Qt::FlatCap );
    824824
     
    857857
    858858            double tickPos;
    859             if ( d_data->inverted ) 
     859            if ( d_data->inverted )
    860860                tickPos = rect.left() + off;
    861861            else
     
    865865            {
    866866                painter->setPen( darkPen );
    867                 painter->drawLine( QPointF( tickPos - 1 , l1 ), 
     867                painter->drawLine( QPointF( tickPos - 1 , l1 ),
    868868                    QPointF( tickPos - 1,  l2 ) );
    869869                painter->setPen( lightPen );
    870                 painter->drawLine( QPointF( tickPos, l1 ), 
     870                painter->drawLine( QPointF( tickPos, l1 ),
    871871                    QPointF( tickPos, l2 ) );
    872872            }
     
    907907            {
    908908                painter->setPen( darkPen );
    909                 painter->drawLine( QPointF( l1, tickPos - 1 ), 
     909                painter->drawLine( QPointF( l1, tickPos - 1 ),
    910910                    QPointF( l2, tickPos - 1 ) );
    911911                painter->setPen( lightPen );
    912                 painter->drawLine( QPointF( l1, tickPos ), 
     912                painter->drawLine( QPointF( l1, tickPos ),
    913913                    QPointF( l2, tickPos ) );
    914914            }
     
    10141014
    10151015/*!
    1016   \brief Set the page step count 
    1017    
     1016  \brief Set the page step count
     1017
    10181018  pageStepCount is a multiplicator for the single step size
    10191019  that typically corresponds to the user pressing PageUp or PageDown.
    1020    
    1021   A value of 0 disables page stepping. 
     1020
     1021  A value of 0 disables page stepping.
    10221022
    10231023  The default value is 1.
     
    10311031}
    10321032
    1033 /*! 
     1033/*!
    10341034  \return Page step count
    10351035  \sa setPageStepCount(), singleStep()
     
    11501150  The direction of an inverted horizontal wheel will be from right to left
    11511151  an inverted vertical wheel will increase from bottom to top.
    1152  
     1152
    11531153  \param on En/Disable inverted appearance
    11541154  \sa isInverted()
    1155  
     1155
    11561156 */
    11571157void QwtWheel::setInverted( bool on )
     
    11761176  \brief En/Disable wrapping
    11771177
    1178   If wrapping is true stepping up from maximum() value will take 
    1179   you to the minimum() value and vice versa. 
     1178  If wrapping is true stepping up from maximum() value will take
     1179  you to the minimum() value and vice versa.
    11801180
    11811181  \param on En/Disable wrapping
     
    12511251{
    12521252    const double range = d_data->maximum - d_data->minimum;
    1253    
     1253
    12541254    if ( d_data->wrapping && range >= 0.0 )
    12551255    {
     
    12571257        {
    12581258            value += ::ceil( ( d_data->minimum - value ) / range ) * range;
    1259         }       
     1259        }
    12601260        else if ( value > d_data->maximum )
    12611261        {
     
    12931293            }
    12941294        }
    1295     }       
     1295    }
    12961296
    12971297    return value;
Note: See TracChangeset for help on using the changeset viewer.