Class: QgsGradientFillSymbolLayerWidget

A widget for controlling the properties of a QgsGradientFillSymbolLayer.

QgsGradientFillSymbolLayerWidget in a default state

QgsGradientFillSymbolLayerWidget in a default state

Class Hierarchy

Inheritance diagram of qgis.gui.QgsGradientFillSymbolLayerWidget

Base classes

QgsSymbolLayerWidget

Abstract base class for widgets used to configure QgsSymbolLayer classes.

QWidget

QObject

QPaintDevice

class qgis.gui.QgsGradientFillSymbolLayerWidget[source]

Bases: QgsSymbolLayerWidget

__init__(vl: QgsVectorLayer | None, parent: QWidget | None = None)

Constructor for QgsGradientFillSymbolLayerWidget.

Parameters:
  • vl (Optional[QgsVectorLayer]) – associated vector layer

  • parent (Optional[QWidget] = None) – parent widget

applyColorRamp(self)[source]

Applies the color ramp passed on by the color ramp button

static create(vl: QgsVectorLayer | None) QgsSymbolLayerWidget | None[source]

Creates a new QgsGradientFillSymbolLayerWidget.

Parameters:

vl (Optional[QgsVectorLayer]) – associated vector layer

Return type:

Optional[QgsSymbolLayerWidget]

setColor(self, color: QColor | Qt.GlobalColor)[source]
Parameters:

color (Union[QColor, Qt.GlobalColor])

setColor2(self, color: QColor | Qt.GlobalColor)[source]
Parameters:

color (Union[QColor, Qt.GlobalColor])

setCoordinateMode(self, index: int)[source]
Parameters:

index (int)

setGradientSpread(self, index: int)[source]
Parameters:

index (int)

setGradientType(self, index: int)[source]
Parameters:

index (int)