Class: QgsMapViewsManager

class qgis.core.QgsMapViewsManager

Bases: PyQt5.QtCore.QObject

Manages storage of a set of views.

QgsMapViewsManager handles the storage, serializing and deserializing of views. Usually this class is not constructed directly, but rather accessed through a QgsProject via QgsProject.viewsManager().

New in version 3.24.

QgsMapViewsManager(project: QgsProject) Constructor for QgsMapViewsManager. The project will become the parent object for this manager.

Methods

childEvent

clear

Removes and deletes all views from the manager.

connectNotify

customEvent

disconnectNotify

isSignalConnected

readXml

Reads the manager's state from a DOM element, restoring all views present in the XML document

receivers

remove3DView

Removes the configuration of the 3D view named name

rename3DView

Renames the 3D view named oldTitle to newTitle

sender

senderSignalIndex

timerEvent

writeXml

Returns a DOM element representing the state of the manager.

Signals

views3DListChanged

pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL

childEvent(self, QChildEvent)
clear(self)

Removes and deletes all views from the manager.

connectNotify(self, QMetaMethod)
customEvent(self, QEvent)
disconnectNotify(self, QMetaMethod)
isSignalConnected(self, QMetaMethod) bool
readXml(self, element: QDomElement, doc: QDomDocument) bool

Reads the manager’s state from a DOM element, restoring all views present in the XML document

See also

writeXml()

Parameters
  • element (QDomElement) –

  • doc (QDomDocument) –

Return type

bool

receivers(self, PYQT_SIGNAL) int
remove3DView(self, name: str)

Removes the configuration of the 3D view named name

Parameters

name (str) –

rename3DView(self, oldTitle: str, newTitle: str)

Renames the 3D view named oldTitle to newTitle

Parameters
  • oldTitle (str) –

  • newTitle (str) –

sender(self) QObject
senderSignalIndex(self) int
timerEvent(self, QTimerEvent)
views3DListChanged

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Parameters
  • name (str = ...) –

  • revision (int = ...) –

  • arguments (Sequence = ...) –

Return type

PYQT_SIGNAL

writeXml(self, doc: QDomDocument) QDomElement

Returns a DOM element representing the state of the manager.

See also

readXml()

Parameters

doc (QDomDocument) –

Return type

QDomElement