itom 2.2.0
|
#include <rangeWidget.h>
Public Types | |
typedef QWidget | Superclass |
Superclass typedef. | |
Public Slots | |
virtual void | reset () |
virtual void | setMinimumValue (int value) |
virtual void | setMaximumValue (int value) |
virtual void | setValues (int minValue, int maxValue) |
Signals | |
void | minimumValueChanged (int value) |
void | minimumValueIsChanging (int value) |
void | maximumValueChanged (int value) |
void | maximumValueIsChanging (int value) |
void | valuesChanged (int minValue, int maxValue) |
void | rangeChanged (int min, int max) |
Public Member Functions | |
RangeWidget (QWidget *parent=0) | |
virtual | ~RangeWidget () |
Destructor. | |
virtual int | minimum () const |
virtual void | setMinimum (int minimum) |
virtual int | maximum () const |
virtual void | setMaximum (int maximum) |
virtual void | setRange (int min, int max) |
virtual void | range (int minimumAndMaximum[2]) const |
virtual int | minimumValue () const |
virtual int | maximumValue () const |
virtual void | values (int &minValue, int &maxValue) const |
virtual int | singleStep () const |
virtual void | setSingleStep (int step) |
uint | stepSizeValue () const |
void | setStepSizeValue (uint stepSize) |
uint | minimumRange () const |
void | setMinimumRange (uint min) |
uint | maximumRange () const |
void | setMaximumRange (uint max) |
uint | stepSizeRange () const |
void | setStepSizeRange (uint stepSize) |
bool | rangeIncludeLimits () const |
void | setRangeIncludeLimits (bool include) |
virtual QString | prefix () const |
virtual void | setPrefix (const QString &prefix) |
virtual QString | suffix () const |
virtual void | setSuffix (const QString &suffix) |
virtual int | tickInterval () const |
virtual void | setTickInterval (int ti) |
virtual void | setSpinBoxAlignment (Qt::Alignment alignment) |
virtual Qt::Alignment | spinBoxAlignment () const |
virtual void | setSpinBoxTextAlignment (Qt::Alignment alignment) |
virtual Qt::Alignment | spinBoxTextAlignment () const |
virtual void | setTracking (bool enable) |
virtual bool | hasTracking () const |
virtual bool | isAutoSpinBoxWidth () const |
virtual void | setAutoSpinBoxWidth (bool autoWidth) |
virtual bool | symmetricMoves () const |
virtual void | setSymmetricMoves (bool symmetry) |
virtual RangeSlider * | slider () const |
virtual QSpinBox * | minimumSpinBox () const |
virtual QSpinBox * | maximumSpinBox () const |
void | setLimitsFromIntervalMeta (const ito::IntervalMeta &intervalMeta) |
Protected Slots | |
virtual void | startChanging () |
virtual void | stopChanging () |
virtual void | changeValues (int newMinValue, int newMaxValue) |
virtual void | changeMinimumValue (int value) |
virtual void | changeMaximumValue (int value) |
virtual void | setSliderValues () |
A spinbox value has been modified, update the slider. | |
virtual void | setMinimumToMaximumSpinBox (int minimum) |
virtual void | setMaximumToMinimumSpinBox (int maximum) |
virtual void | onSliderRangeChanged (int min, int max) |
Protected Member Functions | |
virtual bool | eventFilter (QObject *obj, QEvent *event) |
void | setSlider (RangeSlider *slider) |
can be used to change the slider by a custom one | |
Protected Attributes | |
QScopedPointer < RangeWidgetPrivate > | d_ptr |
Properties | |
int | singleStep |
int | minimum |
int | maximum |
int | minimumValue |
int | maximumValue |
uint | stepSizeValue |
uint | minimumRange |
uint | maximumRange |
uint | stepSizeRange |
bool | rangeIncludeLimits |
QString | prefix |
QString | suffix |
int | tickInterval |
bool | autoSpinBoxWidth |
Qt::Alignment | spinBoxTextAlignment |
Qt::Alignment | spinBoxAlignment |
bool | tracking |
bool | symmetricMoves |
Private Member Functions | |
Q_DECLARE_PRIVATE (RangeWidget) | |
Q_DISABLE_COPY (RangeWidget) |
RangeWidget is a wrapper around a DoubleRangeSlider and 2 QSpinBoxes
RangeWidget::RangeWidget | ( | QWidget * | parent = 0 | ) | [explicit] |
Constructor If
bool RangeWidget::isAutoSpinBoxWidth | ( | ) | const [virtual] |
Set/Get the auto spinbox width When the autoSpinBoxWidth property is on, the width of the SpinBox is set to the same width of the largest QSpinBox of its
virtual int RangeWidget::maximum | ( | ) | const [virtual] |
This property holds the sliders and spinbox minimum value. FIXME: Test following specs. When setting this property, the maximum is adjusted if necessary to ensure that the range remains valid. Also the slider's current value is adjusted to be within the new range.
uint RangeWidget::maximumRange | ( | ) | const |
This property holds the maximum allowed range. The range is (1+maximumRange-minimumRange) if rangeIncludeLimits is true, else (maximumRange-minimumRange)
QSpinBox * RangeWidget::maximumSpinBox | ( | ) | const [virtual] |
Return the maximum spinbox.
virtual int RangeWidget::maximumValue | ( | ) | const [virtual] |
This property holds the slider and spinbox maximum value. RangeWidget forces the value to be within the legal range: minimum <= minimumValue <= maximumValue <= maximum.
virtual int RangeWidget::minimum | ( | ) | const [virtual] |
This property holds the sliders and spinbox minimum value. FIXME: Test following specs. When setting this property, the maximum is adjusted if necessary to ensure that the range remains valid. Also the slider's current value is adjusted to be within the new range.
uint RangeWidget::minimumRange | ( | ) | const |
This property holds the minimum allowed range. The range is (1+maximumRange-minimumRange) if rangeIncludeLimits is true, else (maximumRange-minimumRange)
QSpinBox * RangeWidget::minimumSpinBox | ( | ) | const [virtual] |
Return the minimum spinbox.
virtual int RangeWidget::minimumValue | ( | ) | const [virtual] |
This property holds the slider and spinbox minimum value. RangeWidget forces the value to be within the legal range: minimum <= minimumValue <= maximumValue <= maximum.
void RangeWidget::minimumValueChanged | ( | int | value | ) | [signal] |
Use with care: sliderMoved is emitted only when the user moves the slider
virtual QString RangeWidget::prefix | ( | ) | const [virtual] |
This property holds the spin box's prefix. The prefix is prepended to the start of the displayed value. Typical use is to display a unit of measurement or a currency symbol
bool RangeWidget::rangeIncludeLimits | ( | ) | const |
This property indicates if the range is assumed to be (1+maximumRange-minimumRange) (true) or (maximumRange-minimumRange) (false). The first case is important if the rangeSlider is used for ROIs of cameras, where the first and last value are inside of the ROI.
void RangeWidget::reset | ( | ) | [virtual, slot] |
Reset the slider and spinbox to zero (value and position)
void RangeWidget::setLimitsFromIntervalMeta | ( | const ito::IntervalMeta & | intervalMeta | ) |
The range slider can be used for parameters whose meta data is of type ito::IntervalMeta or ito::RangeMeta. In this case, the limits, step sizes... of this rangeSlider can be automatically adapted to the requirements given by the corresponding parameter.
void RangeWidget::setRange | ( | int | min, |
int | max | ||
) | [virtual] |
Description Utility function that set the min/max in once
void RangeWidget::setSpinBoxAlignment | ( | Qt::Alignment | alignment | ) | [virtual] |
This property holds the alignment of the spin boxes. Possible Values are Qt::AlignTop, Qt::AlignBottom, and Qt::AlignVCenter. By default, the alignment is Qt::AlignVCenter
void RangeWidget::setSpinBoxTextAlignment | ( | Qt::Alignment | alignment | ) | [virtual] |
This property holds the alignment of the text inside the spin boxes. Possible Values are Qt::AlignLeft, Qt::AlignRight, and Qt::AlignHCenter. By default, the alignment is Qt::AlignLeft
void RangeWidget::setTracking | ( | bool | enable | ) | [virtual] |
This property holds whether slider tracking is enabled. If tracking is enabled (the default), the widget emits the valueChanged() signal while the slider or spinbox is being dragged. If tracking is disabled, the widget emits the valueChanged() signal only when the user releases the slider or spinbox.
void RangeWidget::setValues | ( | int | minValue, |
int | maxValue | ||
) | [virtual, slot] |
Utility function that set the min and max values at once
virtual int RangeWidget::singleStep | ( | ) | const [virtual] |
This property holds the single step. The smaller of two natural steps that the slider provides and typically corresponds to the user pressing an arrow key.
RangeSlider * RangeWidget::slider | ( | ) | const [virtual] |
Return the slider of the range widget.
uint RangeWidget::stepSizeRange | ( | ) | const |
This property holds the step size of the allowed range. The range is (1+maximumRange-minimumRange) if rangeIncludeLimits is true, else (maximumRange-minimumRange)
uint RangeWidget::stepSizeValue | ( | ) | const |
This property holds the step size for the left or right slider position. If the stepSize is equal to 1, this property has no impact.
virtual QString RangeWidget::suffix | ( | ) | const [virtual] |
This property holds the spin box's suffix. The suffix is appended to the end of the displayed value. Typical use is to display a unit of measurement or a currency symbol
virtual bool RangeWidget::symmetricMoves | ( | ) | const [virtual] |
When symmetricMoves is true, moving a handle will move the other handle symmetrically, otherwise the handles are independent. False by default
virtual int RangeWidget::tickInterval | ( | ) | const [virtual] |
This property holds the interval between tickmarks. This is a value interval, not a pixel interval. If it is 0, the slider will choose between lineStep() and pageStep(). The default value is 0.
void RangeWidget::values | ( | int & | minValue, |
int & | maxValue | ||
) | const [virtual] |
Utility function that returns both values at the same time Returns minimumValue and maximumValue