Class: QgsTextFormatPanelWidget¶
A panel widget for customizing text formatting settings.
QgsTextFormatPanelWidget
provides a panel widget for
controlling the appearance of text rendered using
QgsTextRenderer
. The dialog includes all settings contained
within a QgsTextFormat
, including shadow, background and
buffer.
Class Hierarchy¶
Base classes¶
Wrapper widget for existing widgets which can’t have the inheritance tree changed, e.g dialogs. |
|
Base class for any widget that can be shown as an inline panel. |
|
Methods
Returns the current formatting settings defined by the widget. |
|
Sets the context in which the widget is shown, e.g., the associated map canvas and expression contexts. |
|
Sets the format to show in the widget. |
- class qgis.gui.QgsTextFormatPanelWidget[source]¶
Bases:
QgsPanelWidgetWrapper
- __init__(format: QgsTextFormat, mapCanvas: QgsMapCanvas | None = None, parent: QWidget | None = None, layer: QgsMapLayer | None = None)
Constructor for QgsTextFormatPanelWidget.
- Parameters:
format (QgsTextFormat) – initial format settings to show in dialog
mapCanvas (Optional[QgsMapCanvas] = None) – optional associated map canvas
parent (Optional[QWidget] = None) – parent widget
layer (Optional[QgsMapLayer] = None) – associated layer
- format(self) QgsTextFormat [source]¶
Returns the current formatting settings defined by the widget.
- Return type:
- setContext(self, context: QgsSymbolWidgetContext)[source]¶
Sets the
context
in which the widget is shown, e.g., the associated map canvas and expression contexts.Added in version 3.10.
- Parameters:
context (QgsSymbolWidgetContext)
- setFormat(self, format: QgsTextFormat)[source]¶
Sets the
format
to show in the widget.Added in version 3.16.
- Parameters:
format (QgsTextFormat)