Class: QgsLayerPropertiesDialog¶
Base class for “layer properties” dialogs, containing common utilities for handling functionality in these dialogs.
Warning
This is exposed to SIP bindings for legacy reasons only, and is NOT to be considered as stable API.
Added in version 3.34.
Class Hierarchy¶
Base classes¶
A base dialog for options and properties dialogs that offers vertical tabs. |
|
Subclasses¶
A dialog for configuring mesh layer properties. |
|
A dialog for raster layer properties. |
|
Layer properties dialog for vector layers. |
|
Layer properties dialog for vector tile layers. |
Methods
Reloads the default layer metadata for the layer. |
|
Reloads the default style for the layer. |
|
Allows the user to load layer metadata from a file. |
|
Triggers a dialog to load a saved style |
|
Allows the user to load layer style from a file. |
|
Saves the default style when appropriate button is pressed |
|
Saves the current layer metadata as the default for the layer. |
|
Allows the user to save the layer's metadata as a file. |
|
Saves a style when appriate button is pressed |
|
Saves the current layer style as the default for the layer. |
|
Allows the user to save the layer's style to a file. |
|
Sets the metadata widget and page associated with the dialog. |
Virtual Methods
In PyQGIS, only methods marked as virtual
can be safely overridden in a Python subclass of QgsLayerPropertiesDialog. See the FAQ for more details.
Adds properties page from a factory. |
- class qgis.gui.QgsLayerPropertiesDialog[source]¶
Bases:
QgsOptionsDialogBase
- __init__(layer: QgsMapLayer | None, canvas: QgsMapCanvas | None, settingsKey: str | None, parent: QWidget | None = None, fl: Qt.WindowFlags | Qt.WindowType = Qt.WindowFlags(), settings: QgsSettings | None = None)
Constructor for QgsLayerPropertiesDialog.
- Parameters:
layer (Optional[QgsMapLayer]) – associated map layer
canvas (Optional[QgsMapCanvas]) – associated map canvas
settingsKey (Optional[str]) –
QgsSettings
subgroup key for saving/restore ui states, e.g. “VectorLayerProperties”.parent (Optional[QWidget] = None) – parent object (owner)
fl (Union[Qt.WindowFlags, Qt.WindowType] = Qt.WindowFlags()) – widget flags
settings (Optional[QgsSettings] = None) – custom
QgsSettings
pointer
- virtual addPropertiesPageFactory(self, factory: QgsMapLayerConfigWidgetFactory | None)[source]¶
Adds properties page from a
factory
.- Parameters:
factory (Optional[QgsMapLayerConfigWidgetFactory])
- saveDefaultStyle(self)[source]¶
Saves the default style when appropriate button is pressed
Added in version 3.30.
- setMetadataWidget(self, widget: QgsMetadataWidget | None, page: QWidget | None)[source]¶
Sets the metadata
widget
andpage
associated with the dialog.This must be called in order for the standard metadata loading/saving functionality to be available.
- Parameters:
widget (Optional[QgsMetadataWidget])
page (Optional[QWidget])