ctkRangeSlider Class Reference

#include <Libs/Widgets/ctkRangeSlider.h>

List of all members.

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)

Public Member Functions

 ctkRangeSlider (QWidget *par=0)
 ctkRangeSlider (Qt::Orientation o, 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)
virtual ~ctkRangeSlider ()

Protected Slots

void onRangeChanged (int minimum, int maximum)

Protected Member Functions

virtual void mouseMoveEvent (QMouseEvent *ev)
virtual void mousePressEvent (QMouseEvent *ev)
virtual void mouseReleaseEvent (QMouseEvent *ev)
virtual void paintEvent (QPaintEvent *ev)

Properties

int maximumPosition
int maximumValue
int minimumPosition
int minimumValue

Private Member Functions

 CTK_DECLARE_PRIVATE (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. FIXME: support triggerAction(QAbstractSlider::SliderSingleStepSub) that moves both values at a time.

Definition at line 43 of file ctkRangeSlider.h.


Member Typedef Documentation

typedef QSlider ctkRangeSlider::Superclass

Definition at line 53 of file ctkRangeSlider.h.


Constructor & Destructor Documentation

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

Definition at line 181 of file ctkRangeSlider.cpp.

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

Definition at line 173 of file ctkRangeSlider.cpp.

ctkRangeSlider::~ctkRangeSlider (  )  [virtual]

Definition at line 190 of file ctkRangeSlider.cpp.


Member Function Documentation

ctkRangeSlider::CTK_DECLARE_PRIVATE ( ctkRangeSlider   )  [private]
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: minimum <= minvalue <= maxvalue <= maximum. 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 forces the minimum value to be within the legal range: minimum <= minvalue <= maxvalue <= 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  )  [protected, virtual]

Definition at line 529 of file ctkRangeSlider.cpp.

void ctkRangeSlider::mousePressEvent ( QMouseEvent *  ev  )  [protected, virtual]

Definition at line 439 of file ctkRangeSlider.cpp.

void ctkRangeSlider::mouseReleaseEvent ( QMouseEvent *  ev  )  [protected, virtual]

Definition at line 569 of file ctkRangeSlider.cpp.

void ctkRangeSlider::onRangeChanged ( int  minimum,
int  maximum 
) [protected, slot]

Definition at line 353 of file ctkRangeSlider.cpp.

void ctkRangeSlider::paintEvent ( QPaintEvent *  ev  )  [protected, virtual]

Definition at line 361 of file ctkRangeSlider.cpp.

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

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

void ctkRangeSlider::setMaximumPosition ( int  max  ) 

Definition at line 300 of file ctkRangeSlider.cpp.

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

Definition at line 216 of file ctkRangeSlider.cpp.

void ctkRangeSlider::setMinimumPosition ( int  min  ) 

Definition at line 293 of file ctkRangeSlider.cpp.

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

Definition at line 202 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 307 of file ctkRangeSlider.cpp.

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

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

Definition at line 223 of file ctkRangeSlider.cpp.

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

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


Property Documentation

int ctkRangeSlider::maximumPosition [read, write]

Definition at line 49 of file ctkRangeSlider.h.

int ctkRangeSlider::maximumValue [read, write]

Definition at line 47 of file ctkRangeSlider.h.

int ctkRangeSlider::minimumPosition [read, write]

Definition at line 48 of file ctkRangeSlider.h.

int ctkRangeSlider::minimumValue [read, write]

Definition at line 46 of file ctkRangeSlider.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines

Generated on 21 May 2010 for CTK by  doxygen 1.6.1