Class: QgsMetadataWidget

class qgis.gui.QgsMetadataWidget(parent: QWidget = None, layer: QgsMapLayer = None)

Bases: PyQt5.QtWidgets.QWidget

Constructor for the wizard.

If layer is set, then this constructor automatically sets the widget’s metadata() to match the layer’s metadata..

See also

setMetadata()

A wizard to edit metadata on a map layer.

New in version 3.0: Enums

Methods

acceptMetadata Saves the metadata to the layer.
actionEvent
changeEvent
checkMetadata Check if values in the wizard are correct.
childEvent
closeEvent
connectNotify
contextMenuEvent
create
crsChanged If the CRS is updated.
customEvent
destroy
disconnectNotify
dragEnterEvent
dragLeaveEvent
dragMoveEvent
dropEvent
enterEvent
event
focusInEvent
focusNextChild
focusNextPrevChild
focusOutEvent
focusPreviousChild
hideEvent
initPainter
inputMethodEvent
isSignalConnected
keyPressEvent
keyReleaseEvent
leaveEvent
metadata Returns a QgsAbstractMetadataBase object representing the current state of the widget.
metric
mode Returns the widget’s current mode.
mouseDoubleClickEvent
mouseMoveEvent
mousePressEvent
mouseReleaseEvent
moveEvent
nativeEvent
paintEvent
parseLanguages Returns a list of languages available by default in the wizard.
parseLicenses Returns a list of licences available by default in the wizard.
parseLinkTypes Returns a list of link types available by default in the wizard.
parseMimeTypes Returns a list of MIME types available by default in the wizard.
parseTypes Returns a list of types available by default in the wizard.
receivers
resizeEvent
saveMetadata Save all fields in a metadata object.
sender
senderSignalIndex
setMapCanvas Sets a map canvas associated with the widget.
setMetadata Sets the metadata to display in the widget.
setMode Sets the widget’s current mode.
setTitle Sets the title field for the metadata.
sharedPainter
showEvent
tabletEvent
timerEvent
title Returns the current title field for the metadata.
updateMicroFocus
wheelEvent

Signals

titleChanged Emitted when the title field is changed.

Attributes

LayerMetadata
ProjectMetadata
LayerMetadata = 0
class Mode

Bases: int

ProjectMetadata = 1
acceptMetadata(self)

Saves the metadata to the layer.

actionEvent()
changeEvent()
checkMetadata(self) → bool

Check if values in the wizard are correct.

See also

saveMetadata()

childEvent()
closeEvent()
connectNotify()
contextMenuEvent()
create()
crsChanged(self)

If the CRS is updated.

customEvent()
destroy()
disconnectNotify()
dragEnterEvent()
dragLeaveEvent()
dragMoveEvent()
dropEvent()
enterEvent()
event()
focusInEvent()
focusNextChild()
focusNextPrevChild()
focusOutEvent()
focusPreviousChild()
hideEvent()
initPainter()
inputMethodEvent()
isSignalConnected()
keyPressEvent()
keyReleaseEvent()
leaveEvent()
metadata(self) → QgsAbstractMetadataBase

Returns a QgsAbstractMetadataBase object representing the current state of the widget.

Caller takes ownership of the returned object.

See also

saveMetadata()

metric()
mode(self) → QgsMetadataWidget.Mode

Returns the widget’s current mode.

See also

setMode()

New in version 3.2.

mouseDoubleClickEvent()
mouseMoveEvent()
mousePressEvent()
mouseReleaseEvent()
moveEvent()
nativeEvent()
paintEvent()
parseLanguages() → Dict[str, str]

Returns a list of languages available by default in the wizard.

parseLicenses() → List[str]

Returns a list of licences available by default in the wizard.

parseLinkTypes() → List[str]

Returns a list of link types available by default in the wizard.

See also

https()

parseMimeTypes() → List[str]

Returns a list of MIME types available by default in the wizard.

See also

https()

parseTypes() → Dict[str, str]

Returns a list of types available by default in the wizard.

receivers()
resizeEvent()
saveMetadata(self, metadata: QgsAbstractMetadataBase)

Save all fields in a metadata object.

See also

metadata()

See also

acceptMetadata()

See also

checkMetadata()

sender()
senderSignalIndex()
setMapCanvas(self, canvas: QgsMapCanvas)

Sets a map canvas associated with the widget.

setMetadata(self, metadata: QgsAbstractMetadataBase)

Sets the metadata to display in the widget.

This method can be called after constructing a QgsMetadataWidget in order to set the displayed metadata to custom, non-layer based metadata.

Calling this method will automatically setMode() to the correct mode corresponding to the specified metadata object.

See also

metadata()

setMode(self, mode: QgsMetadataWidget.Mode)

Sets the widget’s current mode.

See also

mode()

New in version 3.2.

setTitle(self, title: str)

Sets the title field for the metadata.

See also

title()

See also

titleChanged()

New in version 3.2.

sharedPainter()
showEvent()
tabletEvent()
timerEvent()
title(self) → str

Returns the current title field for the metadata.

See also

setTitle()

See also

titleChanged()

New in version 3.2.

titleChanged

Emitted when the title field is changed.

See also

title()

See also

setTitle()

New in version 3.2: [signal]

updateMicroFocus()
wheelEvent()