#include <Libs/Widgets/ctkSliderWidget.h>
|
QScopedPointer< ctkSliderWidgetPrivate > | d_ptr |
|
ctkSliderWidget is a wrapper around a ctkDoubleSlider and a ctkDoubleSpinBox where the slider value and the spinbox value are synchronized.
- See also
- ctkRangeWidget, ctkDoubleRangeSlider, QDoubleSpinBox
Definition at line 43 of file ctkSliderWidget.h.
◆ Superclass
◆ SynchronizeSibling
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.
- See also
- SynchronizeSiblings(), setSynchronizeSiblings(), decimalsChanged()
Enumerator |
---|
NoSynchronize | |
SynchronizeWidth | |
SynchronizeDecimals | |
Definition at line 84 of file ctkSliderWidget.h.
◆ ctkSliderWidget()
ctkSliderWidget::ctkSliderWidget |
( |
QWidget * |
parent = 0 | ) |
|
|
explicit |
◆ ~ctkSliderWidget()
virtual ctkSliderWidget::~ctkSliderWidget |
( |
| ) |
|
|
virtual |
◆ decimals()
virtual int ctkSliderWidget::decimals |
( |
| ) |
const |
|
virtual |
◆ decimalsChanged
void ctkSliderWidget::decimalsChanged |
( |
int |
decimals | ) |
|
|
signal |
◆ eventFilter()
virtual bool ctkSliderWidget::eventFilter |
( |
QObject * |
obj, |
|
|
QEvent * |
event |
|
) |
| |
|
protectedvirtual |
◆ hasPopupSlider()
virtual bool ctkSliderWidget::hasPopupSlider |
( |
| ) |
const |
|
virtual |
The slider can be handled as a popup for the spinbox. The location where the popup appears is controlled by
- See also
- alignement. False by default. Note: some sizing issues in the popup can happen if the ctkSliderWidget has already parent. You might want to consider setting this property before setting a parent to ctkSliderWidget.
◆ hasTracking()
virtual bool ctkSliderWidget::hasTracking |
( |
| ) |
const |
|
virtual |
◆ invertedAppearance()
virtual bool ctkSliderWidget::invertedAppearance |
( |
| ) |
const |
|
virtual |
◆ invertedControls()
virtual bool ctkSliderWidget::invertedControls |
( |
| ) |
const |
|
virtual |
◆ isSpinBoxVisible()
virtual bool ctkSliderWidget::isSpinBoxVisible |
( |
| ) |
const |
|
virtual |
◆ maximum()
virtual double ctkSliderWidget::maximum |
( |
| ) |
const |
|
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.
◆ minimum()
virtual double ctkSliderWidget::minimum |
( |
| ) |
const |
|
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.
◆ onValueProxyAboutToBeModified
virtual void ctkSliderWidget::onValueProxyAboutToBeModified |
( |
| ) |
|
|
protectedvirtualslot |
◆ onValueProxyModified
virtual void ctkSliderWidget::onValueProxyModified |
( |
| ) |
|
|
protectedvirtualslot |
◆ pageStep()
virtual double ctkSliderWidget::pageStep |
( |
| ) |
const |
|
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.
◆ popup()
◆ prefix()
virtual QString ctkSliderWidget::prefix |
( |
| ) |
const |
|
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
◆ reset
virtual void ctkSliderWidget::reset |
( |
| ) |
|
|
virtualslot |
Reset the slider and spinbox to zero (value and position)
◆ setDecimals
virtual void ctkSliderWidget::setDecimals |
( |
int |
decimals | ) |
|
|
virtualslot |
Sets how many decimals the spinbox uses for displaying and interpreting doubles.
◆ setInvertedAppearance()
virtual void ctkSliderWidget::setInvertedAppearance |
( |
bool |
invertedAppearance | ) |
|
|
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.
- See also
- invertedControls
◆ setInvertedControls()
virtual void ctkSliderWidget::setInvertedControls |
( |
bool |
invertedControls | ) |
|
|
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.
- See also
- invertedAppearance
◆ setMaximum()
virtual void ctkSliderWidget::setMaximum |
( |
double |
maximum | ) |
|
|
virtual |
◆ setMinimum()
virtual void ctkSliderWidget::setMinimum |
( |
double |
minimum | ) |
|
|
virtual |
◆ setPageStep()
virtual void ctkSliderWidget::setPageStep |
( |
double |
step | ) |
|
|
virtual |
◆ setPopupSlider()
virtual void ctkSliderWidget::setPopupSlider |
( |
bool |
popup | ) |
|
|
virtual |
◆ setPrefix()
virtual void ctkSliderWidget::setPrefix |
( |
const QString & |
prefix | ) |
|
|
virtual |
◆ setRange()
virtual void ctkSliderWidget::setRange |
( |
double |
min, |
|
|
double |
max |
|
) |
| |
|
virtual |
Description Utility function that set the min/max in once
◆ setSingleStep()
virtual void ctkSliderWidget::setSingleStep |
( |
double |
step | ) |
|
|
virtual |
◆ setSliderValue
virtual void ctkSliderWidget::setSliderValue |
( |
double |
spinBoxValue | ) |
|
|
protectedvirtualslot |
◆ setSpinBoxAlignment()
virtual void ctkSliderWidget::setSpinBoxAlignment |
( |
Qt::Alignment |
alignment | ) |
|
|
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
◆ setSpinBoxValue
virtual void ctkSliderWidget::setSpinBoxValue |
( |
double |
sliderValue | ) |
|
|
protectedvirtualslot |
◆ setSpinBoxVisible
virtual void ctkSliderWidget::setSpinBoxVisible |
( |
bool |
| ) |
|
|
virtualslot |
◆ setSuffix()
virtual void ctkSliderWidget::setSuffix |
( |
const QString & |
suffix | ) |
|
|
virtual |
◆ setSynchronizeSiblings()
virtual void ctkSliderWidget::setSynchronizeSiblings |
( |
ctkSliderWidget::SynchronizeSiblings |
options | ) |
|
|
virtual |
◆ setTickInterval()
virtual void ctkSliderWidget::setTickInterval |
( |
double |
tick | ) |
|
|
virtual |
◆ setTickPosition()
virtual void ctkSliderWidget::setTickPosition |
( |
QSlider::TickPosition |
position | ) |
|
|
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.
◆ setTracking()
virtual void ctkSliderWidget::setTracking |
( |
bool |
enable | ) |
|
|
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.
◆ setValue
virtual void ctkSliderWidget::setValue |
( |
double |
value | ) |
|
|
virtualslot |
◆ setValueProxy()
virtual void ctkSliderWidget::setValueProxy |
( |
ctkValueProxy * |
proxy | ) |
|
|
virtual |
Set/Get a value proxy filter. This simply sets the same value proxy filter on the spinbox and the slider
- See also
- setValueProxy(), valueProxy()
◆ singleStep()
virtual double ctkSliderWidget::singleStep |
( |
| ) |
const |
|
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.
◆ slider()
Returns the slider synchronized with the spinbox. Be careful with what you do with the slider as the spinbox might change properties automatically.
◆ spinBox()
Returns the spinbox synchronized with the slider. Be careful with what you do with the spinbox as the slider might change properties automatically.
◆ spinBoxAlignment()
virtual Qt::Alignment ctkSliderWidget::spinBoxAlignment |
( |
| ) |
const |
|
virtual |
◆ startChanging
virtual void ctkSliderWidget::startChanging |
( |
| ) |
|
|
protectedvirtualslot |
◆ stopChanging
virtual void ctkSliderWidget::stopChanging |
( |
| ) |
|
|
protectedvirtualslot |
◆ suffix()
virtual QString ctkSliderWidget::suffix |
( |
| ) |
const |
|
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
◆ synchronizeSiblings()
virtual ctkSliderWidget::SynchronizeSiblings ctkSliderWidget::synchronizeSiblings |
( |
| ) |
const |
|
virtual |
Set/Get the synchronize siblings mode. This helps when having multiple ctkSliderWidget stacked upon each other. Default flag is SynchronizeWidth | SynchronizeDecimals.
- See also
- SynchronizeSiblingsModes
◆ tickInterval()
virtual double ctkSliderWidget::tickInterval |
( |
| ) |
const |
|
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.
◆ tickPosition()
virtual QSlider::TickPosition ctkSliderWidget::tickPosition |
( |
| ) |
const |
|
virtual |
◆ value()
virtual double ctkSliderWidget::value |
( |
| ) |
const |
|
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.
◆ valueChanged
void ctkSliderWidget::valueChanged |
( |
double |
value | ) |
|
|
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.
- See also
- valueIsChanging QAbstractSlider::valueChanged
◆ valueIsChanging
void ctkSliderWidget::valueIsChanging |
( |
double |
value | ) |
|
|
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()
- See also
- valueChanged QAbstractSlider::sliderMoved
◆ valueProxy()
◆ d_ptr
QScopedPointer<ctkSliderWidgetPrivate> ctkSliderWidget::d_ptr |
|
protected |
◆ decimals
int ctkSliderWidget::decimals |
|
readwrite |
◆ invertedAppearance
bool ctkSliderWidget::invertedAppearance |
|
readwrite |
◆ invertedControls
bool ctkSliderWidget::invertedControls |
|
readwrite |
◆ maximum
double ctkSliderWidget::maximum |
|
readwrite |
◆ minimum
double ctkSliderWidget::minimum |
|
readwrite |
◆ pageStep
double ctkSliderWidget::pageStep |
|
readwrite |
◆ popupSlider
bool ctkSliderWidget::popupSlider |
|
readwrite |
◆ prefix
QString ctkSliderWidget::prefix |
|
readwrite |
◆ singleStep
double ctkSliderWidget::singleStep |
|
readwrite |
◆ spinBoxAlignment
Qt::Alignment ctkSliderWidget::spinBoxAlignment |
|
readwrite |
◆ spinBoxVisible
bool ctkSliderWidget::spinBoxVisible |
|
readwrite |
◆ suffix
QString ctkSliderWidget::suffix |
|
readwrite |
◆ synchronizeSiblings
SynchronizeSiblings ctkSliderWidget::synchronizeSiblings |
|
readwrite |
◆ tickInterval
double ctkSliderWidget::tickInterval |
|
readwrite |
◆ tickPosition
QSlider::TickPosition ctkSliderWidget::tickPosition |
|
readwrite |
◆ tracking
bool ctkSliderWidget::tracking |
|
readwrite |
◆ value
double ctkSliderWidget::value |
|
readwrite |
The documentation for this class was generated from the following file: