16#ifndef QGSQUICKMAPSETTINGS_H
17#define QGSQUICKMAPSETTINGS_H
19#include "qgis_quick.h"
58 Q_PROPERTY(
QgsProject *project READ project WRITE setProject NOTIFY projectChanged )
63 Q_PROPERTY(
QgsPoint center READ center WRITE setCenter NOTIFY extentChanged )
73 Q_PROPERTY(
QgsRectangle extent READ extent WRITE setExtent NOTIFY extentChanged )
75 Q_PROPERTY(
QgsRectangle visibleExtent READ visibleExtent NOTIFY visibleExtentChanged )
77 Q_PROPERTY(
double mapUnitsPerPixel READ mapUnitsPerPixel NOTIFY mapUnitsPerPixelChanged )
79 Q_PROPERTY(
double mapUnitsPerPoint READ mapUnitsPerPoint NOTIFY mapUnitsPerPointChanged )
85 Q_PROPERTY(
double rotation READ rotation WRITE setRotation NOTIFY rotationChanged )
92 Q_PROPERTY( QColor backgroundColor READ backgroundColor WRITE setBackgroundColor NOTIFY backgroundColorChanged )
99 Q_PROPERTY( QSize outputSize READ outputSize WRITE setOutputSize NOTIFY outputSizeChanged )
106 Q_PROPERTY(
double outputDpi READ outputDpi WRITE setOutputDpi NOTIFY outputDpiChanged )
123 Q_PROPERTY( QList<QgsMapLayer *> layers READ layers WRITE setLayers NOTIFY layersChanged )
128 Q_PROPERTY(
bool isTemporal READ isTemporal WRITE setIsTemporal NOTIFY temporalStateChanged )
133 Q_PROPERTY( QDateTime temporalBegin READ temporalBegin WRITE setTemporalBegin NOTIFY temporalStateChanged )
138 Q_PROPERTY( QDateTime temporalEnd READ temporalEnd WRITE setTemporalEnd NOTIFY temporalStateChanged )
164 Q_INVOKABLE
void setCenter(
const QgsPoint ¢er );
167 double mapUnitsPerPixel()
const;
170 Q_INVOKABLE
void setCenterToLayer(
QgsMapLayer *layer,
bool shouldZoom =
true );
173 double mapUnitsPerPoint()
const;
188 Q_INVOKABLE QPointF coordinateToScreen(
const QgsPoint &point )
const;
197 Q_INVOKABLE
QgsPoint screenToCoordinate(
const QPointF &point )
const;
203 double rotation()
const;
206 void setRotation(
double rotation );
209 QColor backgroundColor()
const;
212 void setBackgroundColor(
const QColor &color );
219 QSize outputSize()
const;
226 void setOutputSize( QSize outputSize );
229 double outputDpi()
const;
232 void setOutputDpi(
double outputDpi );
247 QList<QgsMapLayer *> layers()
const;
258 void setLayers(
const QList<QgsMapLayer *> &layers );
265 qreal devicePixelRatio()
const;
273 void setDevicePixelRatio(
const qreal &devicePixelRatio );
276 bool isTemporal()
const;
279 void setIsTemporal(
bool temporal );
282 QDateTime temporalBegin()
const;
285 void setTemporalBegin(
const QDateTime &begin );
288 QDateTime temporalEnd()
const;
291 void setTemporalEnd(
const QDateTime &end );
344 void onReadProject(
const QDomDocument &doc );
354 qreal mDevicePixelRatio = 1.0;
This class represents a coordinate reference system (CRS).
Contains information about the context in which a coordinate transform is executed.
Base class for all map layer types.
The QgsMapSettings class contains configuration for rendering of the map.
Point geometry type, with support for z-dimension and m-values.
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
The QgsQuickMapSettings class encapsulates QgsMapSettings class to offer settings of configuration of...
void mapUnitsPerPointChanged()
Returns the distance in geographical coordinates that equals to one point unit in the map.
void extentChanged()
Geographical coordinates of the rectangle that should be rendered.
void outputSizeChanged()
The size of the resulting map image.
void projectChanged()
A project property should be used as a primary source of project all other components in the applicat...
void outputDpiChanged()
Output DPI used for conversion between real world units (e.g.
void layersChanged()
Set list of layers for map rendering.
void destinationCrsChanged()
CRS of destination coordinate reference system.
void visibleExtentChanged()
Returns the actual extent derived from requested extent that takes output image size into account.
void temporalStateChanged()
Emitted when the temporal state has changed.
void devicePixelRatioChanged()
Returns the ratio between physical pixels and device-independent pixels.
~QgsQuickMapSettings()=default
void mapUnitsPerPixelChanged()
Returns the distance in geographical coordinates that equals to one pixel in the map.
void backgroundColorChanged()
The background color used to render the map.
void rotationChanged()
The rotation of the resulting map image, in degrees clockwise.
A rectangle specified with double values.