Class: QgsColorRampLegendNodeWidget¶
A widget for properties relating to a QgsColorRampLegendNode
(QgsColorRampLegendNodeSettings).
The current settings are set by a call to setSettings(), and
the settings defined by the widget are retrieved by calling
settings().
When changes are made the to settings by a user the
widgetChanged() signal is emitted.
Added in version 3.18.
List of all members, including inherited members
Class Hierarchy¶
Base classes¶
Base class for any widget that can be shown as an inline panel. |
|
Enums
Capabilities to expose in the widget. |
Methods
Sets the settings to show in the widget. |
|
Sets visibility for the "Use Continuous Legend" checkbox to visible. |
|
Returns the legend node settings as defined by the widget. |
- class qgis.gui.QgsColorRampLegendNodeWidget[source]¶
Bases:
QgsPanelWidget- __init__(parent: QWidget | None = None, capabilities: QgsColorRampLegendNodeWidget.Capability = QgsColorRampLegendNodeWidget.Capability.AllCapabilities)
Constructor for QgsColorRampLegendNodeWidget, with the specified
parentwidget.Since QGIS 3.38, the
capabilitiesargument can be used to fine-tune settings exposed in the widget.- Parameters:
parent (Optional[QWidget] = None)
capabilities (QgsColorRampLegendNodeWidget.Capability = QgsColorRampLegendNodeWidget.Capability.AllCapabilities)
- Capabilities()¶
- class Capability(*values)¶
Bases:
IntFlagCapabilities to expose in the widget.
Added in version 3.38.
Prefix: Allow editing legend prefixSuffix: Allow editing legend suffixNumberFormat: Allow editing number formatDefaultMinimum: Allow resetting minimum label to defaultDefaultMaximum: Allow resetting maximum label to defaultAllCapabilities: All capabilities
- AllCapabilities = 31¶
- DefaultMaximum = 16¶
- DefaultMinimum = 8¶
- NumberFormat = 4¶
- Prefix = 1¶
- Suffix = 2¶
- setSettings(self, settings: QgsColorRampLegendNodeSettings)[source]¶
Sets the settings to show in the widget.
See also
- Parameters:
settings (QgsColorRampLegendNodeSettings)
- setUseContinuousRampCheckBoxVisibility(self, visible: bool)[source]¶
Sets visibility for the “Use Continuous Legend” checkbox to
visible.This widget is visible and checked by default but in a few cases it does not need to be visible because disabling it would not make sense (for instance when using single band gray renderer).
- Parameters:
visible (bool)
- settings(self) QgsColorRampLegendNodeSettings[source]¶
Returns the legend node settings as defined by the widget.
See also
- Return type: