QGIS API Documentation 3.41.0-Master (3440c17df1d)
|
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..) | |
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. | |
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 20 of file qgsmapviewsmanager.cpp.
void QgsMapViewsManager::clear | ( | ) |
Removes and deletes all views from the manager.
Definition at line 57 of file qgsmapviewsmanager.cpp.
QList< QDomElement > QgsMapViewsManager::get3DViews | ( | ) | const |
Returns the list of configurations of 3D views added to the manager.
Definition at line 68 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 63 of file qgsmapviewsmanager.cpp.
QStringList QgsMapViewsManager::get3DViewsNames | ( | ) | const |
Returns the names of all 3D views added to the manager.
Definition at line 79 of file qgsmapviewsmanager.cpp.
bool QgsMapViewsManager::is3DViewOpen | ( | const QString & | name | ) |
Returns whether the 3D view named name will is opened.
Definition at line 107 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 26 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 73 of file qgsmapviewsmanager.cpp.
void QgsMapViewsManager::remove3DView | ( | const QString & | name | ) |
Removes the configuration of the 3D view named name.
Definition at line 84 of file qgsmapviewsmanager.cpp.
void QgsMapViewsManager::rename3DView | ( | const QString & | oldTitle, |
const QString & | newTitle | ||
) |
Renames the 3D view named oldTitle to newTitle.
Definition at line 90 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 99 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 49 of file qgsmapviewsmanager.cpp.