Class: QgsLimitedRandomColorRampWidget

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

Class Hierarchy

Inheritance diagram of qgis.gui.QgsLimitedRandomColorRampWidget

Base classes

QgsPanelWidget

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

QWidget

QObject

QPaintDevice

Methods

ramp

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

setCount

Sets the number of colors to create in the ramp

setHue1

Sets the minimum hue for colors in the ramp

setHue2

Sets the maximum hue for colors in the ramp

setRamp

Sets the color ramp to show in the dialog.

setSat1

Sets the minimum saturation for colors in the ramp

setSat2

Sets the maximum saturation for colors in the ramp

setVal1

Sets the minimum value for colors in the ramp

setVal2

Sets the maximum value for colors in the ramp

Signals

changed

Emitted when the dialog settings change

class qgis.gui.QgsLimitedRandomColorRampWidget[source]

Bases: QgsPanelWidget

__init__(ramp: QgsLimitedRandomColorRamp, parent: QWidget | None = None)

Constructor for QgsLimitedRandomColorRampWidget.

Parameters:
signal changed[source]

Emitted when the dialog settings change

ramp(self) QgsLimitedRandomColorRamp[source]

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

See also

setRamp()

Return type:

QgsLimitedRandomColorRamp

setCount(self, val: int)[source]

Sets the number of colors to create in the ramp

Parameters:

val (int)

setHue1(self, val: int)[source]

Sets the minimum hue for colors in the ramp

Parameters:

val (int)

setHue2(self, val: int)[source]

Sets the maximum hue for colors in the ramp

Parameters:

val (int)

setRamp(self, ramp: QgsLimitedRandomColorRamp)[source]

Sets the color ramp to show in the dialog.

Parameters:

ramp (QgsLimitedRandomColorRamp) – color ramp

See also

ramp()

setSat1(self, val: int)[source]

Sets the minimum saturation for colors in the ramp

Parameters:

val (int)

setSat2(self, val: int)[source]

Sets the maximum saturation for colors in the ramp

Parameters:

val (int)

setVal1(self, val: int)[source]

Sets the minimum value for colors in the ramp

Parameters:

val (int)

setVal2(self, val: int)[source]

Sets the maximum value for colors in the ramp

Parameters:

val (int)