![]() |
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/ctkSliderWidget.h>
Public Types | |
typedef QWidget | Superclass |
Superclass typedef. | |
enum | SynchronizeSibling { NoSynchronize = 0x000 , SynchronizeWidth = 0x001 , SynchronizeDecimals = 0x002 } |
Public Slots | |
virtual void | reset () |
virtual void | setDecimals (int decimals) |
virtual void | setSpinBoxVisible (bool) |
virtual void | setValue (double value) |
Signals | |
void | decimalsChanged (int decimals) |
void | valueChanged (double value) |
void | valueIsChanging (double value) |
Public Member Functions | |
ctkSliderWidget (QWidget *parent=0) | |
Constructors. | |
virtual int | decimals () const |
virtual bool | hasPopupSlider () const |
virtual bool | hasTracking () const |
virtual bool | invertedAppearance () const |
virtual bool | invertedControls () const |
virtual bool | isSpinBoxVisible () const |
virtual double | maximum () const |
virtual double | minimum () const |
virtual double | pageStep () const |
virtual ctkPopupWidget * | popup () const |
virtual QString | prefix () const |
virtual void | setInvertedAppearance (bool invertedAppearance) |
virtual void | setInvertedControls (bool invertedControls) |
virtual void | setMaximum (double maximum) |
virtual void | setMinimum (double minimum) |
virtual void | setPageStep (double step) |
virtual void | setPopupSlider (bool popup) |
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 | setSuffix (const QString &suffix) |
virtual void | setSynchronizeSiblings (ctkSliderWidget::SynchronizeSiblings options) |
virtual void | setTickInterval (double tick) |
virtual void | setTickPosition (QSlider::TickPosition position) |
virtual void | setTracking (bool enable) |
virtual void | setValueProxy (ctkValueProxy *proxy) |
virtual double | singleStep () const |
virtual ctkDoubleSlider * | slider () |
virtual ctkDoubleSpinBox * | spinBox () |
virtual Qt::Alignment | spinBoxAlignment () const |
virtual QString | suffix () const |
virtual ctkSliderWidget::SynchronizeSiblings | synchronizeSiblings () const |
virtual double | tickInterval () const |
virtual QSlider::TickPosition | tickPosition () const |
virtual double | value () const |
virtual ctkValueProxy * | valueProxy () const |
virtual | ~ctkSliderWidget () |
Protected Slots | |
virtual void | onValueProxyAboutToBeModified () |
virtual void | onValueProxyModified () |
virtual void | setSliderValue (double spinBoxValue) |
virtual void | setSpinBoxValue (double sliderValue) |
virtual void | startChanging () |
virtual void | stopChanging () |
Protected Member Functions | |
virtual bool | eventFilter (QObject *obj, QEvent *event) |
Protected Attributes | |
QScopedPointer< ctkSliderWidgetPrivate > | d_ptr |
Properties | |
int | decimals |
bool | invertedAppearance |
bool | invertedControls |
double | maximum |
double | minimum |
double | pageStep |
bool | popupSlider |
QString | prefix |
double | singleStep |
Qt::Alignment | spinBoxAlignment |
bool | spinBoxVisible |
QString | suffix |
SynchronizeSiblings | synchronizeSiblings |
double | tickInterval |
QSlider::TickPosition | tickPosition |
bool | tracking |
double | value |
ctkSliderWidget is a wrapper around a ctkDoubleSlider and a ctkDoubleSpinBox where the slider value and the spinbox value are synchronized.
Definition at line 43 of file ctkSliderWidget.h.
typedef QWidget ctkSliderWidget::Superclass |
Superclass typedef.
Definition at line 93 of file ctkSliderWidget.h.
Synchronize properties of the slider siblings: NoSynchronize: The slider widget siblings aren't updated and this widget does not update from its siblings. SynchronizeWidth: The width of the SpinBox is set to the same width of the largest QDoubleSpinBox of its ctkSliderWidget siblings. SynchronizeDecimals: Whenever one of the siblings changes its number of decimals, all its siblings Synchronize to the new number of decimals.
Default is SynchronizeWidth.
Enumerator | |
---|---|
NoSynchronize | |
SynchronizeWidth | |
SynchronizeDecimals |
Definition at line 84 of file ctkSliderWidget.h.
|
explicit |
Constructors.
|
virtual |
|
virtual |
Return the decimals property value.
|
signal |
This signal is emitted whenever the number of decimals is changed.
|
protectedvirtual |
|
virtual |
The slider can be handled as a popup for the spinbox. The location where the popup appears is controlled by
|
virtual |
|
virtual |
|
virtual |
|
virtual |
The Spinbox visibility can be controlled using setSpinBoxVisible() and isSpinBoxVisible().
|
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 |
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.
|
protectedvirtualslot |
|
protectedvirtualslot |
|
virtual |
This property holds the page step. The larger of two natural steps that an abstract slider provides and typically corresponds to the user pressing PageUp or PageDown.
|
virtual |
Return the popup if ctkSliderWidget hasPopupSlider() is true, 0 otherwise. It can be useful to control where the popup shows up relative to the spinbox the popup
|
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
|
virtualslot |
Reset the slider and spinbox to zero (value and position)
|
virtualslot |
Sets how many decimals the spinbox uses for displaying and interpreting doubles.
|
virtual |
This property holds whether or not a slider shows its values inverted. If this property is false (the default), the minimum and maximum will be shown in its classic position for the inherited widget. If the value is true, the minimum and maximum appear at their opposite location. Note: This property makes most sense for sliders and dials. For scroll bars, the visual effect of the scroll bar subcontrols depends on whether or not the styles understand inverted appearance; most styles ignore this property for scroll bars.
|
virtual |
This property holds whether or not the slider and the spinbox invert their wheel and key events. If this property is false, scrolling the mouse wheel "up" and using keys like page up will increase the value of the slider widget towards its maximum. Otherwise, pressing page up will move value towards the minimum. The default value of the property is false.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Description Utility function that set the min/max in once
|
virtual |
|
protectedvirtualslot |
|
virtual |
This property holds the alignment of the spin box. Possible Values are Qt::AlignLeft, Qt::AlignRight, and Qt::AlignHCenter. By default, the alignment is Qt::AlignLeft
|
protectedvirtualslot |
|
virtualslot |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
This property holds the tickmark position for the slider. The valid values are described by the QSlider::TickPosition enum. The default value is QSlider::NoTicks.
|
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.
|
virtualslot |
|
virtual |
Set/Get a value proxy filter. This simply sets the same value proxy filter on the spinbox and the slider
|
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 |
Returns the slider synchronized with the spinbox. Be careful with what you do with the slider as the spinbox might change properties automatically.
|
virtual |
Returns the spinbox synchronized with the slider. Be careful with what you do with the spinbox as the slider might change properties automatically.
|
virtual |
|
protectedvirtualslot |
|
protectedvirtualslot |
|
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 |
Set/Get the synchronize siblings mode. This helps when having multiple ctkSliderWidget stacked upon each other. Default flag is SynchronizeWidth | SynchronizeDecimals.
|
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 |
|
virtual |
This property holds the current slider position. If tracking is enabled (the default), this is identical to value. This property holds the slider and spinbox current value. ctkSliderWidget forces the value to be within the legal range: minimum <= value <= maximum.
|
signal |
When tracking is on (default), valueChanged is emitted when the user drags the slider. If tracking is off, valueChanged() is emitted only when the user releases the mouse.
|
signal |
valueIsChanging() is emitted whenever the slider is dragged and tracking is turned off. You might want to use valueChanged instead. It behaves the same way than QAbstractSlider::sliderMoved()
|
virtual |
|
protected |
Definition at line 310 of file ctkSliderWidget.h.
|
readwrite |
This property holds the precision of the spin box, in decimals. 2 by default.
Definition at line 318 of file ctkSliderWidget.h.
|
readwrite |
Definition at line 318 of file ctkSliderWidget.h.
|
readwrite |
Definition at line 318 of file ctkSliderWidget.h.
|
readwrite |
Definition at line 318 of file ctkSliderWidget.h.
|
readwrite |
Definition at line 318 of file ctkSliderWidget.h.
|
readwrite |
Definition at line 318 of file ctkSliderWidget.h.
|
readwrite |
Definition at line 318 of file ctkSliderWidget.h.
|
readwrite |
Definition at line 318 of file ctkSliderWidget.h.
|
readwrite |
Definition at line 318 of file ctkSliderWidget.h.
|
readwrite |
Definition at line 318 of file ctkSliderWidget.h.
|
readwrite |
Definition at line 318 of file ctkSliderWidget.h.
|
readwrite |
Definition at line 318 of file ctkSliderWidget.h.
|
readwrite |
Definition at line 318 of file ctkSliderWidget.h.
|
readwrite |
Definition at line 318 of file ctkSliderWidget.h.
|
readwrite |
Definition at line 318 of file ctkSliderWidget.h.
|
readwrite |
Definition at line 318 of file ctkSliderWidget.h.
|
readwrite |
Definition at line 318 of file ctkSliderWidget.h.