itom  4.1.0
DoubleRangeWidget Class Reference

#include <doubleRangeWidget.h>

Inheritance diagram for DoubleRangeWidget:

Public Types

typedef QWidget Superclass
 Superclass typedef.
 

Public Slots

virtual void reset ()
 Reset the slider and spinbox to zero (value and position)
 
virtual void setMinimumValue (double value)
 
virtual void setMaximumValue (double value)
 
virtual void setValues (double minValue, double maxValue)
 Utility function that set the min and max values at once.
 
virtual void setDecimals (int decimals)
 

Signals

void minimumValueChanged (double value)
 
void minimumValueIsChanging (double value)
 
void maximumValueChanged (double value)
 
void maximumValueIsChanging (double value)
 
void valuesChanged (double minValue, double maxValue)
 
void rangeChanged (double min, double max)
 

Public Member Functions

 DoubleRangeWidget (QWidget *parent=0)
 
virtual ~DoubleRangeWidget ()
 Destructor.
 
virtual double minimum () const
 
virtual void setMinimum (double minimum)
 
virtual double maximum () const
 
virtual void setMaximum (double maximum)
 
virtual void setRange (double min, double max)
 
virtual void range (double minimumAndMaximum[2]) const
 
virtual double minimumValue () const
 
virtual double maximumValue () const
 
virtual void values (double &minValue, double &maxValue) const
 
virtual double singleStep () const
 
virtual void setSingleStep (double step)
 
virtual int decimals () const
 This property holds the precision of the spin box, in decimals.
 
virtual QString prefix () const
 
virtual void setPrefix (const QString &prefix)
 
virtual QString suffix () const
 
virtual void setSuffix (const QString &suffix)
 
virtual double tickInterval () const
 
virtual void setTickInterval (double 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 DoubleRangeSliderslider () const
 
virtual DoubleSpinBoxminimumSpinBox () const
 
virtual DoubleSpinBoxmaximumSpinBox () const
 
virtual void setValueProxy (ValueProxy *proxy)
 
virtual ValueProxyvalueProxy () const
 

Protected Slots

virtual void startChanging ()
 
virtual void stopChanging ()
 
virtual void changeValues (double newMinValue, double newMaxValue)
 
virtual void changeMinimumValue (double value)
 
virtual void changeMaximumValue (double value)
 
virtual void setSliderValues ()
 A spinbox value has been modified, update the slider.
 
virtual void setMinimumToMaximumSpinBox (double minimum)
 
virtual void setMaximumToMinimumSpinBox (double maximum)
 
virtual void onSliderRangeChanged (double min, double max)
 
virtual void onValueProxyAboutToBeModified ()
 
virtual void onValueProxyModified ()
 

Protected Member Functions

virtual bool eventFilter (QObject *obj, QEvent *event)
 
virtual void setSlider (DoubleRangeSlider *slider)
 can be used to change the slider by a custom one
 

Protected Attributes

QScopedPointer< DoubleRangeWidgetPrivated_ptr
 

Properties

int decimals
 
double singleStep
 
double minimum
 
double maximum
 
double minimumValue
 
double maximumValue
 
QString prefix
 
QString suffix
 
double tickInterval
 
bool autoSpinBoxWidth
 
Qt::Alignment spinBoxTextAlignment
 
Qt::Alignment spinBoxAlignment
 
bool tracking
 
bool symmetricMoves
 

Private Member Functions

 Q_DECLARE_PRIVATE (DoubleRangeWidget)
 
 Q_DISABLE_COPY (DoubleRangeWidget)
 

Detailed Description

DoubleRangeWidget is a wrapper around a DoubleRangeSlider and 2 QSpinBoxes

RangeWidget.png
See also
ctkSliderSpinBoxWidget, DoubleRangeSlider, QSpinBox

Constructor & Destructor Documentation

DoubleRangeWidget::DoubleRangeWidget ( QWidget *  parent = 0)
explicit

Constructor If

  • parent is null, DoubleRangeWidget will be a top-leve widget
    Note
    The
  • parent can be set later using QWidget::setParent()

Member Function Documentation

bool DoubleRangeWidget::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 double DoubleRangeWidget::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.

DoubleSpinBox * DoubleRangeWidget::maximumSpinBox ( ) const
virtual

Return the maximum spinbox.

See also
minimumSpinBox(), slider()
virtual double DoubleRangeWidget::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 double DoubleRangeWidget::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.

DoubleSpinBox * DoubleRangeWidget::minimumSpinBox ( ) const
virtual

Return the minimum spinbox.

See also
maximumSpinBox(), slider()
virtual double DoubleRangeWidget::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 DoubleRangeWidget::minimumValueChanged ( double  value)
signal

Use with care: sliderMoved is emitted only when the user moves the slider

virtual QString DoubleRangeWidget::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

void DoubleRangeWidget::setDecimals ( int  decimals)
virtualslot

Sets how many decimals the spinbox will use for displaying and interpreting doubles.

void DoubleRangeWidget::setRange ( double  min,
double  max 
)
virtual

Description Utility function that set the min/max in once

void DoubleRangeWidget::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 DoubleRangeWidget::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 DoubleRangeWidget::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 DoubleRangeWidget::setValueProxy ( ValueProxy proxy)
virtual

Set/Get the value proxy of the slider and spinboxes.

See also
setValueProxy(), valueProxy()
virtual double DoubleRangeWidget::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.

DoubleRangeSlider * DoubleRangeWidget::slider ( ) const
virtual

Return the slider of the range widget.

See also
minimumSpinBox(), maximumSpinBox()
virtual QString DoubleRangeWidget::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 DoubleRangeWidget::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 double DoubleRangeWidget::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 DoubleRangeWidget::values ( double &  minValue,
double &  maxValue 
) const
virtual

Utility function that returns both values at the same time Returns minimumValue and maximumValue


The documentation for this class was generated from the following files: