16#ifndef QGSMAPSETTINGS_H
17#define QGSMAPSETTINGS_H
251 QStringList
layerIds(
bool expandGroupLayers =
false )
const;
264 QList<QgsMapLayer *>
layers(
bool expandGroupLayers =
false )
const;
274 template <
typename T>
275 QVector<T>
layers()
const;
387 bool setEllipsoid(
const QString &ellipsoid );
467 bool hasValidSettings()
const;
474 QPolygonF visiblePolygon()
const;
481 QPolygonF visiblePolygonWithBuffer()
const;
484 double mapUnitsPerPixel()
const;
490 double scale()
const;
629 double computeScaleForExtent(
const QgsRectangle &extent )
const;
639 void readXml( QDomNode &node );
646 void writeXml( QDomNode &node, QDomDocument &doc );
713 void setLabelBoundaryGeometry(
const QgsGeometry &boundary );
749 void setClippingRegions(
const QList< QgsMapClippingRegion > ®ions );
759 QList< QgsMapClippingRegion > clippingRegions()
const;
835 QList< QgsRenderedFeatureHandlerInterface * > renderedFeatureHandlers()
const;
880 double frameRate()
const;
890 void setFrameRate(
double rate );
900 long long currentFrame()
const;
910 void setCurrentFrame(
long long frame );
1016 bool mHasTransformContext =
false;
1022 void matchRasterizedRenderingPolicyToFlags();
1024 QList< QgsLabelBlockingRegion > mLabelBlockingRegions;
1025 QList< QgsMapClippingRegion > mClippingRegions;
1026 QList< QgsRenderedFeatureHandlerInterface * > mRenderedFeatureHandlers;
RasterizedRenderingPolicy
Policies controlling when rasterisation of content during renders is permitted.
@ Default
Allow raster-based rendering in situations where it is required for correct rendering or where it wil...
QFlags< MapSettingsFlag > MapSettingsFlags
Map settings flags.
DistanceUnit
Units of distance.
TextRenderFormat
Options for rendering text.
@ AlwaysOutlines
Always render text using path objects (AKA outlines/curves). This setting guarantees the best quality...
ScaleCalculationMethod
Scale calculation logic.
RendererUsage
Usage of the renderer.
@ Unknown
Renderer used for unknown usage.
MapSettingsFlag
Flags which adjust the way maps are rendered.
SegmentationToleranceType
Segmentation tolerance as maximum angle or maximum difference between approximation and circle.
@ MaximumAngle
Maximum angle between generating radii (lines from arc center to output vertices).
Represents a coordinate reference system (CRS).
Contains information about the context in which a coordinate transform is executed.
QgsRange which stores a range of double values.
Renders elevation shading on an image with different methods (eye dome lighting, hillshading,...
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
A geometry is the spatial representation of a feature.
QgsGeometry geometry
Geometry of region to avoid placing labels within (in destination map coordinates and CRS).
QgsLabelBlockingRegion(const QgsGeometry &geometry)
Constructor for a label blocking region.
Stores global configuration for labeling engine.
Qgis::TextRenderFormat defaultTextRenderFormat() const
Returns the default text rendering format for the labels.
A map clipping region (in map coordinates and CRS).
Base class for all map layer types.
Abstract base class for map rendering implementations.
QSize deviceOutputSize() const
Returns the device output size of the map render.
QgsVectorSimplifyMethod mSimplifyMethod
QImage::Format mImageFormat
QgsMaskRenderSettings mMaskRenderSettings
const QgsLabelingEngineSettings & labelingEngineSettings() const
Returns the global configuration of the labeling engine.
QList< QgsMapLayer * > layers(bool expandGroupLayers=false) const
Returns the list of layers which will be rendered in the map.
Qgis::RendererUsage mRendererUsage
void setSelectionColor(const QColor &color)
Sets the color that is used for drawing of selected vector features.
void setSimplifyMethod(const QgsVectorSimplifyMethod &method)
Sets the simplification setting to use when rendering vector layers.
QgsRectangle mVisibleExtent
Extent with some additional white space that matches the output aspect ratio.
Q_DECL_DEPRECATED void setCustomRenderFlags(const QString &customRenderFlags)
Sets the custom rendering flags.
void setTextRenderFormat(Qgis::TextRenderFormat format)
Sets the text render format, which dictates how text is rendered (e.g.
void setLayers(const QList< QgsMapLayer * > &layers)
Sets the list of layers to render in the map.
void clearCustomRenderingFlag(const QString &flag)
Clears the specified custom rendering flag.
double segmentationTolerance() const
Gets the segmentation tolerance applied when rendering curved geometries.
Qgis::MapSettingsFlags mFlags
QString mCustomRenderFlags
void setDpiTarget(double dpi)
Sets the target dpi (dots per inch) to be taken into consideration when rendering.
const QgsVectorSimplifyMethod & simplifyMethod() const
Returns the simplification settings to use when rendering vector layers.
double magnificationFactor() const
Returns the magnification factor.
QgsLabelingEngineSettings mLabelingEngineSettings
QgsAbstractGeometry::SegmentationToleranceType mSegmentationToleranceType
QStringList layerIds(bool expandGroupLayers=false) const
Returns the list of layer IDs which will be rendered in the map.
void setDevicePixelRatio(float dpr)
Sets the device pixel ratio.
QString mEllipsoid
ellipsoid acronym (from table tbl_ellipsoids)
double dpiTarget() const
Returns the target DPI (dots per inch) to be taken into consideration when rendering.
QColor backgroundColor() const
Returns the background color of the map.
bool mValid
Whether the actual settings are valid (set in updateDerived()).
void setOutputDpi(double dpi)
Sets the dpi (dots per inch) used for conversion between real world units (e.g.
const QgsMapToPixel & mapToPixel() const
void setCustomRenderingFlag(const QString &flag, const QVariant &value)
Sets a custom rendering flag.
void setOutputImageFormat(QImage::Format format)
sets format of internal QImage
float devicePixelRatio() const
Returns the device pixel ratio.
QSize outputSize() const
Returns the size of the resulting map image, in pixels.
QgsRectangle extent() const
Returns geographical coordinates of the rectangle that should be rendered.
QMap< QString, QString > mLayerStyleOverrides
QList< QgsLabelBlockingRegion > labelBlockingRegions() const
Returns the list of regions to avoid placing labels within.
void setSegmentationTolerance(double tolerance)
Sets the segmentation tolerance applied when rendering curved geometries.
QgsGeometry mLabelBoundaryGeometry
void setLayerStyleOverrides(const QMap< QString, QString > &overrides)
Sets the map of map layer style overrides (key: layer ID, value: style name) where a different style ...
QgsElevationShadingRenderer mShadingRenderer
QgsCoordinateTransformContext mTransformContext
void setExtent(const QgsRectangle &rect, bool magnified=true)
Sets the coordinates of the rectangle which should be rendered.
QImage::Format outputImageFormat() const
format of internal QImage, default QImage::Format_ARGB32_Premultiplied
double extentBuffer() const
Returns the buffer in map units to use around the visible extent for rendering symbols whose correspo...
QgsPathResolver mPathResolver
QgsScaleCalculator mScaleCalculator
void setExpressionContext(const QgsExpressionContext &context)
Sets the expression context.
QVariantMap mCustomRenderingFlags
QgsExpressionContext mExpressionContext
QColor selectionColor() const
Returns the color that is used for drawing of selected vector features.
QgsAbstractGeometry::SegmentationToleranceType segmentationToleranceType() const
Gets segmentation tolerance type (maximum angle or maximum difference between curve and approximation...
void setExtentBuffer(double buffer)
Sets the buffer in map units to use around the visible extent for rendering symbols whose correspondi...
QVariantMap customRenderingFlags() const
Returns any custom rendering flags.
void setLabelingEngineSettings(const QgsLabelingEngineSettings &settings)
Sets the global configuration of the labeling engine.
Q_DECL_DEPRECATED QString customRenderFlags() const
Returns custom rendering flags.
void setRotation(double rotation)
Sets the rotation of the resulting map image, in degrees clockwise.
QString ellipsoid() const
Returns ellipsoid's acronym.
double mMagnificationFactor
void setPathResolver(const QgsPathResolver &resolver)
Sets the path resolver for conversion between relative and absolute paths during rendering operations...
QgsMaskRenderSettings & maskSettings()
Returns a reference to the mask render settings, which control how masks are drawn and behave during ...
Qgis::TextRenderFormat textRenderFormat() const
Returns the text render format, which dictates how text is rendered (e.g.
QgsCoordinateReferenceSystem mDestCRS
double outputDpi() const
Returns the DPI (dots per inch) used for conversion between real world units (e.g.
Qgis::RasterizedRenderingPolicy mRasterizedRenderingPolicy
QgsMapToPixel mMapToPixel
QMap< QString, QString > layerStyleOverrides() const
Returns the map of map layer style overrides (key: layer ID, value: style name) where a different sty...
Qgis::TextRenderFormat mTextRenderFormat
double rotation() const
Returns the rotation of the resulting map image, in degrees clockwise.
QgsWeakMapLayerPointerList mLayers
list of layers to be rendered (stored as weak pointers)
void setLabelBlockingRegions(const QList< QgsLabelBlockingRegion > ®ions)
Sets a list of regions to avoid placing labels within.
void setOutputSize(QSize size)
Sets the size of the resulting map image, in pixels.
const QgsPathResolver & pathResolver() const
Returns the path resolver for conversion between relative and absolute paths during rendering operati...
void setBackgroundColor(const QColor &color)
Sets the background color of the map.
void setSegmentationToleranceType(QgsAbstractGeometry::SegmentationToleranceType type)
Sets segmentation tolerance type (maximum angle or maximum difference between curve and approximation...
const QgsExpressionContext & expressionContext() const
Gets the expression context.
const QgsMaskRenderSettings & maskSettings() const
Returns a reference to the mask render settings, which control how masks are drawn and behave during ...
double mSegmentationTolerance
void setMagnificationFactor(double factor, const QgsPointXY *center=nullptr)
Set the magnification factor.
Perform transforms between map coordinates and device coordinates.
Contains settings regarding how masks are calculated and handled during a map render.
Resolves relative paths into absolute paths and vice versa.
Point geometry type, with support for z-dimension and m-values.
A rectangle specified with double values.
An interface for classes which provide custom handlers for features rendered as part of a map render ...
Calculates scale for a given combination of canvas size, map extent, and monitor dpi.
QgsTemporalRangeObject(bool enabled=false)
Constructor QgsTemporalRangeObject.
Contains settings for simplifying geometries fetched from a vector layer.
QList< QgsWeakMapLayerPointer > QgsWeakMapLayerPointerList
A list of weak pointers to QgsMapLayers.