doubleQwtAbstractSlider::incrementedValue(doublevalue,intstepCount)const[protected]
Increment a value
Parameters:value Value
stepCount Number of steps
Returns:
Incremented value
voidQwtAbstractSlider::incrementValue(intstepCount)[protected]
Increment the slider
The step size depends on the number of totalSteps()Parameters:stepCount Number of steps
Seealso:setTotalSteps(), incrementedValue()boolQwtAbstractSlider::invertedControls()constReturns:
True, when the controls are inverted
Seealso:setInvertedControls()boolQwtAbstractSlider::isReadOnly()const
In read only mode the slider can't be controlled by mouse or keyboard.
Returns:
true if read only
Seealso:setReadOnly()virtualboolQwtAbstractSlider::isScrollPosition(constQPoint&pos)const[protected],[purevirtual]
Determine what to do when the user presses a mouse button.
Parameters:pos Mouse position
Returnvalues:True,when pos is a valid scroll position
Seealso:scrolledTo()
Implemented in QwtKnob, QwtDial, and QwtSlider.
boolQwtAbstractSlider::isTracking()constReturns:
True, when tracking has been enabled
Seealso:setTracking()boolQwtAbstractSlider::isValid()constReturns:
True, when the value is invalid
voidQwtAbstractSlider::keyPressEvent(QKeyEvent*event)[protected],[virtual]
Handles key events
QwtAbstractSlider handles the following keys:
• Qt::Key_Left
Add/Subtract singleSteps() in direction to lowerBound();
• Qt::Key_Right
Add/Subtract singleSteps() in direction to upperBound();
• Qt::Key_Down
Subtract singleSteps(), when invertedControls() is false
• Qt::Key_Up
Add singleSteps(), when invertedControls() is false
• Qt::Key_PageDown
Subtract pageSteps(), when invertedControls() is false
• Qt::Key_PageUp
Add pageSteps(), when invertedControls() is false
• Qt::Key_Home
Set the value to the minimum()
• Qt::Key_End
Set the value to the maximum()Parameters:event Key event
Seealso:isReadOnly()
Reimplemented in QwtCompass.
voidQwtAbstractSlider::mouseMoveEvent(QMouseEvent*event)[protected],[virtual]
Mouse Move Event handler
Parameters:event Mouse event
voidQwtAbstractSlider::mousePressEvent(QMouseEvent*event)[protected],[virtual]
Mouse press event handler
Parameters:event Mouse event
Reimplemented in QwtSlider.
voidQwtAbstractSlider::mouseReleaseEvent(QMouseEvent*event)[protected],[virtual]
Mouse Release Event handler
Parameters:event Mouse event
Reimplemented in QwtSlider.
uintQwtAbstractSlider::pageSteps()constReturns:
Number of steps
Seealso:setPageSteps(), totalSteps(), singleSteps()voidQwtAbstractSlider::scaleChange()[protected],[virtual]
Update the slider according to modifications of the scale
Reimplemented from QwtAbstractScale.
Reimplemented in QwtDial, and QwtSlider.
virtualdoubleQwtAbstractSlider::scrolledTo(constQPoint&pos)const[protected],[purevirtual]
Determine the value for a new position of the movable part of the slider.
Parameters:pos Mouse position
Returns:
Value for the mouse position
Seealso:isScrollPosition()
Implemented in QwtKnob, QwtDial, and QwtSlider.
voidQwtAbstractSlider::setInvertedControls(boolon)
Invert wheel and key events
Usually scrolling the mouse wheel 'up' and using keys like page up will increase the slider's value
towards its maximum. When invertedControls() is enabled the value is scrolled towards its minimum.
Inverting the controls might be f.e. useful for a vertical slider with an inverted scale ( decreasing
from top to bottom ).
Parameters:on Invert controls, when true
Seealso:invertedControls(), keyEvent(), wheelEvent()voidQwtAbstractSlider::setPageSteps(uintstepCount)
Set the number of steps for a page increment. The range of the slider is divided into a number of steps
from which the value increments according to user inputs depend.
Parameters:stepCount Number of steps
Seealso:pageSteps(), setTotalSteps(), setSingleSteps()voidQwtAbstractSlider::setReadOnly(boolon)
En/Disable read only mode
In read only mode the slider can't be controlled by mouse or keyboard.
Parameters:on Enables in case of true
Seealso:isReadOnly()Warning:
The focus policy is set to Qt::StrongFocus or Qt::NoFocus
voidQwtAbstractSlider::setSingleSteps(uintstepCount)
Set the number of steps for a single increment. The range of the slider is divided into a number of steps
from which the value increments according to user inputs depend.
Parameters:stepCount Number of steps
Seealso:singleSteps(), setTotalSteps(), setPageSteps()voidQwtAbstractSlider::setStepAlignment(boolon)
Enable step alignment. When step alignment is enabled values resulting from slider movements are aligned
to the step size.
Parameters:on Enable step alignment when true
Seealso:stepAlignment()voidQwtAbstractSlider::setTotalSteps(uintstepCount)
Set the number of steps. The range of the slider is divided into a number of steps from which the value
increments according to user inputs depend.
The default setting is 100.
Parameters:stepCount Number of steps
Seealso:totalSteps(), setSingleSteps(), setPageSteps()voidQwtAbstractSlider::setTracking(boolon)
Enables or disables tracking. If tracking is enabled, the slider emits the valueChanged() signal while
the movable part of the slider is being dragged. If tracking is disabled, the slider emits the
valueChanged() signal only when the user releases the slider.
Tracking is enabled by default.
Parameters:on true (enable) or false (disable) tracking.
Seealso:isTracking(), sliderMoved()voidQwtAbstractSlider::setValid(boolon)
Set the value to be valid/invalid
Parameters:on When true, the value is invalidated
Seealso:setValue()voidQwtAbstractSlider::setValue(doublevalue)[slot]
Set the slider to the specified value
Parameters:value New value
Seealso:setValid(), sliderChange(), valueChanged()voidQwtAbstractSlider::setWrapping(boolon)
If wrapping is true stepping up from upperBound() value will take you to the minimum() value and vice
versa.
Parameters:on En/Disable wrapping
Seealso:wrapping()uintQwtAbstractSlider::singleSteps()constReturns:
Number of steps
Seealso:setSingleSteps(), totalSteps(), pageSteps()voidQwtAbstractSlider::sliderMoved(doublevalue)[signal]
This signal is emitted when the user moves the slider with the mouse.
Parameters:value New value
Seealso:valueChanged()voidQwtAbstractSlider::sliderPressed()[signal]
This signal is emitted when the user presses the movable part of the slider.
voidQwtAbstractSlider::sliderReleased()[signal]
This signal is emitted when the user releases the movable part of the slider.
boolQwtAbstractSlider::stepAlignment()constReturns:
True, when step alignment is enabled
Seealso:setStepAlignment()uintQwtAbstractSlider::totalSteps()constReturns:
Number of steps
Seealso:setTotalSteps(), singleSteps(), pageSteps()voidQwtAbstractSlider::valueChanged(doublevalue)[signal]
Notify a change of value. When tracking is enabled (default setting), this signal will be emitted every
time the value changes.
Parameters:value New value
Seealso:setTracking(), sliderMoved()voidQwtAbstractSlider::wheelEvent(QWheelEvent*event)[protected],[virtual]
Wheel Event handler
In/decreases the value by s number of steps. The direction depends on the invertedControls() property.
When the control or shift modifier is pressed the wheel delta ( divided by 120 ) is mapped to an
increment according to pageSteps(). Otherwise it is mapped to singleSteps().
Parameters:event Wheel event
Reimplemented in QwtDial.
boolQwtAbstractSlider::wrapping()constReturns:
True, when wrapping is set
Seealso:setWrapping()