Class: QgsTextFormatDialog¶
A simple dialog for customizing text formatting settings.
QgsTextFormatDialog
provides a dialog 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¶
Methods
Returns a reference to the dialog's button box. |
|
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. |
- class qgis.gui.QgsTextFormatDialog[source]¶
Bases:
QDialog
- __init__(format: QgsTextFormat, mapCanvas: QgsMapCanvas | None = None, parent: QWidget | None = None, fl: Qt.WindowFlags | Qt.WindowType = QgsGuiUtils.ModalDialogFlags, layer: QgsMapLayer | None = None)
Constructor for QgsTextFormatDialog.
- Parameters:
format (QgsTextFormat) – initial format settings to show in dialog
mapCanvas (Optional[QgsMapCanvas] = None) – optional associated map canvas
parent (Optional[QWidget] = None) – parent widget
fl (Union[Qt.WindowFlags, Qt.WindowType] = QgsGuiUtils.ModalDialogFlags) – window flags for dialog
layer (Optional[QgsMapLayer] = None) – associated vector layer
- buttonBox(self) QDialogButtonBox | None [source]¶
Returns a reference to the dialog’s button box.
Added in version 3.10.
- Return type:
Optional[QDialogButtonBox]
- 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)