QGIS API Documentation 3.30.0-'s-Hertogenbosch (f186b8efe0)
|
Manages storage of a set of views. More...
#include <qgsmapviewsmanager.h>
Signals | |
void | views3DListChanged () |
Emitted when the views list has changed (whenever a view was removed, added, renamed..) More... | |
Public Member Functions | |
QgsMapViewsManager (QgsProject *project) | |
Constructor for QgsMapViewsManager. More... | |
void | clear () |
Removes and deletes all views from the manager. More... | |
QList< QDomElement > | get3DViews () const |
Returns the list of configurations of 3D views added to the manager. More... | |
QDomElement | get3DViewSettings (const QString &name) const |
Returns the DOM element representing the settings of the 3D view named name. More... | |
QStringList | get3DViewsNames () const |
Returns the names of all 3D views added to the manager. More... | |
bool | is3DViewOpen (const QString &name) |
Returns whether the 3D view named name will is opened. More... | |
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. More... | |
void | register3DViewSettings (const QString &name, const QDomElement &dom) |
Adds a new 3D view named name to the manager with the configuration DOM dom. More... | |
void | remove3DView (const QString &name) |
Removes the configuration of the 3D view named name. More... | |
void | rename3DView (const QString &oldTitle, const QString &newTitle) |
Renames the 3D view named oldTitle to newTitle. More... | |
void | set3DViewInitiallyVisible (const QString &name, bool visible) |
Sets whether the 3D view named name will be initially visible when the project is opened. More... | |
QDomElement | writeXml (QDomDocument &doc) const |
Returns a DOM element representing the state of the manager. More... | |
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().
Definition at line 40 of file qgsmapviewsmanager.h.
|
explicit |
Constructor for QgsMapViewsManager.
The project will become the parent object for this manager.
Definition at line 19 of file qgsmapviewsmanager.cpp.
void QgsMapViewsManager::clear | ( | ) |
Removes and deletes all views from the manager.
Definition at line 56 of file qgsmapviewsmanager.cpp.
QList< QDomElement > QgsMapViewsManager::get3DViews | ( | ) | const |
Returns the list of configurations of 3D views added to the manager.
Definition at line 67 of file qgsmapviewsmanager.cpp.
QDomElement QgsMapViewsManager::get3DViewSettings | ( | const QString & | name | ) | const |
Returns the DOM element representing the settings of the 3D view named name.
Definition at line 62 of file qgsmapviewsmanager.cpp.
QStringList QgsMapViewsManager::get3DViewsNames | ( | ) | const |
Returns the names of all 3D views added to the manager.
Definition at line 78 of file qgsmapviewsmanager.cpp.
bool QgsMapViewsManager::is3DViewOpen | ( | const QString & | name | ) |
Returns whether the 3D view named name will is opened.
Definition at line 106 of file qgsmapviewsmanager.cpp.
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.
Definition at line 25 of file qgsmapviewsmanager.cpp.
void QgsMapViewsManager::register3DViewSettings | ( | const QString & | name, |
const QDomElement & | dom | ||
) |
Adds a new 3D view named name to the manager with the configuration DOM dom.
Definition at line 72 of file qgsmapviewsmanager.cpp.
void QgsMapViewsManager::remove3DView | ( | const QString & | name | ) |
Removes the configuration of the 3D view named name.
Definition at line 83 of file qgsmapviewsmanager.cpp.
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.
void QgsMapViewsManager::set3DViewInitiallyVisible | ( | const QString & | name, |
bool | visible | ||
) |
Sets whether the 3D view named name will be initially visible when the project is opened.
Definition at line 98 of file qgsmapviewsmanager.cpp.
|
signal |
Emitted when the views list has changed (whenever a view was removed, added, renamed..)
QDomElement QgsMapViewsManager::writeXml | ( | QDomDocument & | doc | ) | const |
Returns a DOM element representing the state of the manager.
Definition at line 48 of file qgsmapviewsmanager.cpp.