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.

Added 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.

loadStyle(self)

Triggers a dialog to load a saved style

Added in version 3.30.

loadStyleFromFile(self)

Allows the user to load layer style from a file.

saveDefaultStyle(self)

Saves the default style when appropriate button is pressed

Added in version 3.30.

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.

saveStyleAs(self)

Saves a style when appriate button is pressed

Added in version 3.30.

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 available.

Parameters: