The QRangeControl class provides an integer value within a range. More...
#include <qrangect.h>
Inherited by QScrollBar.
This class has many functions to manipulate a value inside a range. It was specifically designed for the QScrollBar widget, but it can also be practical for other purposes.
The three virtual functions valueChange(), rangeChange() and stepChange() can be reimplemented in a subclass to detect range control changes.
Constructs a range control with the specified parameters.
Constructs a range control with min value 0, max value 99, line step 1, page step 10 and initial value 0.
Equivalent to
setValue( value()+lineStep() ).
See also: subtractLine().
Equivalent to
setValue( value()+pageStep() )
See also: subtractPage().
[protected]
Sets the range control value directly without calling valueChange().
Adjusts the value if it is less than the min value or greater than the max value.
See also: setValue().
Returns the current line step.
See also: setSteps() and pageStep().
Returns the current maximum value in the range.
See also: setRange() and minValue().
Returns the current minimum value in the range.
See also: setRange() and maxValue().
Returns the current page step.
See also: setSteps() and lineStep().
[protected]
Returns the previous range control value.
See also: value().
[virtual protected]
This virtual function is called whenever the range control range changes.
Do not call it yourself; if is protected
rather than private
only because private
functions are not part of the public
interface in our documentation generator.
See also: setRange(), valueChange() and stepChange().
Reimplemented in QScrollBar.
Sets the range min value to minValue and the max value to maxValue.
Calls the virtual rangeChange() function if the new min and max values are different from the previous setting. Calls the virtual valueChange() function if the current value is outside the new range and has to be adjusted.
See also: minValue() and maxValue().
Sets the range line step to lineStep and page step to pageStep.
Call the virtual stepChange() function if the new line step and/or page step are different from the previous setting.
See also: setRange().
Sets the range control value to value.
Adjusts the value if it is less than the min value or greater than the max value.
Calls the virtual valueChange() function if the value is different from the previous value.
[virtual protected]
This virtual function is called whenever the range control step value changes.
Do not call it yourself; if is protected
rather than private
only because private
functions are not part of the public
interface in our documentation generator.
See also: setSteps(), rangeChange() and valueChange().
Reimplemented in QScrollBar.
Equivalent to
setValue( value()-lineStep() ).
See also: addLine().
Equivalent to
setValue( value()-pageStep() )
See also: addPage().
Returns the current range control value.
See also: setValue() and prevValue().
[virtual protected]
This virtual function is called whenever the range control value changes.
Do not call it yourself; if is protected
rather than private
only because private
functions are not part of the public
interface in our documentation generator.
See also: setValue(), addPage(), subtractPage(), addLine(), subtractLine(), rangeChange() and stepChange().
Reimplemented in QScrollBar.
This file is part of the Qt toolkit, copyright © 1995-96 Troll Tech, all rights reserved.
It was generated from the following files: