Class: QgsLegendPatchShapeButton¶
A button for creating and modifying QgsLegendPatchShape
settings.
Added in version 3.14.
Class Hierarchy¶
Base classes¶
- class qgis.gui.QgsLegendPatchShapeButton[source]¶
Bases:
QToolButton- __init__(parent: QWidget | None = None, dialogTitle: str | None = '')
Construct a new patch shape button with the specified
parentwidget. UsedialogTitlestring to define the title to show in the legend patch shape widget.- Parameters:
parent (Optional[QWidget] = None)
dialogTitle (Optional[str] = '')
- signal changed[source]¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- dialogTitle(self) str[source]¶
Returns the title for the symbol settings dialog window.
See also
- Return type:
str
- messageBar(self) QgsMessageBar | None[source]¶
Returns the message bar associated with the widget.
See also
Added in version 3.6.
- Return type:
Optional[QgsMessageBar]
- setDialogTitle(self, title: str | None)[source]¶
Sets the
titlefor the symbol settings dialog window.See also
- Parameters:
title (Optional[str])
- setMessageBar(self, bar: QgsMessageBar | None)[source]¶
Sets the message
barassociated with the widget. This allows the widget to push feedback messages to the appropriate message bar.See also
Added in version 3.6.
- Parameters:
bar (Optional[QgsMessageBar])
- setPreviewSymbol(self, symbol: QgsSymbol | None)[source]¶
Sets the symbol to use for previewing the legend patch shape.
Ownership is transferred to the button. It is the caller’s responsibility to ensure that the symbol type matches the button’s
symbolType()- Parameters:
symbol (Optional[QgsSymbol])
- setShape(self, shape: QgsLegendPatchShape)[source]¶
Sets the
shapefor the button.See also
See also
- Parameters:
shape (QgsLegendPatchShape)
- setSymbolType(self, type: Qgis.SymbolType)[source]¶
Sets the symbol
typewhich the button requires. If the type differs from the current symbol type, the symbol will be reset to a default symbol style of the new type.See also
- Parameters:
type (Qgis.SymbolType)
- shape(self) QgsLegendPatchShape[source]¶
Returns the current shape defined by the button.
See also
See also
- Return type:
- symbolType(self) Qgis.SymbolType[source]¶
Returns the symbol type which the button requires.
See also
- Return type: