#include <qwt_drange.h>
Inheritance diagram for QwtDblRange::
Public Methods | |
QwtDblRange () | |
void | setRange (double vmin, double vmax, double vstep=0.0, int pagesize=1) |
virtual void | setValue (double) |
double | value () const |
void | setPeriodic (bool tf) |
bool | periodic () const |
void | setStep (double) |
double | step () const |
double | maxValue () const |
double | minValue () const |
int | pageSize () const |
virtual void | incValue (int) |
virtual void | incPages (int) |
virtual void | fitValue (double) |
Protected Methods | |
double | exactValue () const |
double | exactPrevValue () const |
double | prevValue () const |
virtual void | valueChange () |
virtual void | stepChange () |
virtual void | rangeChange () |
This class is useful as a base class or a member for sliders. It represents an interval of type double within which a value can be moved. The value can be either an arbitrary point inside the interval (see QwtDblRange::setValue), or it can be fitted into a step raster (see QwtDblRange::fitValue and QwtDblRange::incValue).
As a special case, a QwtDblRange can be periodic, which means that a value outside the interval will be mapped to a value inside the interval when QwtDblRange::setValue(), QwtDblRange::fitValue(), QwtDblRange::incValue() or QwtDblRange::incPages() are called.
|
Constructor.
The range is initialized to [0.0, 100.0], the step size to 1.0, and the value to 0.0. |
|
Returns the exact previous value.
|
|
Returns the exact value.
The exact value is the value which QwtDblRange::value would return if the value were not adjusted to the step raster. It differs from the current value only if QwtDblRange::fitValue or QwtDblRange::incValue have been used before. This function is intended for internal use in derived classes. |
|
Adjust the value to the closest point in the step raster.
Reimplemented in QwtSliderBase. |
|
Increment the value by a specified number of pages.
|
|
Increment the value by a specified number of steps.
Reimplemented in QwtSliderBase. |
|
Returns the value of the second border of the range.
maxValue returns the value which has been specified as the second parameter in QwtDblRange::setRange.
|
|
Returns the value at the first border of the range.
minValue returns the value which has been specified as the first parameter in setRange().
|
|
Returns the page size in steps.
|
|
Returns TRUE if the range is periodic.
|
|
Returns the previous value.
|
|
Notify a change of the range.
This virtual function is called whenever the range changes. The default implementation does nothing. Reimplemented in QwtSlider. |
|
Make the range periodic.
When the range is periodic, the value will be set to a point inside the interval such that
point = value + n * width if the user tries to set a new value which is outside the range. If the range is nonperiodic (the default), values outside the range will be clipped.
|
|
Specify range and step size.
|
|
Change the step raster.
|
|
Set a new value without adjusting to the step raster.
Reimplemented in QwtCounter, and QwtSliderBase. |
|
|
|
Notify a change of the step size.
This virtual function is called whenever the step size changes. The default implementation does nothing. |
|
Returns the current value.
|
|
Notify a change of value.
This virtual function is called whenever the value changes. The default implementation does nothing. Reimplemented in QwtSliderBase, QwtSlider, and QwtWheel. |