GOFIGURE2  0.9.0
 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 | Private Member Functions | List of all members
ctkRangeSlider Class Reference

#include <Code/ExternalCode/ctk/ctkRangeSlider.h>

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

Public Types

typedef QSlider Superclass
 

Public Slots

void setMaximumValue (int max)
 
void setMinimumValue (int min)
 
void setValues (int min, int max)
 

Signals

void maximumPositionChanged (int max)
 
void maximumValueChanged (int max)
 
void minimumPositionChanged (int min)
 
void minimumValueChanged (int min)
 
void positionsChanged (int min, int max)
 
void valuesChanged (int min, int max)
 Utility signal that is fired when minimum or maximum values have changed. More...
 

Public Member Functions

 ctkRangeSlider (Qt::Orientation o, QWidget *par=0)
 
 ctkRangeSlider (QWidget *par=0)
 
int maximumPosition () const
 
int maximumValue () const
 
int minimumPosition () const
 
int minimumValue () const
 
void setMaximumPosition (int max)
 
void setMinimumPosition (int min)
 
void setPositions (int min, int max)
 
void setSymmetricMoves (bool symmetry)
 
bool symmetricMoves () const
 
virtual ~ctkRangeSlider ()
 

Protected Slots

void onRangeChanged (int minimum, int maximum)
 

Protected Member Functions

 ctkRangeSlider (ctkRangeSliderPrivate *impl, Qt::Orientation o, QWidget *par=0)
 
 ctkRangeSlider (ctkRangeSliderPrivate *impl, QWidget *par=0)
 
virtual void initMaximumSliderStyleOption (QStyleOptionSlider *option) const
 
virtual void initMinimumSliderStyleOption (QStyleOptionSlider *option) const
 
bool isMaximumSliderDown () const
 
bool isMinimumSliderDown () const
 
virtual void mouseMoveEvent (QMouseEvent *ev)
 
virtual void mousePressEvent (QMouseEvent *ev)
 
virtual void mouseReleaseEvent (QMouseEvent *ev)
 
virtual void paintEvent (QPaintEvent *ev)
 

Protected Attributes

QScopedPointer
< ctkRangeSliderPrivate
d_ptr
 

Properties

int maximumPosition
 
int maximumValue
 
int minimumPosition
 
int minimumValue
 
bool symmetricMoves
 

Private Member Functions

 Q_DECLARE_PRIVATE (ctkRangeSlider)
 
 Q_DISABLE_COPY (ctkRangeSlider)
 

Detailed Description

A ctkRangeSlider is a slider that lets you input 2 values instead of one (see QSlider). These values are typically a lower and upper bound. Values are comprised between the range of the slider. See setRange(), minimum() and maximum(). The upper bound can't be smaller than the lower bound and vice-versa. When setting new values (setMinimumValue(), setMaximumValue() or setValues()), make sure they lie between the range (minimum(), maximum()) of the slider, they would be forced otherwised. If it is not the behavior you desire, you can set the range first (setRange(), setMinimum(), setMaximum()) TODO: support triggerAction(QAbstractSlider::SliderSingleStepSub) that moves both values at a time.

See Also
ctkDoubleRangeSlider, ctkDoubleSlider, ctkRangeWidget

Definition at line 49 of file ctkRangeSlider.h.

Member Typedef Documentation

typedef QSlider ctkRangeSlider::Superclass

Definition at line 60 of file ctkRangeSlider.h.

Constructor & Destructor Documentation

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

Constructor, builds a ctkRangeSlider that ranges from 0 to 100 and has a lower and upper values of 0 and 100 respectively, other properties are set the QSlider default properties.

Definition at line 239 of file ctkRangeSlider.cpp.

ctkRangeSlider::ctkRangeSlider ( QWidget *  par = 0)
explicit

Definition at line 230 of file ctkRangeSlider.cpp.

ctkRangeSlider::~ctkRangeSlider ( )
virtual

Definition at line 268 of file ctkRangeSlider.cpp.

ctkRangeSlider::ctkRangeSlider ( ctkRangeSliderPrivate impl,
Qt::Orientation  o,
QWidget *  par = 0 
)
protected

Definition at line 258 of file ctkRangeSlider.cpp.

ctkRangeSlider::ctkRangeSlider ( ctkRangeSliderPrivate impl,
QWidget *  par = 0 
)
protected

Definition at line 249 of file ctkRangeSlider.cpp.

Member Function Documentation

void ctkRangeSlider::initMaximumSliderStyleOption ( QStyleOptionSlider *  option) const
protectedvirtual

Definition at line 758 of file ctkRangeSlider.cpp.

void ctkRangeSlider::initMinimumSliderStyleOption ( QStyleOptionSlider *  option) const
protectedvirtual

Definition at line 752 of file ctkRangeSlider.cpp.

bool ctkRangeSlider::isMaximumSliderDown ( ) const
protected

Definition at line 745 of file ctkRangeSlider.cpp.

bool ctkRangeSlider::isMinimumSliderDown ( ) const
protected

Definition at line 738 of file ctkRangeSlider.cpp.

int ctkRangeSlider::maximumPosition ( ) const

This property holds the current slider maximum position. If tracking is enabled (the default), this is identical to maximumValue.

void ctkRangeSlider::maximumPositionChanged ( int  max)
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.

int ctkRangeSlider::maximumValue ( ) const

This property holds the slider's current maximum value. The slider forces the maximum value to be within the legal range: The slider silently forces maximumValue to be within the legal range: Changing the maximumValue also changes the maximumPosition.

void ctkRangeSlider::maximumValueChanged ( int  max)
signal

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

int ctkRangeSlider::minimumPosition ( ) const

This property holds the current slider minimum position. If tracking is enabled (the default), this is identical to minimumValue.

void ctkRangeSlider::minimumPositionChanged ( int  min)
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.

int ctkRangeSlider::minimumValue ( ) const

This property holds the slider's current minimum value. The slider silently forces minimumValue to be within the legal range: minimum() <= minimumValue() <= maximumValue() <= maximum(). Changing the minimumValue also changes the minimumPosition.

void ctkRangeSlider::minimumValueChanged ( int  min)
signal

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

void ctkRangeSlider::mouseMoveEvent ( QMouseEvent *  ev)
protectedvirtual

Definition at line 672 of file ctkRangeSlider.cpp.

void ctkRangeSlider::mousePressEvent ( QMouseEvent *  ev)
protectedvirtual

Definition at line 548 of file ctkRangeSlider.cpp.

void ctkRangeSlider::mouseReleaseEvent ( QMouseEvent *  ev)
protectedvirtual

Definition at line 726 of file ctkRangeSlider.cpp.

void ctkRangeSlider::onRangeChanged ( int  minimum,
int  maximum 
)
protectedslot

Definition at line 445 of file ctkRangeSlider.cpp.

void ctkRangeSlider::paintEvent ( QPaintEvent *  ev)
protectedvirtual

Definition at line 455 of file ctkRangeSlider.cpp.

void ctkRangeSlider::positionsChanged ( int  min,
int  max 
)
signal

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

ctkRangeSlider::Q_DECLARE_PRIVATE ( ctkRangeSlider  )
private
ctkRangeSlider::Q_DISABLE_COPY ( ctkRangeSlider  )
private
void ctkRangeSlider::setMaximumPosition ( int  max)

Definition at line 378 of file ctkRangeSlider.cpp.

void ctkRangeSlider::setMaximumValue ( int  max)
slot

This property holds the slider's current maximum value. The slider silently forces max to be within the legal range: minimum() <= minimumValue() <= max <= maximum(). Note: Changing the maximumValue also changes the maximumPosition.

See Also
stMinimumValue, setValues, setMinimum, setMaximum, setRange

Definition at line 294 of file ctkRangeSlider.cpp.

void ctkRangeSlider::setMinimumPosition ( int  min)

Definition at line 371 of file ctkRangeSlider.cpp.

void ctkRangeSlider::setMinimumValue ( int  min)
slot

This property holds the slider's current minimum value. The slider silently forces min to be within the legal range: minimum() <= min <= maximumValue() <= maximum(). Note: Changing the minimumValue also changes the minimumPosition.

See Also
stMaximumValue, setValues, setMinimum, setMaximum, setRange

Definition at line 280 of file ctkRangeSlider.cpp.

void ctkRangeSlider::setPositions ( int  min,
int  max 
)

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

Definition at line 385 of file ctkRangeSlider.cpp.

void ctkRangeSlider::setSymmetricMoves ( bool  symmetry)

Definition at line 431 of file ctkRangeSlider.cpp.

void ctkRangeSlider::setValues ( int  min,
int  max 
)
slot

Utility function that set the minimum value and maximum value at once. The slider silently forces min and max to be within the legal range: minimum() <= min <= max <= maximum(). Note: Changing the minimumValue and maximumValue also changes the minimumPosition and maximumPosition.

See Also
setMinimumValue, setMaximumValue, setMinimum, setMaximum, setRange

Definition at line 301 of file ctkRangeSlider.cpp.

bool ctkRangeSlider::symmetricMoves ( ) const

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

void ctkRangeSlider::valuesChanged ( int  min,
int  max 
)
signal

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

Member Data Documentation

QScopedPointer<ctkRangeSliderPrivate> ctkRangeSlider::d_ptr
protected

Definition at line 186 of file ctkRangeSlider.h.

Property Documentation

int ctkRangeSlider::maximumPosition
readwrite

Definition at line 55 of file ctkRangeSlider.h.

int ctkRangeSlider::maximumValue
readwrite

Definition at line 53 of file ctkRangeSlider.h.

int ctkRangeSlider::minimumPosition
readwrite

Definition at line 54 of file ctkRangeSlider.h.

int ctkRangeSlider::minimumValue
readwrite

Definition at line 52 of file ctkRangeSlider.h.

bool ctkRangeSlider::symmetricMoves
readwrite

Definition at line 56 of file ctkRangeSlider.h.


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