ctk3Slider
#include <ctk3slider.h>
Public Types | |
typedef QSlider | Superclass |
Public Types inherited from QSlider | |
enum | TickPosition |
Public Types inherited from QAbstractSlider | |
enum | SliderAction |
enum | SliderChange |
Public Types inherited from QWidget | |
enum | RenderFlag |
Public Types inherited from QPaintDevice | |
enum | PaintDeviceMetric |
Signals | |
void | maximumPositionChanged (int max) |
void | maximumValueChanged (int max) |
void | midPositionChanged (int max) |
void | midValueChanged (int mid) |
void | minimumPositionChanged (int min) |
void | minimumValueChanged (int min) |
void | positionsChanged (int min, int mid, int max) |
void | released (int min, int mid, int max) |
void | valuesChanged (int min, int mid, int max) |
Public Slots | |
void | setMaximumValue (int max) |
void | setMidValue (int mid) |
void | setMinimumValue (int min) |
void | setValues (int min, int mid, int max) |
Protected Slots | |
void | onRangeChanged (int minimum, int maximum) |
Protected Attributes | |
QScopedPointer< ctk3SliderPrivate > | d_ptr |
Detailed Description
A ctk3Slider 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())
- See also
- ctkDoubleRangeSlider, ctkDoubleSlider, ctkRangeWidget
Definition at line 30 of file ctk3slider.h.
Member Typedef Documentation
◆ Superclass
typedef QSlider ctk3Slider::Superclass |
Definition at line 43 of file ctk3slider.h.
Property Documentation
◆ handleToolTip
|
readwrite |
Definition at line 39 of file ctk3slider.h.
◆ maximumPosition
|
readwrite |
Definition at line 37 of file ctk3slider.h.
◆ maximumValue
|
readwrite |
Definition at line 34 of file ctk3slider.h.
◆ midPosition
|
readwrite |
Definition at line 38 of file ctk3slider.h.
◆ midValue
|
readwrite |
Definition at line 35 of file ctk3slider.h.
◆ minimumPosition
|
readwrite |
Definition at line 36 of file ctk3slider.h.
◆ minimumValue
|
readwrite |
Definition at line 33 of file ctk3slider.h.
Constructor & Destructor Documentation
◆ ctk3Slider() [1/4]
|
explicit |
Constructor, builds a ctk3Slider 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 337 of file ctk3slider.cpp.
◆ ctk3Slider() [2/4]
|
explicit |
Definition at line 328 of file ctk3slider.cpp.
◆ ~ctk3Slider()
|
virtual |
Definition at line 366 of file ctk3slider.cpp.
◆ ctk3Slider() [3/4]
|
protected |
Definition at line 356 of file ctk3slider.cpp.
◆ ctk3Slider() [4/4]
|
protected |
Definition at line 347 of file ctk3slider.cpp.
Member Function Documentation
◆ event()
|
overrideprotectedvirtual |
Reimplemented from QSlider.
Definition at line 973 of file ctk3slider.cpp.
◆ handleToolTip()
QString ctk3Slider::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.
Definition at line 959 of file ctk3slider.cpp.
◆ initMaximumSliderStyleOption()
|
protectedvirtual |
Definition at line 948 of file ctk3slider.cpp.
◆ initMidSliderStyleOption()
|
protectedvirtual |
Definition at line 953 of file ctk3slider.cpp.
◆ initMinimumSliderStyleOption()
|
protectedvirtual |
Definition at line 942 of file ctk3slider.cpp.
◆ isMaximumSliderDown()
bool ctk3Slider::isMaximumSliderDown | ( | ) | const |
Returns true if the maximum value handle is down, false if it is up.
- See also
- isMinimumSliderDown()
Definition at line 929 of file ctk3slider.cpp.
◆ isMidSliderDown()
bool ctk3Slider::isMidSliderDown | ( | ) | const |
Returns true if the mid value handle is down, false if it is up.
- See also
- isMinimumSliderDown()
Definition at line 935 of file ctk3slider.cpp.
◆ isMinimumSliderDown()
bool ctk3Slider::isMinimumSliderDown | ( | ) | const |
Returns true if the minimum value handle is down, false if it is up.
- See also
- isMaximumSliderDown()
Definition at line 922 of file ctk3slider.cpp.
◆ maximumPosition()
int ctk3Slider::maximumPosition | ( | ) | const |
This property holds the current slider maximum position.
If tracking is enabled (the default), this is identical to maximumValue.
Definition at line 549 of file ctk3slider.cpp.
◆ maximumPositionChanged
|
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.
◆ maximumValue()
int ctk3Slider::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.
Definition at line 387 of file ctk3slider.cpp.
◆ maximumValueChanged
|
signal |
This signal is emitted when the slider maximum value has changed, with the new slider value as argument.
◆ midPosition()
int ctk3Slider::midPosition | ( | ) | const |
This property holds the current slider mid position.
If tracking is enabled (the default), this is identical to midValue.
Definition at line 555 of file ctk3slider.cpp.
◆ midPositionChanged
|
signal |
This signal is emitted when sliderDown is true and the slider moves.
This usually happens when the user is dragging the mid slider. The value is the new slider mid position. This signal is emitted even when tracking is turned off.
◆ midValue()
int ctk3Slider::midValue | ( | ) | const |
This property holds the slider's current mid value.
The slider forces the mid value to be within the legal range: The slider silently forces midValue to be within the legal range: Changing the midValue also changes the midPosition.
Definition at line 403 of file ctk3slider.cpp.
◆ midValueChanged
|
signal |
This signal is emitted when the slider mid value has changed, with the new slider value as argument.
◆ minimumPosition()
int ctk3Slider::minimumPosition | ( | ) | const |
This property holds the current slider minimum position.
If tracking is enabled (the default), this is identical to minimumValue.
Definition at line 542 of file ctk3slider.cpp.
◆ minimumPositionChanged
|
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.
◆ minimumValue()
int ctk3Slider::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.
Definition at line 371 of file ctk3slider.cpp.
◆ minimumValueChanged
|
signal |
This signal is emitted when the slider minimum value has changed, with the new slider value as argument.
◆ mouseMoveEvent()
|
overrideprotectedvirtual |
Reimplemented from QSlider.
Definition at line 840 of file ctk3slider.cpp.
◆ mousePressEvent()
|
overrideprotectedvirtual |
Reimplemented from QSlider.
Definition at line 763 of file ctk3slider.cpp.
◆ mouseReleaseEvent()
|
overrideprotectedvirtual |
Reimplemented from QSlider.
Definition at line 909 of file ctk3slider.cpp.
◆ onRangeChanged
|
protectedslot |
Definition at line 644 of file ctk3slider.cpp.
◆ paintEvent()
|
overrideprotectedvirtual |
Reimplemented from QSlider.
Definition at line 654 of file ctk3slider.cpp.
◆ positionsChanged
|
signal |
Utility signal that is fired when minimum or maximum positions have changed.
◆ setHandleToolTip()
Definition at line 966 of file ctk3slider.cpp.
◆ setMaximumPosition()
void ctk3Slider::setMaximumPosition | ( | int | max | ) |
Definition at line 571 of file ctk3slider.cpp.
◆ setMaximumValue
|
slot |
This property holds the slider's current maximum value.
The slider silently forces max to be within the legal range: minimum() <= minimumValue() <= mid <= max <= maximum(). Note: Changing the maximumValue also changes the maximumPosition.
- See also
- stMinimumValue, setValues, setMinimum, setMaximum, setRange
Definition at line 394 of file ctk3slider.cpp.
◆ setMidPosition()
void ctk3Slider::setMidPosition | ( | int | mid | ) |
Definition at line 579 of file ctk3slider.cpp.
◆ setMidValue
|
slot |
This property holds the slider's current mid value.
The slider silently forces max to be within the legal range: minimum() <= minimumValue() <= mid <= max <= maximum(). Note: Changing the midValue also changes the midPosition.
- See also
- setMidValue, setValues, setMinimum, setMaximum, setRange
Definition at line 410 of file ctk3slider.cpp.
◆ setMinimumPosition()
void ctk3Slider::setMinimumPosition | ( | int | min | ) |
Definition at line 562 of file ctk3slider.cpp.
◆ setMinimumValue
|
slot |
This property holds the slider's current minimum value.
The slider silently forces min to be within the legal range: minimum() <= min <= mid <= maximumValue() <= maximum(). Note: Changing the minimumValue also changes the minimumPosition.
- See also
- stMaximumValue, setValues, setMinimum, setMaximum, setRange
Definition at line 378 of file ctk3slider.cpp.
◆ setPositions()
void ctk3Slider::setPositions | ( | int | min, |
int | mid, | ||
int | max ) |
Utility function that set the minimum, mid and maximum position at once.
Definition at line 589 of file ctk3slider.cpp.
◆ setValues
|
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 470 of file ctk3slider.cpp.
◆ valuesChanged
|
signal |
Utility signal that is fired when minimum, mid or maximum values have changed.
Member Data Documentation
◆ d_ptr
|
protected |
Definition at line 217 of file ctk3slider.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 3 2024 11:49:52 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.