16 #ifndef QGSQUICKMAPSETTINGS_H
17 #define QGSQUICKMAPSETTINGS_H
27 #include "qgis_quick.h"
57 Q_PROPERTY(
QgsProject *project READ project WRITE setProject NOTIFY projectChanged )
67 Q_PROPERTY(
QgsRectangle extent READ extent WRITE setExtent NOTIFY extentChanged )
69 Q_PROPERTY(
QgsRectangle visibleExtent READ visibleExtent NOTIFY visibleExtentChanged )
71 Q_PROPERTY(
double mapUnitsPerPixel READ mapUnitsPerPixel NOTIFY mapUnitsPerPixelChanged )
77 Q_PROPERTY(
double rotation READ rotation WRITE setRotation NOTIFY rotationChanged )
84 Q_PROPERTY( QColor backgroundColor READ backgroundColor WRITE setBackgroundColor NOTIFY backgroundColorChanged )
91 Q_PROPERTY( QSize outputSize READ outputSize WRITE setOutputSize NOTIFY outputSizeChanged )
98 Q_PROPERTY(
double outputDpi READ outputDpi WRITE setOutputDpi NOTIFY outputDpiChanged )
115 Q_PROPERTY( QList<
QgsMapLayer *> layers READ layers WRITE setLayers NOTIFY layersChanged )
138 Q_INVOKABLE
void setCenter( const
QgsPoint ¢er );
141 double mapUnitsPerPixel() const;
156 Q_INVOKABLE QPointF coordinateToScreen( const
QgsPoint &point ) const;
166 Q_INVOKABLE
QgsPoint screenToCoordinate( const QPointF &point ) const;
172 double rotation() const;
175 void setRotation(
double rotation );
178 QColor backgroundColor() const;
181 void setBackgroundColor( const QColor &color );
184 QSize outputSize() const;
187 void setOutputSize( const QSize &outputSize );
190 double outputDpi() const;
193 void setOutputDpi(
double outputDpi );
205 void setLayers( const QList<
QgsMapLayer *> &layers );
209 void projectChanged();
212 void extentChanged();
215 void destinationCrsChanged();
218 void mapUnitsPerPixelChanged();
221 void rotationChanged();
224 void backgroundColorChanged();
227 void visibleExtentChanged();
230 void outputSizeChanged();
233 void outputDpiChanged();
236 void layersChanged();
245 void onReadProject( const QDomDocument &doc );
253 #endif // QGSQUICKMAPSETTINGS_H