Class: QgsCurveEditorWidget

A widget for manipulating QgsCurveTransform curves.

Class Hierarchy

Inheritance diagram of qgis.gui.QgsCurveEditorWidget

Base classes

QWidget

QObject

QPaintDevice

Methods

curve

Returns a curve representing the current curve from the widget.

maxHistogramValueRange

Returns the maximum expected value for the range of values shown in the histogram.

minHistogramValueRange

Returns the minimum expected value for the range of values shown in the histogram.

setCurve

Sets the curve to show in the widget.

setHistogramSource

Sets a layer and expression source for values to show in a histogram behind the curve.

setMaxHistogramValueRange

Sets the maximum expected value for the range of values shown in the histogram.

setMinHistogramValueRange

Sets the minimum expected value for the range of values shown in the histogram.

Signals

changed

Emitted when the widget curve changes

class qgis.gui.QgsCurveEditorWidget[source]

Bases: QWidget

__init__(parent: QWidget | None = None, curve: QgsCurveTransform = QgsCurveTransform())

Constructor for QgsCurveEditorWidget.

Parameters:
signal changed[source]

Emitted when the widget curve changes

curve(self) QgsCurveTransform[source]

Returns a curve representing the current curve from the widget.

See also

setCurve()

Return type:

QgsCurveTransform

maxHistogramValueRange(self) float[source]

Returns the maximum expected value for the range of values shown in the histogram.

Return type:

float

minHistogramValueRange(self) float[source]

Returns the minimum expected value for the range of values shown in the histogram.

Return type:

float

setCurve(self, curve: QgsCurveTransform)[source]

Sets the curve to show in the widget.

See also

curve()

Parameters:

curve (QgsCurveTransform)

setHistogramSource(self, layer: QgsVectorLayer | None, expression: str | None)[source]

Sets a layer and expression source for values to show in a histogram behind the curve. The histogram is generated in a background thread to keep the widget responsive.

Parameters:
setMaxHistogramValueRange(self, maxValueRange: float)[source]

Sets the maximum expected value for the range of values shown in the histogram.

Parameters:

maxValueRange (float)

setMinHistogramValueRange(self, minValueRange: float)[source]

Sets the minimum expected value for the range of values shown in the histogram.

Parameters:

minValueRange (float)