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¶
- 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[source]¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- 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[source]¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- signal rangeLimitsChanged[source]¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- 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