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:
layer – associated map layer
canvas – associated map canvas
settingsKey –
QgsSettings
subgroup key for saving/restore ui states, e.g. “VectorLayerProperties”.parent – parent object (owner)
fl – widget flags
settings –
custom
QgsSettings
pointerMethods
Adds properties page from a
factory
.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.
Allows the user to load layer style from a file.
Saves the current layer metadata as the default for the layer.
Allows the user to save the layer's metadata as a file.
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
andpage
associated with the dialog.
- addPropertiesPageFactory(self, factory: QgsMapLayerConfigWidgetFactory)¶
Adds properties page from a
factory
.- Parameters:
factory (QgsMapLayerConfigWidgetFactory) –
- loadDefaultMetadata(self)¶
Reloads the default layer metadata for the layer.
See also
- loadDefaultStyle(self)¶
Reloads the default style for the layer.
- loadMetadataFromFile(self)¶
Allows the user to load layer metadata from a file.
See also
- loadStyleFromFile(self)¶
Allows the user to load layer style from a file.
See also
- saveMetadataAsDefault(self)¶
Saves the current layer metadata as the default for the layer.
- saveMetadataToFile(self)¶
Allows the user to save the layer’s metadata as a file.
See also
- saveStyleAsDefault(self)¶
Saves the current layer style as the default for the layer.
- saveStyleToFile(self)¶
Allows the user to save the layer’s style to a file.
See also
- setMetadataWidget(self, widget: QgsMetadataWidget, page: QWidget)¶
Sets the metadata
widget
andpage
associated with the dialog.This must be called in order for the standard metadata loading/saving functionality to be avialable.
- Parameters:
widget (QgsMetadataWidget) –
page (QWidget) –