ParaView
Public Types | Public Slots | Signals | Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes | Properties | List of all members
ctkDoubleRangeSlider Class Reference

ctkDoubleRangeSlider is a slider that controls 2 numbers as double. More...

#include <ctkDoubleRangeSlider.h>

Inherits QWidget.

Public Types

typedef QWidget Superclass
 

Public Slots

void setMinimumValue (double minVal)
 This property holds the slider's current minimum value. More...
 
void setMaximumValue (double maxVal)
 This property holds the slider's current maximum value. More...
 
void setValues (double minVal, double maxVal)
 Utility function that set the minimum value and maximum value at once. More...
 

Signals

void minimumValueChanged (double minVal)
 This signal is emitted when the slider minimum value has changed, with the new slider value as argument. More...
 
void maximumValueChanged (double maxVal)
 This signal is emitted when the slider maximum value has changed, with the new slider value as argument. More...
 
void valuesChanged (double minVal, double maxVal)
 Utility signal that is fired when minimum or maximum values have changed. More...
 
void minimumPositionChanged (double minPos)
 This signal is emitted when sliderDown is true and the slider moves. More...
 
void maximumPositionChanged (double maxPos)
 This signal is emitted when sliderDown is true and the slider moves. More...
 
void positionsChanged (double minPos, double maxPos)
 Utility signal that is fired when minimum or maximum positions have changed. More...
 
void sliderPressed ()
 This signal is emitted when the user presses one slider with the mouse, or programmatically when setSliderDown(true) is called. More...
 
void sliderReleased ()
 This signal is emitted when the user releases one slider with the mouse, or programmatically when setSliderDown(false) is called. More...
 
void rangeChanged (double min, double max)
 This signal is emitted when the slider range has changed, with min being the new minimum, and max being the new maximum. More...
 

Public Member Functions

 ctkDoubleRangeSlider (Qt::Orientation o, QWidget *par=0)
 Constructor, builds a ctkDoubleRangeSlider whose default values are the same as ctkRangeSlider. More...
 
 ctkDoubleRangeSlider (QWidget *par=0)
 Constructor, builds a ctkDoubleRangeSlider whose default values are the same as ctkRangeSlider. More...
 
virtual ~ctkDoubleRangeSlider ()
 Destructor. More...
 
void setSingleStep (double ss)
 This property holds the single step. More...
 
double singleStep () const
 
void setTickInterval (double ti)
 This property holds the interval between tickmarks. More...
 
double tickInterval () const
 
void setTickPosition (QSlider::TickPosition position)
 This property holds the tickmark position for this slider. More...
 
QSlider::TickPosition tickPosition () const
 
double minimum () const
 This property holds the sliders's minimum value. More...
 
void setMinimum (double min)
 
double maximum () const
 This property holds the slider's maximum value. More...
 
void setMaximum (double max)
 
void setRange (double min, double max)
 Sets the slider's minimum to min and its maximum to max. More...
 
double minimumValue () const
 This property holds the slider's current minimum value. More...
 
double maximumValue () const
 This property holds the slider's current maximum value. More...
 
double minimumPosition () const
 This property holds the current slider minimum position. More...
 
void setMinimumPosition (double minPos)
 
double maximumPosition () const
 This property holds the current slider maximum position. More...
 
void setMaximumPosition (double maxPos)
 
void setPositions (double minPos, double maxPos)
 Utility function that set the minimum position and maximum position at once. More...
 
void setTracking (bool enable)
 This property holds whether slider tracking is enabled. More...
 
bool hasTracking () const
 
void triggerAction (QAbstractSlider::SliderAction action)
 Triggers a slider action on the current slider. More...
 
Qt::Orientation orientation () const
 This property holds the orientation of the slider. More...
 
void setOrientation (Qt::Orientation orientation)
 
bool symmetricMoves () const
 When symmetricMoves is true, moving a handle will move the other handle symmetrically, otherwise the handles are independent. More...
 
void setSymmetricMoves (bool symmetry)
 

Protected Slots

void onValuesChanged (int min, int max)
 
void onMinPosChanged (int value)
 
void onMaxPosChanged (int value)
 
void onPositionsChanged (int min, int max)
 
void onRangeChanged (int min, int max)
 

Protected Member Functions

ctkRangeSliderslider () const
 
void setSlider (ctkRangeSlider *slider)
 Subclasses can change the internal slider. More...
 

Protected Attributes

QScopedPointer< ctkDoubleRangeSliderPrivate > d_ptr
 

Properties

double minimum
 
double maximum
 
double singleStep
 
double minimumValue
 
double maximumValue
 
double minimumPosition
 
double maximumPosition
 
bool tracking
 
Qt::Orientation orientation
 
double tickInterval
 
QSlider::TickPosition tickPosition
 
bool symmetricMoves
 

Detailed Description

ctkDoubleRangeSlider is a slider that controls 2 numbers as double.

ctkDoubleRangeSlider internally aggregates a ctkRangeSlider (not in the API to prevent misuse). Only subclasses can have access to it.

See also
ctkRangeSlider, ctkDoubleSlider, ctkRangeWidget

Definition at line 72 of file ctkDoubleRangeSlider.h.

Member Typedef Documentation

◆ Superclass

Definition at line 89 of file ctkDoubleRangeSlider.h.

Constructor & Destructor Documentation

◆ ctkDoubleRangeSlider() [1/2]

ctkDoubleRangeSlider::ctkDoubleRangeSlider ( Qt::Orientation  o,
QWidget *  par = 0 
)

Constructor, builds a ctkDoubleRangeSlider whose default values are the same as ctkRangeSlider.

◆ ctkDoubleRangeSlider() [2/2]

ctkDoubleRangeSlider::ctkDoubleRangeSlider ( QWidget *  par = 0)

Constructor, builds a ctkDoubleRangeSlider whose default values are the same as ctkRangeSlider.

◆ ~ctkDoubleRangeSlider()

virtual ctkDoubleRangeSlider::~ctkDoubleRangeSlider ( )
virtual

Destructor.

Member Function Documentation

◆ setSingleStep()

void ctkDoubleRangeSlider::setSingleStep ( double  ss)

This property holds the single step.

The smaller of two natural steps that an abstract sliders provides and typically corresponds to the user pressing an arrow key

◆ singleStep()

double ctkDoubleRangeSlider::singleStep ( ) const

◆ setTickInterval()

void ctkDoubleRangeSlider::setTickInterval ( double  ti)

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.

◆ tickInterval()

double ctkDoubleRangeSlider::tickInterval ( ) const

◆ setTickPosition()

void ctkDoubleRangeSlider::setTickPosition ( QSlider::TickPosition  position)

This property holds the tickmark position for this slider.

The valid values are described by the QSlider::TickPosition enum. The default value is QSlider::NoTicks.

◆ tickPosition()

QSlider::TickPosition ctkDoubleRangeSlider::tickPosition ( ) const

◆ minimum()

double ctkDoubleRangeSlider::minimum ( ) const

This property holds the sliders's minimum value.

When setting this property, the maximum is adjusted if necessary to ensure that the range remains valid. Also the slider's current values are adjusted to be within the new range.

◆ setMinimum()

void ctkDoubleRangeSlider::setMinimum ( double  min)

◆ maximum()

double ctkDoubleRangeSlider::maximum ( ) const

This property holds the slider's maximum value.

When setting this property, the minimum is adjusted if necessary to ensure that the range remains valid. Also the slider's current values are adjusted to be within the new range.

◆ setMaximum()

void ctkDoubleRangeSlider::setMaximum ( double  max)

◆ setRange()

void ctkDoubleRangeSlider::setRange ( double  min,
double  max 
)

Sets the slider's minimum to min and its maximum to max.

If max is smaller than min, min becomes the only legal value.

◆ minimumValue()

double ctkDoubleRangeSlider::minimumValue ( ) const

This property holds the slider's current minimum value.

The slider forces the minimum value to be within the legal range: minimum <= minvalue <= maxvalue <= maximum. Changing the minimumValue also changes the minimumPosition.

◆ maximumValue()

double ctkDoubleRangeSlider::maximumValue ( ) const

This property holds the slider's current maximum value.

The slider forces the maximum value to be within the legal range: minimum <= minvalue <= maxvalue <= maximum. Changing the maximumValue also changes the maximumPosition.

◆ minimumPosition()

double ctkDoubleRangeSlider::minimumPosition ( ) const

This property holds the current slider minimum position.

If tracking is enabled (the default), this is identical to minimumValue.

◆ setMinimumPosition()

void ctkDoubleRangeSlider::setMinimumPosition ( double  minPos)

◆ maximumPosition()

double ctkDoubleRangeSlider::maximumPosition ( ) const

This property holds the current slider maximum position.

If tracking is enabled (the default), this is identical to maximumValue.

◆ setMaximumPosition()

void ctkDoubleRangeSlider::setMaximumPosition ( double  maxPos)

◆ setPositions()

void ctkDoubleRangeSlider::setPositions ( double  minPos,
double  maxPos 
)

Utility function that set the minimum position and maximum position at once.

◆ setTracking()

void ctkDoubleRangeSlider::setTracking ( bool  enable)

This property holds whether slider tracking is enabled.

If tracking is enabled (the default), the slider emits the minimumValueChanged() signal while the left/bottom handler is being dragged and the slider emits the maximumValueChanged() signal while the right/top handler is being dragged. If tracking is disabled, the slider emits the minimumValueChanged() and maximumValueChanged() signals only when the user releases the slider.

◆ hasTracking()

bool ctkDoubleRangeSlider::hasTracking ( ) const

◆ triggerAction()

void ctkDoubleRangeSlider::triggerAction ( QAbstractSlider::SliderAction  action)

Triggers a slider action on the current slider.

Possible actions are SliderSingleStepAdd, SliderSingleStepSub, SliderPageStepAdd, SliderPageStepSub, SliderToMinimum, SliderToMaximum, and SliderMove.

◆ orientation()

Qt::Orientation ctkDoubleRangeSlider::orientation ( ) const

This property holds the orientation of the slider.

The orientation must be Qt::Vertical (the default) or Qt::Horizontal.

◆ setOrientation()

void ctkDoubleRangeSlider::setOrientation ( Qt::Orientation  orientation)

◆ symmetricMoves()

bool ctkDoubleRangeSlider::symmetricMoves ( ) const

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

False by default

◆ setSymmetricMoves()

void ctkDoubleRangeSlider::setSymmetricMoves ( bool  symmetry)

◆ minimumValueChanged

void ctkDoubleRangeSlider::minimumValueChanged ( double  minVal)
signal

This signal is emitted when the slider minimum value has changed, with the new slider value as argument.

◆ maximumValueChanged

void ctkDoubleRangeSlider::maximumValueChanged ( double  maxVal)
signal

This signal is emitted when the slider maximum value has changed, with the new slider value as argument.

◆ valuesChanged

void ctkDoubleRangeSlider::valuesChanged ( double  minVal,
double  maxVal 
)
signal

Utility signal that is fired when minimum or maximum values have changed.

◆ minimumPositionChanged

void ctkDoubleRangeSlider::minimumPositionChanged ( double  minPos)
signal

This signal is emitted when sliderDown is true and the slider moves.

This usually happens when the user is dragging the minimum slider. The value is the new slider minimum position. This signal is emitted even when tracking is turned off.

◆ maximumPositionChanged

void ctkDoubleRangeSlider::maximumPositionChanged ( double  maxPos)
signal

This signal is emitted when sliderDown is true and the slider moves.

This usually happens when the user is dragging the maximum slider. The value is the new slider maximum position. This signal is emitted even when tracking is turned off.

◆ positionsChanged

void ctkDoubleRangeSlider::positionsChanged ( double  minPos,
double  maxPos 
)
signal

Utility signal that is fired when minimum or maximum positions have changed.

◆ sliderPressed

void ctkDoubleRangeSlider::sliderPressed ( )
signal

This signal is emitted when the user presses one slider with the mouse, or programmatically when setSliderDown(true) is called.

◆ sliderReleased

void ctkDoubleRangeSlider::sliderReleased ( )
signal

This signal is emitted when the user releases one slider with the mouse, or programmatically when setSliderDown(false) is called.

◆ rangeChanged

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

This signal is emitted when the slider range has changed, with min being the new minimum, and max being the new maximum.

Warning: don't confound with valuesChanged(double, double);

See also
QAbstractSlider::rangeChanged()

◆ setMinimumValue

void ctkDoubleRangeSlider::setMinimumValue ( double  minVal)
slot

This property holds the slider's current minimum value.

The slider forces the minimum value to be within the legal range: minimum <= minvalue <= maxvalue <= maximum. Changing the minimumValue also changes the minimumPosition.

◆ setMaximumValue

void ctkDoubleRangeSlider::setMaximumValue ( double  maxVal)
slot

This property holds the slider's current maximum value.

The slider forces the maximum value to be within the legal range: minimum <= minvalue <= maxvalue <= maximum. Changing the maximumValue also changes the maximumPosition.

◆ setValues

void ctkDoubleRangeSlider::setValues ( double  minVal,
double  maxVal 
)
slot

Utility function that set the minimum value and maximum value at once.

◆ onValuesChanged

void ctkDoubleRangeSlider::onValuesChanged ( int  min,
int  max 
)
protectedslot

◆ onMinPosChanged

void ctkDoubleRangeSlider::onMinPosChanged ( int  value)
protectedslot

◆ onMaxPosChanged

void ctkDoubleRangeSlider::onMaxPosChanged ( int  value)
protectedslot

◆ onPositionsChanged

void ctkDoubleRangeSlider::onPositionsChanged ( int  min,
int  max 
)
protectedslot

◆ onRangeChanged

void ctkDoubleRangeSlider::onRangeChanged ( int  min,
int  max 
)
protectedslot

◆ slider()

ctkRangeSlider* ctkDoubleRangeSlider::slider ( ) const
protected

◆ setSlider()

void ctkDoubleRangeSlider::setSlider ( ctkRangeSlider slider)
protected

Subclasses can change the internal slider.

Member Data Documentation

◆ d_ptr

QScopedPointer<ctkDoubleRangeSliderPrivate> ctkDoubleRangeSlider::d_ptr
protected

Definition at line 350 of file ctkDoubleRangeSlider.h.

Property Documentation

◆ minimum

double ctkDoubleRangeSlider::minimum
readwrite

Definition at line 75 of file ctkDoubleRangeSlider.h.

◆ maximum

double ctkDoubleRangeSlider::maximum
readwrite

Definition at line 76 of file ctkDoubleRangeSlider.h.

◆ singleStep

double ctkDoubleRangeSlider::singleStep
readwrite

Definition at line 77 of file ctkDoubleRangeSlider.h.

◆ minimumValue

double ctkDoubleRangeSlider::minimumValue
readwrite

Definition at line 78 of file ctkDoubleRangeSlider.h.

◆ maximumValue

double ctkDoubleRangeSlider::maximumValue
readwrite

Definition at line 79 of file ctkDoubleRangeSlider.h.

◆ minimumPosition

double ctkDoubleRangeSlider::minimumPosition
readwrite

Definition at line 80 of file ctkDoubleRangeSlider.h.

◆ maximumPosition

double ctkDoubleRangeSlider::maximumPosition
readwrite

Definition at line 81 of file ctkDoubleRangeSlider.h.

◆ tracking

bool ctkDoubleRangeSlider::tracking
readwrite

Definition at line 82 of file ctkDoubleRangeSlider.h.

◆ orientation

Qt::Orientation ctkDoubleRangeSlider::orientation
readwrite

Definition at line 83 of file ctkDoubleRangeSlider.h.

◆ tickInterval

double ctkDoubleRangeSlider::tickInterval
readwrite

Definition at line 84 of file ctkDoubleRangeSlider.h.

◆ tickPosition

QSlider::TickPosition ctkDoubleRangeSlider::tickPosition
readwrite

Definition at line 85 of file ctkDoubleRangeSlider.h.

◆ symmetricMoves

bool ctkDoubleRangeSlider::symmetricMoves
readwrite

Definition at line 86 of file ctkDoubleRangeSlider.h.


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