Changeset 9383 in ntrip for trunk/BNC/qwt/qwt_abstract_slider.cpp
- Timestamp:
- Mar 19, 2021, 9:15:03 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/qwt/qwt_abstract_slider.cpp
r8127 r9383 18 18 #endif 19 19 20 static double qwtAlignToScaleDiv( 20 static double qwtAlignToScaleDiv( 21 21 const QwtAbstractSlider *slider, double value ) 22 22 { … … 28 28 return sd.lowerBound(); 29 29 30 if ( tValue == slider->transform( sd. lowerBound() ) )30 if ( tValue == slider->transform( sd.upperBound() ) ) 31 31 return sd.upperBound(); 32 32 … … 107 107 } 108 108 109 /*! 109 /*! 110 110 Set the value to be valid/invalid 111 111 … … 122 122 123 123 Q_EMIT valueChanged( d_data->value ); 124 } 125 } 124 } 125 } 126 126 127 127 //! \return True, when the value is invalid … … 129 129 { 130 130 return d_data->isValid; 131 } 131 } 132 132 133 133 /*! … … 168 168 \brief Enables or disables tracking. 169 169 170 If tracking is enabled, the slider emits the valueChanged() 171 signal while the movable part of the slider is being dragged. 172 If tracking is disabled, the slider emits the valueChanged() signal 170 If tracking is enabled, the slider emits the valueChanged() 171 signal while the movable part of the slider is being dragged. 172 If tracking is disabled, the slider emits the valueChanged() signal 173 173 only when the user releases the slider. 174 174 … … 288 288 Wheel Event handler 289 289 290 In/decreases the value by s number of steps. The direction 290 In/decreases the value by s number of steps. The direction 291 291 depends on the invertedControls() property. 292 292 … … 459 459 460 460 The range of the slider is divided into a number of steps from 461 which the value increments according to user inputs depend. 461 which the value increments according to user inputs depend. 462 462 463 463 The default setting is 100. … … 485 485 486 486 The range of the slider is divided into a number of steps from 487 which the value increments according to user inputs depend. 487 which the value increments according to user inputs depend. 488 488 489 489 \param stepCount Number of steps … … 495 495 { 496 496 d_data->singleSteps = stepCount; 497 } 497 } 498 498 499 499 /*! … … 504 504 { 505 505 return d_data->singleSteps; 506 } 507 508 /*! 506 } 507 508 /*! 509 509 \brief Set the number of steps for a page increment 510 510 511 511 The range of the slider is divided into a number of steps from 512 which the value increments according to user inputs depend. 512 which the value increments according to user inputs depend. 513 513 514 514 \param stepCount Number of steps … … 541 541 */ 542 542 void QwtAbstractSlider::setStepAlignment( bool on ) 543 { 543 { 544 544 if ( on != d_data->stepAlignment ) 545 545 { 546 546 d_data->stepAlignment = on; 547 547 } 548 } 549 548 } 549 550 550 /*! 551 551 \return True, when step alignment is enabled … … 586 586 587 587 /*! 588 If wrapping is true stepping up from upperBound() value will 589 take you to the minimum() value and vice versa. 588 If wrapping is true stepping up from upperBound() value will 589 take you to the minimum() value and vice versa. 590 590 591 591 \param on En/Disable wrapping … … 595 595 { 596 596 d_data->wrapping = on; 597 } 597 } 598 598 599 599 /*! 600 600 \return True, when wrapping is set 601 601 \sa setWrapping() 602 */ 602 */ 603 603 bool QwtAbstractSlider::wrapping() const 604 604 { … … 609 609 Invert wheel and key events 610 610 611 Usually scrolling the mouse wheel "up" and using keys like page 612 up will increase the slider's value towards its maximum. 611 Usually scrolling the mouse wheel "up" and using keys like page 612 up will increase the slider's value towards its maximum. 613 613 When invertedControls() is enabled the value is scrolled 614 614 towards its minimum. … … 645 645 void QwtAbstractSlider::incrementValue( int stepCount ) 646 646 { 647 const double value = incrementedValue( 647 const double value = incrementedValue( 648 648 d_data->value, stepCount ); 649 649 … … 656 656 657 657 /*! 658 Increment a value 659 660 \param value Value 658 Increment a value 659 660 \param value Value 661 661 \param stepCount Number of steps 662 662 663 663 \return Incremented value 664 664 */ 665 double QwtAbstractSlider::incrementedValue( 665 double QwtAbstractSlider::incrementedValue( 666 666 double value, int stepCount ) const 667 667 { … … 684 684 // we need equidant steps according to 685 685 // paint device coordinates 686 const double range = transformation->transform( maximum() ) 686 const double range = transformation->transform( maximum() ) 687 687 - transformation->transform( minimum() ); 688 688 … … 691 691 double v = transformation->transform( value ); 692 692 693 v = qRound( v / stepSize ) * stepSize; 693 v = qRound( v / stepSize ) * stepSize; 694 694 v += stepCount * range / d_data->totalSteps; 695 695 … … 757 757 if ( stepSize > 0.0 ) 758 758 { 759 value = lowerBound() + 759 value = lowerBound() + 760 760 qRound( ( value - lowerBound() ) / stepSize ) * stepSize; 761 761 }
Note:
See TracChangeset
for help on using the changeset viewer.