Class: QgsLayerPropertiesDialog¶
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.
Class Hierarchy¶
Base classes¶
A base dialog for options and properties dialogs that offers vertical tabs. It handles saving/restoring of geometry, splitter and current tab states, switching vertical tabs between icon/text to icon-only modes (splitter collapsed to left), and connecting QDialogButtonBox’s accepted/rejected signals to dialog’s accept/reject slots |
|
Subclasses¶
Property sheet for a mesh map layer. Contains information, source and style tabs |
|
Property sheet for a raster map layer |
|
Vectortile layer properties dialog |
Methods
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. |
|
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. |
- 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
- 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])