CTK  0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 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 setMaximum (double maximum)
 
virtual void setMinimum (double minimum)
 
virtual void setPrefix (const QString &prefix)
 
virtual 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
 
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

CtkRangeWidget.png
See also
ctkSliderSpinBoxWidget, ctkDoubleRangeSlider, QSpinBox

Definition at line 42 of file ctkRangeWidget.h.

Member Typedef Documentation

typedef QWidget ctkRangeWidget::Superclass

Superclass typedef.

Definition at line 62 of file ctkRangeWidget.h.

Constructor & Destructor Documentation

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()
virtual ctkRangeWidget::~ctkRangeWidget ( )
virtual

Destructor.

Member Function Documentation

virtual void ctkRangeWidget::changeMaximumValue ( double  value)
protectedvirtualslot
virtual void ctkRangeWidget::changeMinimumValue ( double  value)
protectedvirtualslot
virtual void ctkRangeWidget::changeValues ( double  newMinValue,
double  newMaxValue 
)
protectedvirtualslot
virtual int ctkRangeWidget::decimals ( ) const
virtual

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

virtual bool ctkRangeWidget::eventFilter ( QObject *  obj,
QEvent *  event 
)
protectedvirtual
virtual bool ctkRangeWidget::hasTracking ( ) const
virtual
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

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.

virtual ctkDoubleSpinBox* ctkRangeWidget::maximumSpinBox ( ) const
virtual

Return the maximum spinbox.

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

void ctkRangeWidget::maximumValueChanged ( double  value)
signal
void ctkRangeWidget::maximumValueIsChanging ( double  value)
signal
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.

virtual ctkDoubleSpinBox* ctkRangeWidget::minimumSpinBox ( ) const
virtual

Return the minimum spinbox.

See also
maximumSpinBox(), slider()
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.

void ctkRangeWidget::minimumValueChanged ( double  value)
signal

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

void ctkRangeWidget::minimumValueIsChanging ( double  value)
signal
virtual void ctkRangeWidget::onSliderRangeChanged ( double  min,
double  max 
)
protectedvirtualslot
virtual void ctkRangeWidget::onValueProxyAboutToBeModified ( )
protectedvirtualslot
virtual void ctkRangeWidget::onValueProxyModified ( )
protectedvirtualslot
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

virtual void ctkRangeWidget::range ( double  minimumAndMaximum[2]) const
virtual
void ctkRangeWidget::rangeChanged ( double  min,
double  max 
)
signal
virtual void ctkRangeWidget::reset ( )
virtualslot

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

virtual void ctkRangeWidget::setAutoSpinBoxWidth ( bool  autoWidth)
virtual
virtual void ctkRangeWidget::setDecimals ( int  decimals)
virtualslot

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

virtual void ctkRangeWidget::setMaximum ( double  maximum)
virtual
virtual void ctkRangeWidget::setMaximumToMinimumSpinBox ( double  maximum)
protectedvirtualslot
virtual void ctkRangeWidget::setMaximumValue ( double  value)
virtualslot
virtual void ctkRangeWidget::setMinimum ( double  minimum)
virtual
virtual void ctkRangeWidget::setMinimumToMaximumSpinBox ( double  minimum)
protectedvirtualslot
virtual void ctkRangeWidget::setMinimumValue ( double  value)
virtualslot
virtual void ctkRangeWidget::setPrefix ( const QString &  prefix)
virtual
virtual void ctkRangeWidget::setRange ( double  min,
double  max 
)
virtual

Description Utility function that set the min/max in once

virtual void ctkRangeWidget::setSingleStep ( double  step)
virtual
virtual void ctkRangeWidget::setSlider ( ctkDoubleRangeSlider slider)
protectedvirtual

can be used to change the slider by a custom one

virtual void ctkRangeWidget::setSliderValues ( )
protectedvirtualslot

A spinbox value has been modified, update the slider.

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

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

virtual void ctkRangeWidget::setSuffix ( const QString &  suffix)
virtual
virtual void ctkRangeWidget::setSymmetricMoves ( bool  symmetry)
virtual
virtual void ctkRangeWidget::setTickInterval ( double  ti)
virtual
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.

virtual void ctkRangeWidget::setValueProxy ( ctkValueProxy proxy)
virtual

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

See also
setValueProxy(), valueProxy()
virtual void ctkRangeWidget::setValues ( double  minValue,
double  maxValue 
)
virtualslot

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

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.

virtual ctkDoubleRangeSlider* ctkRangeWidget::slider ( ) const
virtual

Return the slider of the range widget.

See also
minimumSpinBox(), maximumSpinBox()
virtual Qt::Alignment ctkRangeWidget::spinBoxAlignment ( ) const
virtual
virtual Qt::Alignment ctkRangeWidget::spinBoxTextAlignment ( ) const
virtual
virtual void ctkRangeWidget::startChanging ( )
protectedvirtualslot
virtual void ctkRangeWidget::stopChanging ( )
protectedvirtualslot
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

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

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.

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

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

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

Member Data Documentation

QScopedPointer<ctkRangeWidgetPrivate> ctkRangeWidget::d_ptr
protected

Definition at line 244 of file ctkRangeWidget.h.

Property Documentation

bool ctkRangeWidget::autoSpinBoxWidth
readwrite

Definition at line 54 of file ctkRangeWidget.h.

int ctkRangeWidget::decimals
readwrite

Definition at line 45 of file ctkRangeWidget.h.

double ctkRangeWidget::maximum
readwrite

Definition at line 48 of file ctkRangeWidget.h.

double ctkRangeWidget::maximumValue
readwrite

Definition at line 50 of file ctkRangeWidget.h.

double ctkRangeWidget::minimum
readwrite

Definition at line 47 of file ctkRangeWidget.h.

double ctkRangeWidget::minimumValue
readwrite

Definition at line 49 of file ctkRangeWidget.h.

QString ctkRangeWidget::prefix
readwrite

Definition at line 51 of file ctkRangeWidget.h.

double ctkRangeWidget::singleStep
readwrite

Definition at line 46 of file ctkRangeWidget.h.

Qt::Alignment ctkRangeWidget::spinBoxAlignment
readwrite

Definition at line 56 of file ctkRangeWidget.h.

Qt::Alignment ctkRangeWidget::spinBoxTextAlignment
readwrite

Definition at line 55 of file ctkRangeWidget.h.

QString ctkRangeWidget::suffix
readwrite

Definition at line 52 of file ctkRangeWidget.h.

bool ctkRangeWidget::symmetricMoves
readwrite

Definition at line 58 of file ctkRangeWidget.h.

double ctkRangeWidget::tickInterval
readwrite

Definition at line 53 of file ctkRangeWidget.h.

bool ctkRangeWidget::tracking
readwrite

Definition at line 57 of file ctkRangeWidget.h.


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