QgsCurveEditorWidget class

A widget for manipulating QgsCurveTransform curves.

Constructors, destructors, conversion operators

QgsCurveEditorWidget(QWidget* parent = nullptr, const QgsCurveTransform& curve = QgsCurveTransform())
Constructor for QgsCurveEditorWidget.

Public functions

auto curve() const -> QgsCurveTransform
Returns a curve representing the current curve from the widget.
auto maxHistogramValueRange() const -> double
Returns the maximum expected value for the range of values shown in the histogram.
auto minHistogramValueRange() const -> double
Returns the minimum expected value for the range of values shown in the histogram.
void setCurve(const QgsCurveTransform& curve)
Sets the curve to show in the widget.
void setHistogramSource(const QgsVectorLayer* layer, const QString& expression)
Sets a layer and expression source for values to show in a histogram behind the curve.

Signals

void changed()
Emitted when the widget curve changes.

Public slots

void setMaxHistogramValueRange(double maxValueRange)
Sets the maximum expected value for the range of values shown in the histogram.
void setMinHistogramValueRange(double minValueRange)
Sets the minimum expected value for the range of values shown in the histogram.

Function documentation

QgsCurveTransform QgsCurveEditorWidget::curve() const

Returns a curve representing the current curve from the widget.

double QgsCurveEditorWidget::maxHistogramValueRange() const

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

double QgsCurveEditorWidget::minHistogramValueRange() const

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

void QgsCurveEditorWidget::setCurve(const QgsCurveTransform& curve)

Sets the curve to show in the widget.

void QgsCurveEditorWidget::setHistogramSource(const QgsVectorLayer* layer, const QString& expression)

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.

void QgsCurveEditorWidget::setMaxHistogramValueRange(double maxValueRange) public slot

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

void QgsCurveEditorWidget::setMinHistogramValueRange(double minValueRange) public slot

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