56 Q_PROPERTY(
QgsProject *project READ project WRITE setProject NOTIFY projectChanged )
61 Q_PROPERTY(
QgsPoint center READ center WRITE setCenter NOTIFY extentChanged )
71 Q_PROPERTY(
QgsRectangle extent READ extent WRITE setExtent NOTIFY extentChanged )
73 Q_PROPERTY(
QgsRectangle visibleExtent READ visibleExtent NOTIFY visibleExtentChanged )
75 Q_PROPERTY(
double mapUnitsPerPixel READ mapUnitsPerPixel NOTIFY mapUnitsPerPixelChanged )
77 Q_PROPERTY(
double mapUnitsPerPoint READ mapUnitsPerPoint NOTIFY mapUnitsPerPointChanged )
83 Q_PROPERTY(
double rotation READ rotation WRITE setRotation NOTIFY rotationChanged )
90 Q_PROPERTY( QColor backgroundColor READ backgroundColor WRITE setBackgroundColor NOTIFY backgroundColorChanged )
97 Q_PROPERTY( QSize outputSize READ outputSize WRITE setOutputSize NOTIFY outputSizeChanged )
104 Q_PROPERTY(
double outputDpi READ outputDpi WRITE setOutputDpi NOTIFY outputDpiChanged )
121 Q_PROPERTY( QList<
QgsMapLayer *> layers READ layers WRITE setLayers NOTIFY layersChanged )
126 Q_PROPERTY(
bool isTemporal READ isTemporal WRITE setIsTemporal NOTIFY temporalStateChanged )
131 Q_PROPERTY( QDateTime temporalBegin READ temporalBegin WRITE setTemporalBegin NOTIFY temporalStateChanged )
136 Q_PROPERTY( QDateTime temporalEnd READ temporalEnd WRITE setTemporalEnd NOTIFY temporalStateChanged )
162 Q_INVOKABLE
void setCenter( const
QgsPoint ¢er );
165 double mapUnitsPerPixel() const;
168 Q_INVOKABLE
void setCenterToLayer(
QgsMapLayer *layer,
bool shouldZoom = true );
171 double mapUnitsPerPoint() const;
186 Q_INVOKABLE QPointF coordinateToScreen( const
QgsPoint &point ) const;
195 Q_INVOKABLE
QgsPoint screenToCoordinate( const QPointF &point ) const;
201 double rotation() const;
204 void setRotation(
double rotation );
207 QColor backgroundColor() const;
210 void setBackgroundColor( const QColor &color );
217 QSize outputSize() const;
224 void setOutputSize( QSize outputSize );
227 double outputDpi() const;
230 void setOutputDpi(
double outputDpi );
256 void setLayers( const QList<
QgsMapLayer *> &layers );
263 qreal devicePixelRatio() const;
271 void setDevicePixelRatio( const qreal &devicePixelRatio );
274 bool isTemporal() const;
277 void setIsTemporal(
bool temporal );
280 QDateTime temporalBegin() const;
283 void setTemporalBegin( const QDateTime &begin );
286 QDateTime temporalEnd() const;
289 void setTemporalEnd( const QDateTime &end );
293 void projectChanged();
296 void extentChanged();
299 void destinationCrsChanged();
302 void mapUnitsPerPixelChanged();
304 void mapUnitsPerPointChanged();
307 void rotationChanged();
310 void backgroundColorChanged();
313 void visibleExtentChanged();
316 void outputSizeChanged();
319 void outputDpiChanged();
322 void layersChanged();
330 void temporalStateChanged();
333 void devicePixelRatioChanged();
342 void onReadProject( const QDomDocument &doc );
352 qreal mDevicePixelRatio = 1.0;