Class: QgsLayerPropertiesDialog

class qgis.gui.QgsLayerPropertiesDialog

Bases: QgsOptionsDialogBase

Base class for “layer properties” dialogs, containing common utilities for handling functionality in these dialog.

Warning

This is exposed to SIP bindings for legacy reasons only, and is NOT to be considered as stable API.

New in version 3.34.

QgsLayerPropertiesDialog(layer: QgsMapLayer, canvas: QgsMapCanvas, settingsKey: str, parent: QWidget = None, fl: Union[Qt.WindowFlags, Qt.WindowType] = Qt.WindowFlags(), settings: QgsSettings = None) Constructor for QgsLayerPropertiesDialog.

Parameters:
addPropertiesPageFactory(self, factory: QgsMapLayerConfigWidgetFactory)

Adds properties page from a factory.

Parameters:

factory (QgsMapLayerConfigWidgetFactory) –

loadDefaultMetadata(self)

Reloads the default layer metadata for the layer.

loadDefaultStyle(self)

Reloads the default style for the layer.

loadMetadataFromFile(self)

Allows the user to load layer metadata from a file.

loadStyleFromFile(self)

Allows the user to load layer style from a file.

saveMetadataAsDefault(self)

Saves the current layer metadata as the default for the layer.

loadDefaultMetadata()

saveMetadataToFile(self)

Allows the user to save the layer’s metadata as a file.

saveStyleAsDefault(self)

Saves the current layer style as the default for the layer.

loadDefaultStyle()

saveStyleToFile(self)

Allows the user to save the layer’s style to a file.

setMetadataWidget(self, widget: QgsMetadataWidget, page: QWidget)

Sets the metadata widget and page associated with the dialog.

This must be called in order for the standard metadata loading/saving functionality to be avialable.

Parameters: