QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
core
project
qgsmapviewsmanager.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsmapviewsmanager.h
3
------------------
4
Date : December 2021
5
Copyright : (C) 2021 Belgacem Nedjima
6
Email : gb underscore nedjima at esi dot dz
7
***************************************************************************
8
* *
9
* This program is free software; you can redistribute it and/or modify *
10
* it under the terms of the GNU General Public License as published by *
11
* the Free Software Foundation; either version 2 of the License, or *
12
* (at your option) any later version. *
13
* *
14
***************************************************************************/
15
16
#ifndef QGSMAPVIEWSMANAGER_H
17
#define QGSMAPVIEWSMANAGER_H
18
19
#include "qgis_core.h"
20
#include "
qgis_sip.h
"
21
22
#include <QDomDocument>
23
#include <QDomElement>
24
#include <QMap>
25
#include <QObject>
26
27
class
QgsProject
;
28
41
class
CORE_EXPORT
QgsMapViewsManager
:
public
QObject
42
{
43
Q_OBJECT
44
45
public
:
50
explicit
QgsMapViewsManager
(
QgsProject
*project
SIP_TRANSFERTHIS
);
51
57
bool
readXml
(
const
QDomElement &element,
const
QDomDocument &doc );
58
63
QDomElement
writeXml
( QDomDocument &doc )
const
;
64
66
void
clear
();
67
73
QDomElement
get3DViewSettings
(
const
QString &name )
const
SIP_SKIP
;
74
80
void
register3DViewSettings
(
const
QString &name,
const
QDomElement &dom )
SIP_SKIP
;
81
87
QStringList
get3DViewsNames
()
const
SIP_SKIP
;
88
94
QList<QDomElement>
get3DViews
()
const
SIP_SKIP
;
95
97
void
remove3DView
(
const
QString &name );
98
100
void
rename3DView
(
const
QString &oldTitle,
const
QString &newTitle );
101
107
void
set3DViewInitiallyVisible
(
const
QString &name,
bool
visible )
SIP_SKIP
;
108
114
bool
is3DViewOpen
(
const
QString &name )
SIP_SKIP
;
115
116
signals:
118
void
views3DListChanged
();
119
120
private
:
121
QMap<QString, QDomElement> m3DMapViewsDom;
122
};
123
124
125
#endif
// QGSMAPVIEWSMANAGER_H
QgsMapViewsManager::is3DViewOpen
bool is3DViewOpen(const QString &name)
Returns whether the 3D view named name will is opened.
Definition
qgsmapviewsmanager.cpp:116
QgsMapViewsManager::writeXml
QDomElement writeXml(QDomDocument &doc) const
Returns a DOM element representing the state of the manager.
Definition
qgsmapviewsmanager.cpp:58
QgsMapViewsManager::remove3DView
void remove3DView(const QString &name)
Removes the configuration of the 3D view named name.
Definition
qgsmapviewsmanager.cpp:93
QgsMapViewsManager::clear
void clear()
Removes and deletes all views from the manager.
Definition
qgsmapviewsmanager.cpp:66
QgsMapViewsManager::get3DViewsNames
QStringList get3DViewsNames() const
Returns the names of all 3D views added to the manager.
Definition
qgsmapviewsmanager.cpp:88
QgsMapViewsManager::rename3DView
void rename3DView(const QString &oldTitle, const QString &newTitle)
Renames the 3D view named oldTitle to newTitle.
Definition
qgsmapviewsmanager.cpp:99
QgsMapViewsManager::get3DViews
QList< QDomElement > get3DViews() const
Returns the list of configurations of 3D views added to the manager.
Definition
qgsmapviewsmanager.cpp:77
QgsMapViewsManager::views3DListChanged
void views3DListChanged()
Emitted when the views list has changed (whenever a view was removed, added, renamed....
QgsMapViewsManager::readXml
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.
Definition
qgsmapviewsmanager.cpp:30
QgsMapViewsManager::register3DViewSettings
void register3DViewSettings(const QString &name, const QDomElement &dom)
Adds a new 3D view named name to the manager with the configuration DOM dom.
Definition
qgsmapviewsmanager.cpp:82
QgsMapViewsManager::QgsMapViewsManager
QgsMapViewsManager(QgsProject *project)
Constructor for QgsMapViewsManager.
Definition
qgsmapviewsmanager.cpp:26
QgsMapViewsManager::set3DViewInitiallyVisible
void set3DViewInitiallyVisible(const QString &name, bool visible)
Sets whether the 3D view named name will be initially visible when the project is opened.
Definition
qgsmapviewsmanager.cpp:108
QgsMapViewsManager::get3DViewSettings
QDomElement get3DViewSettings(const QString &name) const
Returns the DOM element representing the settings of the 3D view named name.
Definition
qgsmapviewsmanager.cpp:72
QgsProject
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
Definition
qgsproject.h:114
qgis_sip.h
SIP_TRANSFERTHIS
#define SIP_TRANSFERTHIS
Definition
qgis_sip.h:52
SIP_SKIP
#define SIP_SKIP
Definition
qgis_sip.h:138
Generated on
for QGIS API Documentation by
1.17.0