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

    r8127 r9383  
    3232}
    3333
    34 static inline QwtInterval qwtPowInterval( double base, const QwtInterval &interval ) 
     34static inline QwtInterval qwtPowInterval( double base, const QwtInterval &interval )
    3535{
    3636    return QwtInterval( qPow( base, interval.minValue() ),
     
    5252static double qwtStepSize( double intervalSize, int maxSteps, uint base )
    5353{
    54     const double minStep = 
     54    const double minStep =
    5555        QwtScaleArithmetic::divideInterval( intervalSize, maxSteps, base );
    5656
     
    171171  \return Calculated step size
    172172 */
    173 double QwtScaleArithmetic::divideInterval( 
    174     double intervalSize, int numSteps, uint base ) 
     173double QwtScaleArithmetic::divideInterval(
     174    double intervalSize, int numSteps, uint base )
    175175{
    176176    if ( numSteps <= 0 )
     
    269269
    270270/*!
    271    Create and return a clone of the transformation 
     271   Create and return a clone of the transformation
    272272   of the engine. When the engine has no special transformation
    273273   NULL is returned, indicating no transformation.
     
    340340    double intervalSize, int numSteps ) const
    341341{
    342     return QwtScaleArithmetic::divideInterval( 
     342    return QwtScaleArithmetic::divideInterval(
    343343        intervalSize, numSteps, d_data->base );
    344344}
     
    468468/*!
    469469  \brief Specify a reference point
    470   \param r new reference value
     470  \param reference New reference value
    471471
    472472  The reference point is needed if options IncludeReference or
     
    475475  \sa Attribute
    476476*/
    477 void QwtScaleEngine::setReference( double r )
    478 {
    479     d_data->referenceValue = r;
     477void QwtScaleEngine::setReference( double reference )
     478{
     479    d_data->referenceValue = reference;
    480480}
    481481
     
    502502 */
    503503void QwtScaleEngine::setBase( uint base )
    504 { 
     504{
    505505    d_data->base = qMax( base, 2U );
    506506}
     
    559559        interval = buildInterval( interval.minValue() );
    560560
    561     stepSize = QwtScaleArithmetic::divideInterval( 
     561    stepSize = QwtScaleArithmetic::divideInterval(
    562562        interval.width(), qMax( maxNumSteps, 1 ), base() );
    563563
     
    607607            maxMajorSteps = 1;
    608608
    609         stepSize = QwtScaleArithmetic::divideInterval( 
     609        stepSize = QwtScaleArithmetic::divideInterval(
    610610            interval.width(), maxMajorSteps, base() );
    611611    }
     
    757757    double x2 = interval.maxValue();
    758758
    759     // when there is no rounding beside some effect, when 
     759    // when there is no rounding beside some effect, when
    760760    // calculating with doubles, we keep the original value
    761761
     
    868868        interval = buildInterval( interval.minValue() );
    869869
    870     stepSize = divideInterval( qwtLogInterval( logBase, interval ).width(), 
     870    stepSize = divideInterval( qwtLogInterval( logBase, interval ).width(),
    871871        qMax( maxNumSteps, 1 ) );
    872872    if ( stepSize < 1.0 )
     
    928928            maxMajorSteps = 1;
    929929
    930         stepSize = divideInterval( 
     930        stepSize = divideInterval(
    931931            qwtLogInterval( logBase, interval ).width(), maxMajorSteps );
    932932        if ( stepSize < 1.0 )
     
    10331033        if ( minStep == 0.0 )
    10341034            return;
    1035        
    1036         const int numSteps = qRound( stepSize / minStep ); 
     1035
     1036        const int numSteps = qRound( stepSize / minStep );
    10371037
    10381038        int mediumTickIndex = -1;
     
    10881088
    10891089        if ( numTicks < 1 )
    1090             return; 
     1090            return;
    10911091
    10921092        int mediumTickIndex = -1;
Note: See TracChangeset for help on using the changeset viewer.