![]() |
CTK
0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
|
#include <Libs/Widgets/ctkRangeSlider.h>
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) | |
QString | handleToolTip () const |
bool | isMaximumSliderDown () const |
bool | isMinimumSliderDown () const |
int | maximumPosition () const |
int | maximumValue () const |
int | minimumPosition () const |
int | minimumValue () const |
void | setHandleToolTip (const QString &toolTip) |
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 bool | event (QEvent *event) |
virtual void | initMaximumSliderStyleOption (QStyleOptionSlider *option) const |
virtual void | initMinimumSliderStyleOption (QStyleOptionSlider *option) 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 | |
QString | handleToolTip |
int | maximumPosition |
int | maximumValue |
int | minimumPosition |
int | minimumValue |
bool | symmetricMoves |
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.
Definition at line 50 of file ctkRangeSlider.h.
typedef QSlider ctkRangeSlider::Superclass |
Definition at line 62 of file ctkRangeSlider.h.
|
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.
|
explicit |
|
virtual |
|
protected |
|
protected |
|
protectedvirtual |
QString ctkRangeSlider::handleToolTip | ( | ) | const |
Controls the text to display for the handle tooltip. It is in addition to the widget tooltip. "%1" is replaced by the current value of the slider. Empty string (by default) means no tooltip.
|
protectedvirtual |
|
protectedvirtual |
bool ctkRangeSlider::isMaximumSliderDown | ( | ) | const |
Returns true if the maximum value handle is down, false if it is up.
bool ctkRangeSlider::isMinimumSliderDown | ( | ) | const |
Returns true if the minimum value handle is down, false if it is up.
int ctkRangeSlider::maximumPosition | ( | ) | const |
This property holds the current slider maximum position. If tracking is enabled (the default), this is identical to maximumValue.
|
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.
|
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.
|
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.
|
signal |
This signal is emitted when the slider minimum value has changed, with the new slider value as argument.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedslot |
|
protectedvirtual |
|
signal |
Utility signal that is fired when minimum or maximum positions have changed.
void ctkRangeSlider::setHandleToolTip | ( | const QString & | toolTip | ) |
void ctkRangeSlider::setMaximumPosition | ( | 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.
void ctkRangeSlider::setMinimumPosition | ( | 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.
void ctkRangeSlider::setPositions | ( | int | min, |
int | max | ||
) |
Utility function that set the minimum position and maximum position at once.
void ctkRangeSlider::setSymmetricMoves | ( | bool | symmetry | ) |
|
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.
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
|
signal |
Utility signal that is fired when minimum or maximum values have changed.
|
protected |
Definition at line 204 of file ctkRangeSlider.h.
|
readwrite |
Definition at line 1 of file ctkRangeSlider.h.
|
readwrite |
Definition at line 1 of file ctkRangeSlider.h.
|
readwrite |
Definition at line 1 of file ctkRangeSlider.h.
|
readwrite |
Definition at line 1 of file ctkRangeSlider.h.
|
readwrite |
Definition at line 1 of file ctkRangeSlider.h.
|
readwrite |
Definition at line 1 of file ctkRangeSlider.h.