Class: QgsRendererPropertiesDialog

A dialog for configuring vector layer renderers.

QgsRendererPropertiesDialog showing a QgsSingleSymbolRenderer in the default (dialog) mode

QgsRendererPropertiesDialog showing a QgsSingleSymbolRenderer in the default (dialog) mode

QgsRendererPropertiesDialog showing a QgsSingleSymbolRenderer in an embedded widget mode

QgsRendererPropertiesDialog showing a QgsSingleSymbolRenderer in an embedded widget mode

Class Hierarchy

Inheritance diagram of qgis.gui.QgsRendererPropertiesDialog

Base classes

QDialog

QWidget

QObject

QPaintDevice

class qgis.gui.QgsRendererPropertiesDialog[source]

Bases: QDialog

__init__(layer: QgsVectorLayer | None, style: QgsStyle | None, embedded: bool = False, parent: QWidget | None = None)

Constructor for QgsRendererPropertiesDialog.

Parameters:
  • layer (Optional[QgsVectorLayer]) – associated layer

  • style (Optional[QgsStyle]) – style collection

  • embedded (bool = False) – set to True to indicate that the dialog will be embedded in another widget, rather than shown as a dialog by itself

  • parent (Optional[QWidget] = None) – parent widget

apply(self)[source]

Apply the changes from the dialog to the layer.

connectValueChanged(self, widgets: Iterable[QWidget])[source]

Connect the value changed event for the set of widgets to widgetChanged signal. Each widget is checked for type and the common type of signal is connected to widgetChanged.

Parameters:

widgets (Iterable[QWidget]) – The list of widgets to check.

signal layerVariablesChanged[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.

onOK(self)[source]

Apply and accept the changes for the dialog.

openPanel(self, panel: QgsPanelWidget | None)[source]

Open a panel or dialog depending on dock mode setting If dock mode is True this method will emit the showPanel signal for connected slots to handle the open event.

If dock mode is False this method will open a dialog and block the user.

Parameters:

panel (Optional[QgsPanelWidget]) – The panel widget to open.

rendererChanged(self)[source]

called when user changes renderer type

setContext(self, context: QgsSymbolWidgetContext)[source]

Sets the context in which the dialog is shown, e.g., the associated map canvas and expression contexts.

Added in version 3.6.

Parameters:

context (QgsSymbolWidgetContext)

setDockMode(self, dockMode: bool)[source]

Set the widget in dock mode which tells the widget to emit panel widgets and not open dialogs

Parameters:

dockMode (bool) – True to enable dock mode.

setMapCanvas(self, canvas: QgsMapCanvas | None)[source]

Sets the map canvas associated with the dialog. This allows the widget to retrieve the current map scale and other properties from the canvas.

Parameters:

canvas (Optional[QgsMapCanvas]) – map canvas

signal showPanel[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.

signal widgetChanged[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.