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 )
141 Q_PROPERTY(
double zRangeLower READ zRangeLower WRITE setZRangeLower NOTIFY zRangeChanged )
146 Q_PROPERTY(
double zRangeUpper READ zRangeUpper WRITE setZRangeUpper NOTIFY zRangeChanged )
172 Q_INVOKABLE
void setCenter( const
QgsPoint ¢er );
175 double mapUnitsPerPixel() const;
178 Q_INVOKABLE
void setCenterToLayer(
QgsMapLayer *layer,
bool shouldZoom = true );
181 double mapUnitsPerPoint() const;
196 Q_INVOKABLE QPointF coordinateToScreen( const
QgsPoint &point ) const;
205 Q_INVOKABLE
QgsPoint screenToCoordinate( const QPointF &point ) const;
211 double rotation() const;
214 void setRotation(
double rotation );
217 QColor backgroundColor() const;
220 void setBackgroundColor( const QColor &color );
227 QSize outputSize() const;
234 void setOutputSize( QSize outputSize );
237 double outputDpi() const;
240 void setOutputDpi(
double outputDpi );
266 void setLayers( const QList<
QgsMapLayer *> &layers );
273 qreal devicePixelRatio() const;
281 void setDevicePixelRatio( const qreal &devicePixelRatio );
284 bool isTemporal() const;
287 void setIsTemporal(
bool temporal );
290 QDateTime temporalBegin() const;
293 void setTemporalBegin( const QDateTime &begin );
296 QDateTime temporalEnd() const;
299 void setTemporalEnd( const QDateTime &end );
302 double zRangeLower() const;
305 void setZRangeLower( const
double &lower );
308 double zRangeUpper() const;
311 void setZRangeUpper( const
double &upper );
315 void projectChanged();
318 void extentChanged();
321 void destinationCrsChanged();
324 void mapUnitsPerPixelChanged();
326 void mapUnitsPerPointChanged();
329 void rotationChanged();
332 void backgroundColorChanged();
335 void visibleExtentChanged();
338 void outputSizeChanged();
341 void outputDpiChanged();
344 void layersChanged();
352 void temporalStateChanged();
360 void zRangeChanged();
363 void devicePixelRatioChanged();
372 void onReadProject( const QDomDocument &doc );
382 qreal mDevicePixelRatio = 1.0;