QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
src
core
project
qgsprojectviewsettings.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsprojectviewsettings.h
3
---------------------------
4
begin : October 2019
5
copyright : (C) 2019 by Nyall Dawson
6
email : nyall dot dawson at gmail dot com
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
#ifndef QGSPROJECTVIEWSETTINGS_H
16
#define QGSPROJECTVIEWSETTINGS_H
17
18
#include "qgis_core.h"
19
#include "
qgsreferencedgeometry.h
"
20
#include <QObject>
21
#include <QVector>
22
23
class
QDomElement;
24
class
QgsReadWriteContext
;
25
class
QDomDocument;
26
class
QgsProject
;
27
35
class
CORE_EXPORT
QgsProjectViewSettings
:
public
QObject
36
{
37
Q_OBJECT
38
39
public
:
40
46
QgsProjectViewSettings
(
QgsProject
*project =
nullptr
);
47
51
void
reset();
52
65
QgsReferencedRectangle
defaultViewExtent()
const
;
66
79
void
setDefaultViewExtent(
const
QgsReferencedRectangle
&extent );
80
92
QgsReferencedRectangle
presetFullExtent()
const
;
93
105
void
setPresetFullExtent(
const
QgsReferencedRectangle
&extent );
106
119
QgsReferencedRectangle
fullExtent()
const
;
120
130
void
setMapScales(
const
QVector<double> &scales );
131
141
QVector<double> mapScales()
const
;
142
152
void
setUseProjectScales(
bool
enabled );
153
163
bool
useProjectScales()
const
;
164
178
double
defaultRotation()
const
;
179
193
void
setDefaultRotation(
double
rotation );
194
199
bool
readXml(
const
QDomElement &element,
const
QgsReadWriteContext
&context );
200
205
QDomElement writeXml( QDomDocument &doc,
const
QgsReadWriteContext
&context )
const
;
206
207
signals:
208
215
void
mapScalesChanged();
216
222
void
presetFullExtentChanged();
223
224
private
:
225
226
QgsProject
*mProject =
nullptr
;
227
QVector<double> mMapScales;
228
bool
mUseProjectScales =
false
;
229
QgsReferencedRectangle
mDefaultViewExtent;
230
QgsReferencedRectangle
mPresetFullExtent;
231
double
mDefaultRotation = 0;
232
};
233
234
#endif // QGSPROJECTVIEWSETTINGS_H
QgsReadWriteContext
The class is used as a container of context for various read/write operations on other objects.
Definition:
qgsreadwritecontext.h:34
QgsReferencedRectangle
A QgsRectangle with associated coordinate reference system.
Definition:
qgsreferencedgeometry.h:73
QgsProject
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
Definition:
qgsproject.h:103
QgsProjectViewSettings
Contains settings and properties relating to how a QgsProject should be displayed inside map canvas,...
Definition:
qgsprojectviewsettings.h:35
qgsreferencedgeometry.h
Generated on Sun Sep 11 2022 00:03:17 for QGIS API Documentation by
1.8.17