Class: QgsRangeSlider¶
A slider control with two interactive endpoints, for interactive selection of a range of values.
Added in version 3.18.
Class Hierarchy¶
Base classes¶
Methods
Returns the slider's fixed range size, or -1 if not set. |
|
Returns |
|
Returns the lower value for the range selected in the widget. |
|
Returns the maximum value allowed by the widget. |
|
Returns the minimum value allowed by the widget. |
|
Returns the orientation of the slider. |
|
Returns the page step value for the widget. |
|
Sets the slider's fixed range size. |
|
Sets whether the slider has its values flipped. |
|
Sets the lower value for the range currently selected in the widget. |
|
Sets the maximum value allowed in the widget. |
|
Sets the minimum value allowed in the widget. |
|
Sets the orientation of the slider. |
|
Sets the page step value for the widget. |
|
Sets the current range selected in the widget. |
|
Sets the minimum and maximum range limits for values allowed in the widget. |
|
Sets the single step value for the widget. |
|
Sets the interval for tick marks shown in the widget. |
|
Sets the position of the tick marks shown in the widget. |
|
Sets the upper value for the range currently selected in the widget. |
|
Returns the single step value for the widget. |
|
Returns the interval for tick marks shown in the widget. |
|
Returns the position of the tick marks shown in the widget. |
|
Returns the upper value for the range selected in the widget. |
Signals
Emitted when the widget's fixed range size is changed. |
|
Emitted when the range selected in the widget is changed. |
|
Emitted when the limits of values allowed in the widget is changed. |
- class qgis.gui.QgsRangeSlider[source]¶
Bases:
QWidget- __init__(parent: QWidget | None = None)
Constructor for QgsRangeSlider, with the specified
parentwidget.- Parameters:
parent (Optional[QWidget] = None)
- __init__(orientation: Qt.Orientation, parent: QWidget | None = None)
Constructor for QgsRangeSlider, with the specified
parentwidget.The
orientationparameter determines whether the slider is horizontal or vertical.- Parameters:
orientation (Qt.Orientation)
parent (Optional[QWidget] = None)
- fixedRangeSize(self) int[source]¶
Returns the slider’s fixed range size, or -1 if not set.
If a fixed range size is set then moving either the lower or upper slider will automatically move the other slider accordingly, in order to keep the selected range at the specified fixed size.
See also
Added in version 3.38.
- Return type:
int
- signal fixedRangeSizeChanged(size: int)[source]¶
Emitted when the widget’s fixed range size is changed.
See also
See also
Added in version 3.38.
- Parameters:
size (int)
- flippedDirection(self) bool[source]¶
Returns
Trueif the slider has its values flipped.If this property is
False(the default), the minimum and maximum will be shown in its classic position for the widget. If the value isTrue, the minimum and maximum appear at their opposite location.See also
- Return type:
bool
- lowerValue(self) int[source]¶
Returns the lower value for the range selected in the widget.
See also
See also
- Return type:
int
- maximum(self) int[source]¶
Returns the maximum value allowed by the widget.
See also
See also
- Return type:
int
- minimum(self) int[source]¶
Returns the minimum value allowed by the widget.
See also
See also
- Return type:
int
- orientation(self) Qt.Orientation[source]¶
Returns the orientation of the slider.
See also
- Return type:
Qt.Orientation
- pageStep(self) int[source]¶
Returns the page step value for the widget.
This corresponds to the larger increment or decrement applied when the user presses the page increment key (usually PageUp or PageDown).
See also
See also
- Return type:
int
- signal rangeChanged(minimum: int, maximum: int)[source]¶
Emitted when the range selected in the widget is changed.
- Parameters:
minimum (int)
maximum (int)
- signal rangeLimitsChanged(minimum: int, maximum: int)[source]¶
Emitted when the limits of values allowed in the widget is changed.
- Parameters:
minimum (int)
maximum (int)
- setFixedRangeSize(self, size: int)[source]¶
Sets the slider’s fixed range
size. Set to -1 if no fixed size is desired.If a fixed range size is set then moving either the lower or upper slider will automatically move the other slider accordingly, in order to keep the selected range at the specified fixed size.
See also
Added in version 3.38.
- Parameters:
size (int)
- setFlippedDirection(self, flipped: bool)[source]¶
Sets whether the slider has its values
flipped.If this property is
False(the default), the minimum and maximum will be shown in its classic position for the widget. If the value isTrue, the minimum and maximum appear at their opposite location. (i.e. minimum at the bottom of a vertical slider, maximum at the top of a vertical slider).See also
- Parameters:
flipped (bool)
- setLowerValue(self, value: int)[source]¶
Sets the lower
valuefor the range currently selected in the widget.See also
See also
See also
- Parameters:
value (int)
- setMaximum(self, maximum: int)[source]¶
Sets the
maximumvalue allowed in the widget.See also
See also
- Parameters:
maximum (int)
- setMinimum(self, minimum: int)[source]¶
Sets the
minimumvalue allowed in the widget.See also
See also
- Parameters:
minimum (int)
- setOrientation(self, orientation: Qt.Orientation)[source]¶
Sets the
orientationof the slider.See also
- Parameters:
orientation (Qt.Orientation)
- setPageStep(self, step: int)[source]¶
Sets the page
stepvalue for the widget.This corresponds to the larger increment or decrement applied when the user presses the page increment key (usually PageUp or PageDown).
See also
See also
- Parameters:
step (int)
- setRange(self, lower: int, upper: int)[source]¶
Sets the current range selected in the widget.
See also
See also
- Parameters:
lower (int)
upper (int)
- setRangeLimits(self, minimum: int, maximum: int)[source]¶
Sets the
minimumandmaximumrange limits for values allowed in the widget.See also
See also
- Parameters:
minimum (int)
maximum (int)
- setSingleStep(self, step: int)[source]¶
Sets the single
stepvalue for the widget.This corresponds to the smaller increment or decrement applied when the user presses an arrow key.
See also
See also
- Parameters:
step (int)
- setTickInterval(self, interval: int)[source]¶
Sets the
intervalfor tick marks shown in the widget.See also
- Parameters:
interval (int)
- setTickPosition(self, position: QSlider.TickPosition)[source]¶
Sets the
positionof the tick marks shown in the widget.See also
- Parameters:
position (QSlider.TickPosition)
- setUpperValue(self, value: int)[source]¶
Sets the upper
valuefor the range currently selected in the widget.See also
See also
See also
- Parameters:
value (int)
- singleStep(self) int[source]¶
Returns the single step value for the widget.
This corresponds to the smaller increment or decrement applied when the user presses an arrow key.
See also
See also
- Return type:
int
- tickInterval(self) int[source]¶
Returns the interval for tick marks shown in the widget.
See also
- Return type:
int
- tickPosition(self) QSlider.TickPosition[source]¶
Returns the position of the tick marks shown in the widget.
See also
- Return type:
QSlider.TickPosition