#include <qwt_drange.h>
Inheritance diagram for QwtDblRange:

Public Member Functions | |
| QwtDblRange () | |
| virtual | ~QwtDblRange () |
| void | setRange (double vmin, double vmax, double vstep=0.0, int pagesize=1) |
| void | setValid (bool) |
| bool | isValid () const |
| 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 Member Functions | |
| double | exactValue () const |
| double | exactPrevValue () const |
| double | prevValue () const |
| virtual void | valueChange () |
| virtual void | stepChange () |
| virtual void | rangeChange () |
Private Member Functions | |
| void | setNewValue (double x, int align=0) |
Private Attributes | |
| double | d_minValue |
| double | d_maxValue |
| double | d_step |
| int | d_pageSize |
| bool | d_isValid |
| double | d_value |
| double | d_exactValue |
| double | d_exactPrevValue |
| double | d_prevValue |
| bool | d_periodic |
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.
Definition at line 31 of file qwt_drange.h.
|
|
The range is initialized to [0.0, 100.0], the step size to 1.0, and the value to 0.0. Definition at line 21 of file qwt_drange.cpp. |
|
|
Destroys the QwtDblRange.
Definition at line 36 of file qwt_drange.cpp. |
|
|
Returns the exact previous value.
Definition at line 378 of file qwt_drange.cpp. References d_exactPrevValue. Referenced by QwtSliderBase::mouseMoveEvent(). |
|
|
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. Definition at line 372 of file qwt_drange.cpp. References d_exactValue. Referenced by QwtSliderBase::mouseMoveEvent(), and QwtSliderBase::timerEvent(). |
|
|
Adjust the value to the closest point in the step raster.
Reimplemented in QwtSliderBase. Definition at line 130 of file qwt_drange.cpp. References setNewValue(). Referenced by QwtSliderBase::fitValue(), QwtSliderBase::mouseReleaseEvent(), QwtSliderBase::setPosition(), and QwtSliderBase::timerEvent(). |
|
|
Increment the value by a specified number of pages.
Definition at line 269 of file qwt_drange.cpp. References d_pageSize, d_step, d_value, isValid(), and setNewValue(). Referenced by QwtSliderBase::mouseReleaseEvent(), QwtSliderBase::timerEvent(), and QwtSliderBase::wheelEvent(). |
|
|
Increment the value by a specified number of steps.
Reimplemented in QwtSliderBase. Definition at line 257 of file qwt_drange.cpp. References d_step, d_value, isValid(), and setNewValue(). Referenced by QwtCounter::btnClicked(), QwtSliderBase::incValue(), and QwtSliderBase::keyPressEvent(). |
|
|
Definition at line 49 of file qwt_drange.cpp. References d_isValid. Referenced by QwtDial::drawContents(), QwtCompass::drawScaleContents(), incPages(), incValue(), QwtSliderBase::keyPressEvent(), QwtSliderBase::mouseMoveEvent(), QwtSliderBase::mousePressEvent(), QwtSliderBase::mouseReleaseEvent(), and QwtSliderBase::wheelEvent(). |
|
|
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.
Definition at line 324 of file qwt_drange.cpp. References d_maxValue. Referenced by QwtDial::drawContents(), QwtWheel::drawWheel(), QwtWheel::getValue(), QwtSlider::getValue(), QwtKnob::getValue(), QwtDial::getValue(), QwtCounter::maxVal(), QwtSlider::rangeChange(), QwtKnob::rangeChange(), QwtKnob::recalcAngle(), QwtSlider::scaleChange(), QwtCounter::setMinValue(), QwtCounter::sizeHint(), QwtCounter::updateButtons(), QwtDial::updateScale(), and QwtSlider::xyPosition(). |
|
|
Returns the value at the first border of the range. minValue returns the value which has been specified as the first parameter in setRange().
Definition at line 337 of file qwt_drange.cpp. References d_minValue. Referenced by QwtDial::drawContents(), QwtWheel::drawWheel(), QwtWheel::getValue(), QwtSlider::getValue(), QwtKnob::getValue(), QwtDial::getValue(), QwtCounter::minVal(), QwtSlider::rangeChange(), QwtKnob::rangeChange(), QwtKnob::recalcAngle(), QwtSlider::scaleChange(), QwtCounter::setMaxValue(), QwtCounter::sizeHint(), QwtCounter::updateButtons(), QwtDial::updateScale(), and QwtSlider::xyPosition(). |
|
|
Returns the page size in steps.
Definition at line 352 of file qwt_drange.cpp. References d_pageSize. |
|
|
Returns TRUE if the range is periodic.
Definition at line 346 of file qwt_drange.cpp. References d_periodic. |
|
|
Returns the previous value.
Definition at line 384 of file qwt_drange.cpp. References d_prevValue. Referenced by QwtSliderBase::buttonReleased(), QwtSliderBase::keyPressEvent(), QwtSliderBase::mouseMoveEvent(), and QwtSliderBase::wheelEvent(). |
|
|
Notify a change of the range. This virtual function is called whenever the range changes. The default implementation does nothing. Reimplemented in QwtDial, QwtKnob, and QwtSlider. Definition at line 292 of file qwt_drange.cpp. Referenced by QwtSlider::rangeChange(), and setRange(). |
|
||||||||||||
|
No docs. Description
Definition at line 62 of file qwt_drange.cpp. References d_exactPrevValue, d_exactValue, d_isValid, d_maxValue, d_minValue, d_periodic, d_prevValue, d_step, d_value, MinEps, qwtAbs, qwtMax, qwtMin, and valueChange(). Referenced by fitValue(), incPages(), incValue(), setRange(), and setValue(). |
|
|
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.
Definition at line 246 of file qwt_drange.cpp. References d_periodic. |
|
||||||||||||||||||||
|
Specify range and step size.
Definition at line 167 of file qwt_drange.cpp. References d_maxValue, d_minValue, d_pageSize, d_step, d_value, qwtAbs, qwtLim(), rangeChange(), setNewValue(), and setStep(). Referenced by QwtCounter::QwtCounter(), QwtDial::QwtDial(), QwtSliderBase::QwtSliderBase(), QwtCounter::setMaxValue(), and QwtCounter::setMinValue(). |
|
|
Change the step raster.
Reimplemented in QwtCounter. Definition at line 206 of file qwt_drange.cpp. References d_maxValue, d_minValue, d_step, DefaultRelStep, MinRelStep, and stepChange(). Referenced by setRange(), and QwtCounter::setStep(). |
|
|
Definition at line 40 of file qwt_drange.cpp. References d_isValid, and valueChange(). |
|
|
Set a new value without adjusting to the step raster.
Reimplemented in QwtCounter, and QwtSliderBase. Definition at line 145 of file qwt_drange.cpp. References setNewValue(). Referenced by QwtSliderBase::setValue(), and QwtCounter::setValue(). |
|
|
Reimplemented in QwtCounter. Definition at line 311 of file qwt_drange.cpp. References d_step, and qwtAbs. Referenced by QwtSliderBase::mouseReleaseEvent(), QwtCounter::setMaxValue(), QwtCounter::setMinValue(), QwtCounter::step(), and QwtSliderBase::timerEvent(). |
|
|
Notify a change of the step size. This virtual function is called whenever the step size changes. The default implementation does nothing. Definition at line 303 of file qwt_drange.cpp. Referenced by setStep(). |
|
|
Returns the current value.
Reimplemented in QwtCounter. Definition at line 358 of file qwt_drange.cpp. References d_value. Referenced by QwtSliderBase::buttonReleased(), QwtDial::drawContents(), QwtCompass::drawScaleContents(), QwtSlider::drawSlider(), QwtWheel::drawWheel(), QwtSlider::getScrollMode(), QwtKnob::getValue(), QwtDial::getValue(), QwtSliderBase::keyPressEvent(), QwtCompass::keyPressEvent(), QwtSliderBase::mouseMoveEvent(), QwtSliderBase::mousePressEvent(), QwtSliderBase::mouseReleaseEvent(), QwtKnob::recalcAngle(), QwtSliderBase::timerEvent(), QwtCounter::value(), QwtSliderBase::valueChange(), and QwtSliderBase::wheelEvent(). |
|
|
Notify a change of value. This virtual function is called whenever the value changes. The default implementation does nothing. Reimplemented in QwtCounter, QwtDial, QwtKnob, QwtSliderBase, QwtSlider, and QwtWheel. Definition at line 281 of file qwt_drange.cpp. Referenced by setNewValue(), and setValid(). |
|
|
Definition at line 82 of file qwt_drange.h. Referenced by exactPrevValue(), and setNewValue(). |
|
|
Definition at line 81 of file qwt_drange.h. Referenced by exactValue(), and setNewValue(). |
|
|
Definition at line 79 of file qwt_drange.h. Referenced by isValid(), setNewValue(), and setValid(). |
|
|
Definition at line 75 of file qwt_drange.h. Referenced by maxValue(), setNewValue(), setRange(), and setStep(). |
|
|
Definition at line 74 of file qwt_drange.h. Referenced by minValue(), setNewValue(), setRange(), and setStep(). |
|
|
Definition at line 77 of file qwt_drange.h. Referenced by incPages(), pageSize(), and setRange(). |
|
|
Definition at line 85 of file qwt_drange.h. Referenced by periodic(), setNewValue(), and setPeriodic(). |
|
|
Definition at line 83 of file qwt_drange.h. Referenced by prevValue(), and setNewValue(). |
|
|
Definition at line 76 of file qwt_drange.h. Referenced by incPages(), incValue(), setNewValue(), setRange(), setStep(), and step(). |
|
|
Definition at line 80 of file qwt_drange.h. Referenced by incPages(), incValue(), setNewValue(), setRange(), and value(). |
1.3.2