QgsLimitedRandomColorRampWidget class

A widget which allows users to modify the properties of a QgsLimitedRandomColorRamp.

Base classes

class QgsPanelWidget
Base class for any widget that can be shown as a inline panel.

Constructors, destructors, conversion operators

QgsLimitedRandomColorRampWidget(const QgsLimitedRandomColorRamp& ramp, QWidget* parent = nullptr)
Constructor for QgsLimitedRandomColorRampWidget.

Public functions

auto ramp() const -> QgsLimitedRandomColorRamp
Returns a color ramp representing the current settings from the dialog.
void setRamp(const QgsLimitedRandomColorRamp& ramp)
Sets the color ramp to show in the dialog.

Signals

void changed()
Emitted when the dialog settings change.

Public slots

void setCount(int val)
Sets the number of colors to create in the ramp.
void setHue1(int val)
Sets the minimum hue for colors in the ramp.
void setHue2(int val)
Sets the maximum hue for colors in the ramp.
void setSat1(int val)
Sets the minimum saturation for colors in the ramp.
void setSat2(int val)
Sets the maximum saturation for colors in the ramp.
void setVal1(int val)
Sets the minimum value for colors in the ramp.
void setVal2(int val)
Sets the maximum value for colors in the ramp.

Function documentation

QgsLimitedRandomColorRampWidget::QgsLimitedRandomColorRampWidget(const QgsLimitedRandomColorRamp& ramp, QWidget* parent = nullptr)

Constructor for QgsLimitedRandomColorRampWidget.

Parameters
ramp initial ramp to show in dialog
parent parent widget

QgsLimitedRandomColorRamp QgsLimitedRandomColorRampWidget::ramp() const

Returns a color ramp representing the current settings from the dialog.

void QgsLimitedRandomColorRampWidget::setRamp(const QgsLimitedRandomColorRamp& ramp)

Sets the color ramp to show in the dialog.

Parameters
ramp color ramp