Contains settings and properties relating to how a QgsProject should be displayed inside map canvas, e.g.
More...
#include <qgsprojectviewsettings.h>
Contains settings and properties relating to how a QgsProject should be displayed inside map canvas, e.g.
map scales and default view extent for the project.
- Since
- QGIS 3.10.1
Definition at line 35 of file qgsprojectviewsettings.h.
◆ QgsProjectViewSettings()
QgsProjectViewSettings::QgsProjectViewSettings |
( |
QgsProject * |
project = nullptr | ) |
|
◆ defaultRotation()
double QgsProjectViewSettings::defaultRotation |
( |
| ) |
const |
Returns the default map rotation (in clockwise degrees) for maps in the project.
- Warning
- When a project is opened in the QGIS desktop application and saved, individual map canvases will store their own previous map rotations as custom project properties. Reloading this saved version of the project will trigger the canvases to restore their individual rotations. Accordingly, in the QGIS desktop application, this setting only forms a default, initial view used when the project is opened for the very first time (or when new map canvases are opened in that project.)
- See also
- setDefaultRotation()
- Since
- QGIS 3.28
Definition at line 134 of file qgsprojectviewsettings.cpp.
◆ defaultViewExtent()
Returns the default view extent, which should be used as the initial map extent when this project is opened.
- Warning
- When a project is opened in the QGIS desktop application and saved, individual map canvases will store their own previous view extent as custom project properties. Reloading this saved version of the project will trigger the canvases to restore their individual last view extents. Accordingly, in the QGIS desktop application, this setting only forms a default, initial view used when the project is opened for the very first time.
- See also
- setDefaultViewExtent()
Definition at line 49 of file qgsprojectviewsettings.cpp.
◆ fullExtent()
◆ mapScales()
QVector< double > QgsProjectViewSettings::mapScales |
( |
| ) |
const |
◆ mapScalesChanged
void QgsProjectViewSettings::mapScalesChanged |
( |
| ) |
|
|
signal |
◆ presetFullExtent()
Returns the project's preset full extent.
This extent represents the maximal limits of the project. The full extent defaults to a null rectangle, which indicates that the maximal extent should be calculated based on the layers in the project.
- See also
- setPresetFullExtent()
-
fullExtent()
- Since
- QGIS 3.18
Definition at line 59 of file qgsprojectviewsettings.cpp.
◆ presetFullExtentChanged
void QgsProjectViewSettings::presetFullExtentChanged |
( |
| ) |
|
|
signal |
◆ readXml()
bool QgsProjectViewSettings::readXml |
( |
const QDomElement & |
element, |
|
|
const QgsReadWriteContext & |
context |
|
) |
| |
◆ reset()
void QgsProjectViewSettings::reset |
( |
| ) |
|
◆ setDefaultRotation()
void QgsProjectViewSettings::setDefaultRotation |
( |
double |
rotation | ) |
|
Set the default rotation of maps in the project, in clockwise degrees.
- Warning
- When a project is opened in the QGIS desktop application and saved, individual map canvases will store their own previous map rotations as custom project properties. Reloading this saved version of the project will trigger the canvases to restore their individual rotations. Accordingly, in the QGIS desktop application, this setting only forms a default, initial view used when the project is opened for the very first time (or when new map canvases are opened in that project.)
- See also
- defaultRotation()
- Since
- QGIS 3.28
Definition at line 139 of file qgsprojectviewsettings.cpp.
◆ setDefaultViewExtent()
Sets the default view extent, which should be used as the initial map extent when this project is opened.
- Warning
- When a project is opened in the QGIS desktop application and saved, individual map canvases will store their own previous view extent as custom project properties. Reloading this saved version of the project will trigger the canvases to restore their individual last view extents. Accordingly, in the QGIS desktop application, this setting only forms a default, initial view used when the project is opened for the very first time.
- See also
- defaultViewExtent()
Definition at line 54 of file qgsprojectviewsettings.cpp.
◆ setMapScales()
void QgsProjectViewSettings::setMapScales |
( |
const QVector< double > & |
scales | ) |
|
◆ setPresetFullExtent()
Sets the project's preset full extent.
This extent represents the maximal limits of the project. Setting the full extent to a null rectangle indicates that the maximal extent should be calculated based on the layers in the project.
- See also
- setPresetFullExtent()
-
fullExtent()
- Since
- QGIS 3.18
Definition at line 64 of file qgsprojectviewsettings.cpp.
◆ setUseProjectScales()
void QgsProjectViewSettings::setUseProjectScales |
( |
bool |
enabled | ) |
|
◆ useProjectScales()
bool QgsProjectViewSettings::useProjectScales |
( |
| ) |
const |
◆ writeXml()
QDomElement QgsProjectViewSettings::writeXml |
( |
QDomDocument & |
doc, |
|
|
const QgsReadWriteContext & |
context |
|
) |
| const |
The documentation for this class was generated from the following files: