39 if ( project == mProject )
45 mProject->disconnect(
this );
77 return mMapSettings.
extent();
177 return mMapSettings.
layers();
186 void QgsQuickMapSettings::onReadProject(
const QDomDocument &doc )
188 QDomNodeList nodes = doc.elementsByTagName(
"mapcanvas" );
191 QDomNode node = nodes.item( 0 );
double outputDpi() const
Returns DPI used for conversion between real world units (e.g.
QSize outputSize() const
Returns the size of the resulting map image.
void visibleExtentChanged()
Returns the actual extent derived from requested extent that takes takes output image size into accou...
void setDestinationCrs(const QgsCoordinateReferenceSystem &crs)
sets destination coordinate reference system
A rectangle specified with double values.
void setExtent(const QgsRectangle &rect, bool magnified=true)
Set coordinates of the rectangle which should be rendered.
void setTransformContext(const QgsCoordinateTransformContext &context)
Sets the coordinate transform context, which stores various information regarding which datum transfo...
QgsCoordinateTransformContext transformContext() const
Returns the coordinate transform context, which stores various information regarding which datum tran...
double rotation() const
Returns the rotation of the resulting map image, in degrees clockwise.
void setXMaximum(double x)
Set the maximum x value.
QList< QgsMapLayer * > layers() const
Gets list of layers for map rendering The layers are stored in the reverse order of how they are rend...
void rotationChanged()
The rotation of the resulting map image, in degrees clockwise.
void extentChanged()
Geographical coordinates of the rectangle that should be rendered.
A class to represent a 2D point.
QgsMapSettings mapSettings() const
Clone map settings.
bool qgsDoubleNear(double a, double b, double epsilon=4 *std::numeric_limits< double >::epsilon())
Compare two doubles (but allow some difference)
void setOutputDpi(double dpi)
Sets DPI used for conversion between real world units (e.g. mm) and pixels.
QgsRectangle extent() const
Returns geographical coordinates of the rectangle that should be rendered.
QList< QgsMapLayer * > layers() const
Gets list of layers for map rendering The layers are stored in the reverse order of how they are rend...
void setLayers(const QList< QgsMapLayer *> &layers)
Set list of layers for map rendering.
void setOutputSize(const QSize &outputSize)
Sets the size of the resulting map image.
QgsRectangle visibleExtent() const
Returns the actual extent derived from requested extent that takes takes output image size into accou...
QgsCoordinateReferenceSystem destinationCrs() const
returns CRS of destination coordinate reference system
The QgsMapSettings class contains configuration for rendering of the map.
void outputDpiChanged()
Output DPI used for conversion between real world units (e.g.
Q_INVOKABLE QPointF coordinateToScreen(const QgsPoint &point) const
Convert a map coordinate to screen pixel coordinates.
void mapUnitsPerPixelChanged()
Returns the distance in geographical coordinates that equals to one pixel in the map.
QgsPointXY transform(const QgsPointXY &p) const
Transform the point from map (world) coordinates to device coordinates.
double rotation() const
The rotation of the resulting map image, in degrees clockwise.
Q_INVOKABLE QgsPoint screenToCoordinate(const QPointF &point) const
Convert a screen coordinate to a map coordinate.
QgsRectangle extent() const
Returns geographical coordinates of the rectangle that should be rendered.
QPointF toQPointF() const
Converts a point to a QPointF.
void setOutputSize(QSize size)
Sets 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 setYMinimum(double y)
Set the minimum y value.
void setOutputDpi(double outputDpi)
Sets DPI used for conversion between real world units (e.g. mm) and pixels.
QgsCoordinateReferenceSystem crs
static void logMessage(const QString &message, const QString &tag=QString(), Qgis::MessageLevel level=Qgis::Warning, bool notifyUser=true)
Adds a message to the log instance (and creates it if necessary).
double mapUnitsPerPixel() const
Returns the distance in geographical coordinates that equals to one pixel in the map.
QgsRectangle visibleExtent() const
Returns the actual extent derived from requested extent that takes takes output image size into accou...
void readProject(const QDomDocument &)
Emitted when a project is being read.
void setRotation(double rotation)
The rotation of the resulting map image, in degrees clockwise.
Reads and writes project states.
void setDestinationCrs(const QgsCoordinateReferenceSystem &destinationCrs)
sets destination coordinate reference system
Contains information about the context in which a coordinate transform is executed.
void destinationCrsChanged()
CRS of destination coordinate reference system.
Point geometry type, with support for z-dimension and m-values.
const QgsMapToPixel & mapToPixel() const
double mapUnitsPerPixel() const
Returns the distance in geographical coordinates that equals to one pixel in the map.
A class to represent a vector.
double yMinimum() const
Returns the y minimum value (bottom side of rectangle).
void setRotation(double rotation)
Sets the rotation of the resulting map image, in degrees clockwise.
Q_INVOKABLE void setCenter(const QgsPoint ¢er)
Move current map extent to have center point defined by center.
double xMaximum() const
Returns the x maximum value (right side of rectangle).
QgsCoordinateTransformContext transformContext
void setProject(QgsProject *project)
A project property should be used as a primary source of project all other components in the applicat...
double outputDpi() const
Returns DPI used for conversion between real world units (e.g.
void setYMaximum(double y)
Set the maximum y value.
void setExtent(const QgsRectangle &extent)
Set coordinates of the rectangle which should be rendered.
void outputSizeChanged()
The size of the resulting map image.
This class represents a coordinate reference system (CRS).
double xMinimum() const
Returns the x minimum value (left side of rectangle).
void setLayers(const QList< QgsMapLayer *> &layers)
Set list of layers for map rendering.
double yMaximum() const
Returns the y maximum value (top side of rectangle).
QgsProject * project() const
A project property should be used as a primary source of project all other components in the applicat...
double x() const
Returns the vector's x-component.
QgsPointXY center() const
Returns the center point of the rectangle.
void readXml(QDomNode &node)
QgsCoordinateReferenceSystem destinationCrs() const
returns CRS of destination coordinate reference system
double y() const
Returns the vector's y-component.
Q_INVOKABLE QgsCoordinateTransformContext transformContext() const
Returns the coordinate transform context, which stores various information regarding which datum tran...
QSize outputSize() const
Returns the size of the resulting map image.
QgsQuickMapSettings(QObject *parent=nullptr)
Create new map settings.
QgsPointXY toMapCoordinates(int x, int y) const
Transform device coordinates to map (world) coordinates.
void setXMinimum(double x)
Set the minimum x value.
void layersChanged()
Set list of layers for map rendering.