CTK  0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
Public Types | Public Slots | Signals | Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes | Properties | List of all members
ctkRangeWidget Class Reference

#include <Libs/Widgets/ctkRangeWidget.h>

Inheritance diagram for ctkRangeWidget:
Inheritance graph
[legend]
Collaboration diagram for ctkRangeWidget:
Collaboration graph
[legend]

Public Types

typedef QWidget Superclass
 Superclass typedef. More...
 

Public Slots

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

Signals

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

Public Member Functions

 ctkRangeWidget (QWidget *parent=0)
 
virtual double customSpinBoxesLimitsMax () const
 
virtual double customSpinBoxesLimitsMin () const
 
virtual int decimals () const
 This property holds the precision of the spin box, in decimals. More...
 
virtual bool hasTracking () const
 
virtual bool isAutoSpinBoxWidth () const
 
virtual double maximum () const
 
virtual ctkDoubleSpinBoxmaximumSpinBox () const
 
virtual double maximumValue () const
 
virtual double minimum () const
 
virtual ctkDoubleSpinBoxminimumSpinBox () const
 
virtual double minimumValue () const
 
virtual QString prefix () const
 
virtual void range (double minimumAndMaximum[2]) const
 
virtual void setAutoSpinBoxWidth (bool autoWidth)
 
virtual void setCustomSpinBoxesLimits (double min, double max)
 This property sets custom limits for spin boxes. More...
 
virtual void setMaximum (double maximum)
 
virtual void setMinimum (double minimum)
 
virtual void setPrefix (const QString &prefix)
 
virtual Q_INVOKABLE void setRange (double min, double max)
 
virtual void setSingleStep (double step)
 
virtual void setSpinBoxAlignment (Qt::Alignment alignment)
 
virtual void setSpinBoxTextAlignment (Qt::Alignment alignment)
 
virtual void setSuffix (const QString &suffix)
 
virtual void setSymmetricMoves (bool symmetry)
 
virtual void setTickInterval (double ti)
 
virtual void setTracking (bool enable)
 
virtual void setValueProxy (ctkValueProxy *proxy)
 
virtual double singleStep () const
 
virtual ctkDoubleRangeSliderslider () const
 
virtual Qt::Alignment spinBoxAlignment () const
 
virtual Qt::Alignment spinBoxTextAlignment () const
 
virtual QString suffix () const
 
virtual bool symmetricMoves () const
 
virtual double tickInterval () const
 
virtual ctkValueProxyvalueProxy () const
 
virtual void values (double &minValue, double &maxValue) const
 
virtual ~ctkRangeWidget ()
 Destructor. More...
 

Protected Slots

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

Protected Member Functions

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

Protected Attributes

QScopedPointer< ctkRangeWidgetPrivate > d_ptr
 

Properties

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

Detailed Description

ctkRangeWidget is a wrapper around a ctkDoubleRangeSlider and 2 QSpinBoxes

See also
ctkSliderSpinBoxWidget, ctkDoubleRangeSlider, QSpinBox

Definition at line 42 of file ctkRangeWidget.h.

Member Typedef Documentation

◆ Superclass

typedef QWidget ctkRangeWidget::Superclass

Superclass typedef.

Definition at line 64 of file ctkRangeWidget.h.

Constructor & Destructor Documentation

◆ ctkRangeWidget()

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

Constructor If

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

◆ ~ctkRangeWidget()

virtual ctkRangeWidget::~ctkRangeWidget ( )
virtual

Destructor.

Member Function Documentation

◆ changeMaximumValue

virtual void ctkRangeWidget::changeMaximumValue ( double  value)
protectedvirtualslot

◆ changeMinimumValue

virtual void ctkRangeWidget::changeMinimumValue ( double  value)
protectedvirtualslot

◆ changeValues

virtual void ctkRangeWidget::changeValues ( double  newMinValue,
double  newMaxValue 
)
protectedvirtualslot

◆ customSpinBoxesLimitsMax()

virtual double ctkRangeWidget::customSpinBoxesLimitsMax ( ) const
virtual

◆ customSpinBoxesLimitsMin()

virtual double ctkRangeWidget::customSpinBoxesLimitsMin ( ) const
virtual

◆ decimals()

virtual int ctkRangeWidget::decimals ( ) const
virtual

This property holds the precision of the spin box, in decimals.

◆ eventFilter()

virtual bool ctkRangeWidget::eventFilter ( QObject *  obj,
QEvent *  event 
)
protectedvirtual

◆ hasTracking()

virtual bool ctkRangeWidget::hasTracking ( ) const
virtual

◆ isAutoSpinBoxWidth()

virtual bool ctkRangeWidget::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

◆ maximum()

virtual double ctkRangeWidget::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.

◆ maximumSpinBox()

virtual ctkDoubleSpinBox* ctkRangeWidget::maximumSpinBox ( ) const
virtual

Return the maximum spinbox.

See also
minimumSpinBox(), slider()

◆ maximumValue()

virtual double ctkRangeWidget::maximumValue ( ) const
virtual

This property holds the slider and spinbox maximum value. ctkRangeWidget forces the value to be within the legal range: minimum <= minimumValue <= maximumValue <= maximum.

◆ maximumValueChanged

void ctkRangeWidget::maximumValueChanged ( double  value)
signal

◆ maximumValueIsChanging

void ctkRangeWidget::maximumValueIsChanging ( double  value)
signal

◆ minimum()

virtual double ctkRangeWidget::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.

◆ minimumSpinBox()

virtual ctkDoubleSpinBox* ctkRangeWidget::minimumSpinBox ( ) const
virtual

Return the minimum spinbox.

See also
maximumSpinBox(), slider()

◆ minimumValue()

virtual double ctkRangeWidget::minimumValue ( ) const
virtual

This property holds the slider and spinbox minimum value. ctkRangeWidget forces the value to be within the legal range: minimum <= minimumValue <= maximumValue <= maximum.

◆ minimumValueChanged

void ctkRangeWidget::minimumValueChanged ( double  value)
signal

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

◆ minimumValueIsChanging

void ctkRangeWidget::minimumValueIsChanging ( double  value)
signal

◆ onSliderRangeChanged

virtual void ctkRangeWidget::onSliderRangeChanged ( double  min,
double  max 
)
protectedvirtualslot

◆ onValueProxyAboutToBeModified

virtual void ctkRangeWidget::onValueProxyAboutToBeModified ( )
protectedvirtualslot

◆ onValueProxyModified

virtual void ctkRangeWidget::onValueProxyModified ( )
protectedvirtualslot

◆ prefix()

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

◆ range()

virtual void ctkRangeWidget::range ( double  minimumAndMaximum[2]) const
virtual

◆ rangeChanged

void ctkRangeWidget::rangeChanged ( double  min,
double  max 
)
signal

◆ reset

virtual void ctkRangeWidget::reset ( )
virtualslot

Reset the slider and spinbox to zero (value and position)

◆ setAutoSpinBoxWidth()

virtual void ctkRangeWidget::setAutoSpinBoxWidth ( bool  autoWidth)
virtual

◆ setCustomSpinBoxesLimits()

virtual void ctkRangeWidget::setCustomSpinBoxesLimits ( double  min,
double  max 
)
virtual

This property sets custom limits for spin boxes.

◆ setDecimals

virtual void ctkRangeWidget::setDecimals ( int  decimals)
virtualslot

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

◆ setMaximum()

virtual void ctkRangeWidget::setMaximum ( double  maximum)
virtual

◆ setMaximumToMinimumSpinBox

virtual void ctkRangeWidget::setMaximumToMinimumSpinBox ( double  maximum)
protectedvirtualslot

◆ setMaximumValue

virtual void ctkRangeWidget::setMaximumValue ( double  value)
virtualslot

◆ setMinimum()

virtual void ctkRangeWidget::setMinimum ( double  minimum)
virtual

◆ setMinimumToMaximumSpinBox

virtual void ctkRangeWidget::setMinimumToMaximumSpinBox ( double  minimum)
protectedvirtualslot

◆ setMinimumValue

virtual void ctkRangeWidget::setMinimumValue ( double  value)
virtualslot

◆ setPrefix()

virtual void ctkRangeWidget::setPrefix ( const QString &  prefix)
virtual

◆ setRange()

virtual Q_INVOKABLE void ctkRangeWidget::setRange ( double  min,
double  max 
)
virtual

Description Utility function that set the min/max in once

◆ setSingleStep()

virtual void ctkRangeWidget::setSingleStep ( double  step)
virtual

◆ setSlider()

virtual void ctkRangeWidget::setSlider ( ctkDoubleRangeSlider slider)
protectedvirtual

can be used to change the slider by a custom one

◆ setSliderValues

virtual void ctkRangeWidget::setSliderValues ( )
protectedvirtualslot

A spinbox value has been modified, update the slider.

◆ setSpinBoxAlignment()

virtual void ctkRangeWidget::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

◆ setSpinBoxTextAlignment()

virtual void ctkRangeWidget::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

◆ setSuffix()

virtual void ctkRangeWidget::setSuffix ( const QString &  suffix)
virtual

◆ setSymmetricMoves()

virtual void ctkRangeWidget::setSymmetricMoves ( bool  symmetry)
virtual

◆ setTickInterval()

virtual void ctkRangeWidget::setTickInterval ( double  ti)
virtual

◆ setTracking()

virtual void ctkRangeWidget::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.

◆ setValueProxy()

virtual void ctkRangeWidget::setValueProxy ( ctkValueProxy proxy)
virtual

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

See also
setValueProxy(), valueProxy()

◆ setValues

virtual void ctkRangeWidget::setValues ( double  minValue,
double  maxValue 
)
virtualslot

Utility function that set the min and max values at once.

◆ singleStep()

virtual double ctkRangeWidget::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.

◆ slider()

virtual ctkDoubleRangeSlider* ctkRangeWidget::slider ( ) const
virtual

Return the slider of the range widget.

See also
minimumSpinBox(), maximumSpinBox()

◆ spinBoxAlignment()

virtual Qt::Alignment ctkRangeWidget::spinBoxAlignment ( ) const
virtual

◆ spinBoxTextAlignment()

virtual Qt::Alignment ctkRangeWidget::spinBoxTextAlignment ( ) const
virtual

◆ startChanging

virtual void ctkRangeWidget::startChanging ( )
protectedvirtualslot

◆ stopChanging

virtual void ctkRangeWidget::stopChanging ( )
protectedvirtualslot

◆ suffix()

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

◆ symmetricMoves()

virtual bool ctkRangeWidget::symmetricMoves ( ) const
virtual

When symmetricMoves is true, moving a handle will move the other handle symmetrically, otherwise the handles are independent. False by default

◆ tickInterval()

virtual double ctkRangeWidget::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.

◆ valueProxy()

virtual ctkValueProxy* ctkRangeWidget::valueProxy ( ) const
virtual

◆ values()

virtual void ctkRangeWidget::values ( double &  minValue,
double &  maxValue 
) const
virtual

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

◆ valuesChanged

void ctkRangeWidget::valuesChanged ( double  minValue,
double  maxValue 
)
signal

Member Data Documentation

◆ d_ptr

QScopedPointer<ctkRangeWidgetPrivate> ctkRangeWidget::d_ptr
protected

Definition at line 252 of file ctkRangeWidget.h.

Property Documentation

◆ autoSpinBoxWidth

bool ctkRangeWidget::autoSpinBoxWidth
readwrite

Definition at line 1 of file ctkRangeWidget.h.

◆ customSpinBoxesLimitsMax

double ctkRangeWidget::customSpinBoxesLimitsMax
read

Definition at line 1 of file ctkRangeWidget.h.

◆ customSpinBoxesLimitsMin

double ctkRangeWidget::customSpinBoxesLimitsMin
read

Definition at line 1 of file ctkRangeWidget.h.

◆ decimals

int ctkRangeWidget::decimals
readwrite

Definition at line 1 of file ctkRangeWidget.h.

◆ maximum

double ctkRangeWidget::maximum
readwrite

Definition at line 1 of file ctkRangeWidget.h.

◆ maximumValue

double ctkRangeWidget::maximumValue
readwrite

Definition at line 1 of file ctkRangeWidget.h.

◆ minimum

double ctkRangeWidget::minimum
readwrite

Definition at line 1 of file ctkRangeWidget.h.

◆ minimumValue

double ctkRangeWidget::minimumValue
readwrite

Definition at line 1 of file ctkRangeWidget.h.

◆ prefix

QString ctkRangeWidget::prefix
readwrite

Definition at line 1 of file ctkRangeWidget.h.

◆ singleStep

double ctkRangeWidget::singleStep
readwrite

Definition at line 1 of file ctkRangeWidget.h.

◆ spinBoxAlignment

Qt::Alignment ctkRangeWidget::spinBoxAlignment
readwrite

Definition at line 1 of file ctkRangeWidget.h.

◆ spinBoxTextAlignment

Qt::Alignment ctkRangeWidget::spinBoxTextAlignment
readwrite

Definition at line 1 of file ctkRangeWidget.h.

◆ suffix

QString ctkRangeWidget::suffix
readwrite

Definition at line 1 of file ctkRangeWidget.h.

◆ symmetricMoves

bool ctkRangeWidget::symmetricMoves
readwrite

Definition at line 1 of file ctkRangeWidget.h.

◆ tickInterval

double ctkRangeWidget::tickInterval
readwrite

Definition at line 1 of file ctkRangeWidget.h.

◆ tracking

bool ctkRangeWidget::tracking
readwrite

Definition at line 1 of file ctkRangeWidget.h.


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