Changeset 9383 in ntrip for trunk/BNC/qwt/qwt_scale_engine.cpp
- Timestamp:
- Mar 19, 2021, 9:15:03 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/qwt/qwt_scale_engine.cpp
r8127 r9383 32 32 } 33 33 34 static inline QwtInterval qwtPowInterval( double base, const QwtInterval &interval ) 34 static inline QwtInterval qwtPowInterval( double base, const QwtInterval &interval ) 35 35 { 36 36 return QwtInterval( qPow( base, interval.minValue() ), … … 52 52 static double qwtStepSize( double intervalSize, int maxSteps, uint base ) 53 53 { 54 const double minStep = 54 const double minStep = 55 55 QwtScaleArithmetic::divideInterval( intervalSize, maxSteps, base ); 56 56 … … 171 171 \return Calculated step size 172 172 */ 173 double QwtScaleArithmetic::divideInterval( 174 double intervalSize, int numSteps, uint base ) 173 double QwtScaleArithmetic::divideInterval( 174 double intervalSize, int numSteps, uint base ) 175 175 { 176 176 if ( numSteps <= 0 ) … … 269 269 270 270 /*! 271 Create and return a clone of the transformation 271 Create and return a clone of the transformation 272 272 of the engine. When the engine has no special transformation 273 273 NULL is returned, indicating no transformation. … … 340 340 double intervalSize, int numSteps ) const 341 341 { 342 return QwtScaleArithmetic::divideInterval( 342 return QwtScaleArithmetic::divideInterval( 343 343 intervalSize, numSteps, d_data->base ); 344 344 } … … 468 468 /*! 469 469 \brief Specify a reference point 470 \param r new reference value470 \param reference New reference value 471 471 472 472 The reference point is needed if options IncludeReference or … … 475 475 \sa Attribute 476 476 */ 477 void QwtScaleEngine::setReference( double r )478 { 479 d_data->referenceValue = r ;477 void QwtScaleEngine::setReference( double reference ) 478 { 479 d_data->referenceValue = reference; 480 480 } 481 481 … … 502 502 */ 503 503 void QwtScaleEngine::setBase( uint base ) 504 { 504 { 505 505 d_data->base = qMax( base, 2U ); 506 506 } … … 559 559 interval = buildInterval( interval.minValue() ); 560 560 561 stepSize = QwtScaleArithmetic::divideInterval( 561 stepSize = QwtScaleArithmetic::divideInterval( 562 562 interval.width(), qMax( maxNumSteps, 1 ), base() ); 563 563 … … 607 607 maxMajorSteps = 1; 608 608 609 stepSize = QwtScaleArithmetic::divideInterval( 609 stepSize = QwtScaleArithmetic::divideInterval( 610 610 interval.width(), maxMajorSteps, base() ); 611 611 } … … 757 757 double x2 = interval.maxValue(); 758 758 759 // when there is no rounding beside some effect, when 759 // when there is no rounding beside some effect, when 760 760 // calculating with doubles, we keep the original value 761 761 … … 868 868 interval = buildInterval( interval.minValue() ); 869 869 870 stepSize = divideInterval( qwtLogInterval( logBase, interval ).width(), 870 stepSize = divideInterval( qwtLogInterval( logBase, interval ).width(), 871 871 qMax( maxNumSteps, 1 ) ); 872 872 if ( stepSize < 1.0 ) … … 928 928 maxMajorSteps = 1; 929 929 930 stepSize = divideInterval( 930 stepSize = divideInterval( 931 931 qwtLogInterval( logBase, interval ).width(), maxMajorSteps ); 932 932 if ( stepSize < 1.0 ) … … 1033 1033 if ( minStep == 0.0 ) 1034 1034 return; 1035 1036 const int numSteps = qRound( stepSize / minStep ); 1035 1036 const int numSteps = qRound( stepSize / minStep ); 1037 1037 1038 1038 int mediumTickIndex = -1; … … 1088 1088 1089 1089 if ( numTicks < 1 ) 1090 return; 1090 return; 1091 1091 1092 1092 int mediumTickIndex = -1;
Note:
See TracChangeset
for help on using the changeset viewer.