Class: QgsElevationControllerWidget

A widget for configuring vertical elevation slicing behavior for maps.

Added in version 3.38.

Class Hierarchy

Inheritance diagram of qgis.gui.QgsElevationControllerWidget

Base classes

QWidget

QObject

QPaintDevice

Methods

fixedRangeSize

Returns the fixed range size, or -1 if no fixed size is set.

menu

Returns a reference to the widget's configuration menu, which can be used to add actions to the menu.

range

Returns the current visible range from the widget.

rangeLimits

Returns the limits of the elevation range which can be selected by the widget.

setFixedRangeSize

Sets the fixed range size.

setInverted

Sets whether the elevation slider should be inverted.

setRange

Sets the current visible range for the widget.

setRangeLimits

Sets the limits of the elevation range which can be selected by the widget.

setSignificantElevations

Sets a list of significant elevations to highlight in the widget.

slider

Returns a reference to the slider component of the widget.

Signals

fixedRangeSizeChanged

Emitted when the fixed range size is changed from the widget.

invertedChanged

Emitted when the elevation filter slider is inverted.

rangeChanged

Emitted when the visible range from the widget is changed.

class qgis.gui.QgsElevationControllerWidget[source]

Bases: QWidget

__init__(parent: QWidget | None = None)

Constructor for QgsElevationControllerWidget, with the specified parent widget.

Parameters:

parent (Optional[QWidget] = None)

fixedRangeSize(self) float[source]

Returns the fixed range size, or -1 if no fixed size is set.

A fixed size forces the selected elevation range to have a matching difference between the upper and lower elevation.

Return type:

float

signal fixedRangeSizeChanged(size: float)[source]

Emitted when the fixed range size is changed from the widget.

See also

fixedRangeSize()

Parameters:

size (float)

signal invertedChanged(inverted: bool)[source]

Emitted when the elevation filter slider is inverted.

See also

setInverted()

Parameters:

inverted (bool)

menu(self) QMenu | None[source]

Returns a reference to the widget’s configuration menu, which can be used to add actions to the menu.

Return type:

Optional[QMenu]

range(self) QgsDoubleRange[source]

Returns the current visible range from the widget.

See also

setRange()

See also

rangeChanged()

Return type:

QgsDoubleRange

signal rangeChanged(range: QgsDoubleRange)[source]

Emitted when the visible range from the widget is changed.

See also

setRange()

See also

range()

Parameters:

range (QgsDoubleRange)

rangeLimits(self) QgsDoubleRange[source]

Returns the limits of the elevation range which can be selected by the widget.

See also

rangeLimits()

Return type:

QgsDoubleRange

setFixedRangeSize(self, size: float)[source]

Sets the fixed range size. Set to -1 if no fixed size is desired.

A fixed size forces the selected elevation range to have a matching difference between the upper and lower elevation.

See also

fixedRangeSize()

Parameters:

size (float)

setInverted(self, inverted: bool)[source]

Sets whether the elevation slider should be inverted.

Parameters:

inverted (bool)

setRange(self, range: QgsDoubleRange)[source]

Sets the current visible range for the widget.

See also

range()

See also

rangeChanged()

Parameters:

range (QgsDoubleRange)

setRangeLimits(self, limits: QgsDoubleRange)[source]

Sets the limits of the elevation range which can be selected by the widget.

See also

rangeLimits()

Parameters:

limits (QgsDoubleRange)

setSignificantElevations(self, elevations: Iterable[float])[source]

Sets a list of significant elevations to highlight in the widget.

Parameters:

elevations (Iterable[float])

slider(self) QgsRangeSlider | None[source]

Returns a reference to the slider component of the widget.

Return type:

Optional[QgsRangeSlider]