QGIS API Documentation 3.34.0-Prizren (ffbdd678812)
Loading...
Searching...
No Matches
Signals | Public Member Functions | List of all members
QgsMapViewsManager Class Reference

Manages storage of a set of views. More...

#include <qgsmapviewsmanager.h>

Inheritance diagram for QgsMapViewsManager:
Inheritance graph
[legend]

Signals

void views3DListChanged ()
 Emitted when the views list has changed (whenever a view was removed, added, renamed..)
 

Public Member Functions

 QgsMapViewsManager (QgsProject *project)
 Constructor for QgsMapViewsManager.
 
void clear ()
 Removes and deletes all views from the manager.
 
QList< QDomElement > get3DViews () const
 Returns the list of configurations of 3D views added to the manager.
 
QDomElement get3DViewSettings (const QString &name) const
 Returns the DOM element representing the settings of the 3D view named name.
 
QStringList get3DViewsNames () const
 Returns the names of all 3D views added to the manager.
 
bool is3DViewOpen (const QString &name)
 Returns whether the 3D view named name will is opened.
 
bool readXml (const QDomElement &element, const QDomDocument &doc)
 Reads the manager's state from a DOM element, restoring all views present in the XML document.
 
void register3DViewSettings (const QString &name, const QDomElement &dom)
 Adds a new 3D view named name to the manager with the configuration DOM dom.
 
void remove3DView (const QString &name)
 Removes the configuration of the 3D view named name.
 
void rename3DView (const QString &oldTitle, const QString &newTitle)
 Renames the 3D view named oldTitle to newTitle.
 
void set3DViewInitiallyVisible (const QString &name, bool visible)
 Sets whether the 3D view named name will be initially visible when the project is opened.
 
QDomElement writeXml (QDomDocument &doc) const
 Returns a DOM element representing the state of the manager.
 

Detailed Description

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().

Since
QGIS 3.24

Definition at line 40 of file qgsmapviewsmanager.h.

Constructor & Destructor Documentation

◆ QgsMapViewsManager()

QgsMapViewsManager::QgsMapViewsManager ( QgsProject project)
explicit

Constructor for QgsMapViewsManager.

The project will become the parent object for this manager.

Definition at line 19 of file qgsmapviewsmanager.cpp.

Member Function Documentation

◆ clear()

void QgsMapViewsManager::clear ( )

Removes and deletes all views from the manager.

Definition at line 56 of file qgsmapviewsmanager.cpp.

◆ get3DViews()

QList< QDomElement > QgsMapViewsManager::get3DViews ( ) const

Returns the list of configurations of 3D views added to the manager.

Note
Not available in Python bindings

Definition at line 67 of file qgsmapviewsmanager.cpp.

◆ get3DViewSettings()

QDomElement QgsMapViewsManager::get3DViewSettings ( const QString &  name) const

Returns the DOM element representing the settings of the 3D view named name.

Note
Not available in Python bindings

Definition at line 62 of file qgsmapviewsmanager.cpp.

◆ get3DViewsNames()

QStringList QgsMapViewsManager::get3DViewsNames ( ) const

Returns the names of all 3D views added to the manager.

Note
Not available in Python bindings

Definition at line 78 of file qgsmapviewsmanager.cpp.

◆ is3DViewOpen()

bool QgsMapViewsManager::is3DViewOpen ( const QString &  name)

Returns whether the 3D view named name will is opened.

Note
Not available in Python bindings.

Definition at line 106 of file qgsmapviewsmanager.cpp.

◆ readXml()

bool QgsMapViewsManager::readXml ( const QDomElement &  element,
const QDomDocument &  doc 
)

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

See also
writeXml()

Definition at line 25 of file qgsmapviewsmanager.cpp.

◆ register3DViewSettings()

void QgsMapViewsManager::register3DViewSettings ( const QString &  name,
const QDomElement &  dom 
)

Adds a new 3D view named name to the manager with the configuration DOM dom.

Note
Not available in Python bindings

Definition at line 72 of file qgsmapviewsmanager.cpp.

◆ remove3DView()

void QgsMapViewsManager::remove3DView ( const QString &  name)

Removes the configuration of the 3D view named name.

Definition at line 83 of file qgsmapviewsmanager.cpp.

◆ rename3DView()

void QgsMapViewsManager::rename3DView ( const QString &  oldTitle,
const QString &  newTitle 
)

Renames the 3D view named oldTitle to newTitle.

Definition at line 89 of file qgsmapviewsmanager.cpp.

◆ set3DViewInitiallyVisible()

void QgsMapViewsManager::set3DViewInitiallyVisible ( const QString &  name,
bool  visible 
)

Sets whether the 3D view named name will be initially visible when the project is opened.

Note
Not available in Python bindings

Definition at line 98 of file qgsmapviewsmanager.cpp.

◆ views3DListChanged

void QgsMapViewsManager::views3DListChanged ( )
signal

Emitted when the views list has changed (whenever a view was removed, added, renamed..)

◆ writeXml()

QDomElement QgsMapViewsManager::writeXml ( QDomDocument &  doc) const

Returns a DOM element representing the state of the manager.

See also
readXml()

Definition at line 48 of file qgsmapviewsmanager.cpp.


The documentation for this class was generated from the following files: