Class: QgsGradientStopEditor¶
An interactive editor for previewing a gradient color ramp and modifying the position of color stops along the gradient.
List of all members, including inherited members
Class Hierarchy¶
Base classes¶
Constructor
Methods
Deletes the current selected stop. |
|
Returns the current ramp created by the editor. |
|
Sets the currently selected stop. |
|
Returns details about the currently selected stop. |
|
Sets the color for the first stop. |
|
Sets the color for the last stop. |
|
Sets the current ramp shown in the editor. |
|
Sets the color for the current selected stop. |
|
Sets the color spec for the current selected stop. |
|
Sets the color and offset for the current selected stop. |
|
Sets the hue angular direction for the current selected stop. |
|
Sets the offset for the current selected stop. |
Signals
Emitted when the gradient ramp is changed by a user |
|
Emitted when the current selected stop changes. |
- class qgis.gui.QgsGradientStopEditor[source]¶
Bases:
QWidget- __init__(parent: QWidget | None = None, ramp: QgsGradientColorRamp | None = None)¶
Constructor for QgsGradientStopEditor.
- Parameters:
parent (Optional[QWidget] = None) – parent widget
ramp (Optional[QgsGradientColorRamp] = None) – optional initial gradient ramp
- deleteSelectedStop(self)[source]¶
Deletes the current selected stop. This slot has no effect if either the first or last stop is selected, as they cannot be deleted.
- gradientRamp(self) QgsGradientColorRamp[source]¶
Returns the current ramp created by the editor.
See also
- Return type:
- selectStop(self, index: int)[source]¶
Sets the currently selected stop.
- Parameters:
index (int) – index of stop, where 0 corresponds to the first stop
See also
- selectedStop(self) QgsGradientStop[source]¶
Returns details about the currently selected stop.
See also
- Return type:
- signal selectedStopChanged(stop: QgsGradientStop)[source]¶
Emitted when the current selected stop changes.
- Parameters:
stop (QgsGradientStop) – details about newly selected stop
- setColor1(self, color: QColor | Qt.GlobalColor | int)[source]¶
Sets the color for the first stop.
- Parameters:
color (Union[QColor, Qt.GlobalColor, int]) – new stop color
See also
See also
- setColor2(self, color: QColor | Qt.GlobalColor | int)[source]¶
Sets the color for the last stop.
- Parameters:
color (Union[QColor, Qt.GlobalColor, int]) – new stop color
See also
See also
- setGradientRamp(self, ramp: QgsGradientColorRamp)[source]¶
Sets the current ramp shown in the editor.
- Parameters:
ramp (QgsGradientColorRamp) – color ramp
See also
- setSelectedStopColor(self, color: QColor | Qt.GlobalColor | int)[source]¶
Sets the color for the current selected stop.
- Parameters:
color (Union[QColor, Qt.GlobalColor, int]) – new stop color
See also
See also
See also
See also
- setSelectedStopColorSpec(self, spec: QColor.Spec)[source]¶
Sets the color
specfor the current selected stop.Added in version 3.24.
- Parameters:
spec (QColor.Spec)
- setSelectedStopDetails(self, color: QColor | Qt.GlobalColor | int, offset: float)[source]¶
Sets the color and offset for the current selected stop.
- Parameters:
color (Union[QColor, Qt.GlobalColor, int]) – new stop color
offset (float) – new stop offset
See also
See also
- setSelectedStopDirection(self, direction: Qgis.AngularDirection)[source]¶
Sets the hue angular direction for the current selected stop.
Added in version 3.24.
- Parameters:
direction (Qgis.AngularDirection)