QGIS API Documentation  2.99.0-Master (9fdd060)
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
QgsMapSettings Class Reference

The QgsMapSettings class contains configuration for rendering of the map. More...

#include <qgsmapsettings.h>

Public Types

enum  Flag {
  Antialiasing = 0x01, DrawEditingInfo = 0x02, ForceVectorOutput = 0x04, UseAdvancedEffects = 0x08,
  DrawLabeling = 0x10, UseRenderingOptimization = 0x20, DrawSelection = 0x40, DrawSymbolBounds = 0x80,
  RenderMapTile = 0x100, RenderPartialOutput = 0x200
}
 Enumeration of flags that adjust the way the map is rendered. More...
 

Public Member Functions

 QgsMapSettings ()
 
QColor backgroundColor () const
 Get the background color of the map. More...
 
QString customRenderFlags () const
 Get custom rendering flags. More...
 
const QgsDatumTransformStoredatumTransformStore () const
 
QgsDatumTransformStoredatumTransformStore ()
 
QgsCoordinateReferenceSystem destinationCrs () const
 returns CRS of destination coordinate reference system More...
 
QString ellipsoid () const
 Returns ellipsoid's acronym. More...
 
const QgsExpressionContextexpressionContext () const
 Gets the expression context. More...
 
QgsRectangle extent () const
 Return geographical coordinates of the rectangle that should be rendered. More...
 
Flags flags () const
 Return combination of flags used for rendering. More...
 
QgsRectangle fullExtent () const
 returns current extent of layer set More...
 
bool hasValidSettings () const
 Check whether the map settings are valid and can be used for rendering. More...
 
const QgsLabelingEngineSettingslabelingEngineSettings () const
 Returns global configuration of the labeling engine. More...
 
QgsRectangle layerExtentToOutputExtent (const QgsMapLayer *layer, QgsRectangle extent) const
 transform bounding box from layer's CRS to output CRS More...
 
QStringList layerIds () const
 Get list of layer IDs for map rendering The layers are stored in the reverse order of how they are rendered (layer with index 0 will be on top) More...
 
QList< QgsMapLayer * > layers () const
 Get list of layers for map rendering The layers are stored in the reverse order of how they are rendered (layer with index 0 will be on top) More...
 
QMap< QString, QString > layerStyleOverrides () const
 Get map of map layer style overrides (key: layer ID, value: style name) where a different style should be used instead of the current one. More...
 
QgsPointXY layerToMapCoordinates (const QgsMapLayer *layer, QgsPointXY point) const
 transform point coordinates from layer's CRS to output CRS More...
 
QgsRectangle layerToMapCoordinates (const QgsMapLayer *layer, QgsRectangle rect) const
 transform rectangle from layer's CRS to output CRS More...
 
double layerToMapUnits (const QgsMapLayer *layer, const QgsRectangle &referenceExtent=QgsRectangle()) const
 Computes an estimated conversion factor between layer and map units: layerUnits * layerToMapUnits = mapUnits. More...
 
QgsCoordinateTransform layerTransform (const QgsMapLayer *layer) const
 Return coordinate transform from layer's CRS to destination CRS. More...
 
double magnificationFactor () const
 Return the magnification factor. More...
 
QgsPointXY mapToLayerCoordinates (const QgsMapLayer *layer, QgsPointXY point) const
 transform point coordinates from output CRS to layer's CRS More...
 
QgsRectangle mapToLayerCoordinates (const QgsMapLayer *layer, QgsRectangle rect) const
 transform rectangle from output CRS to layer's CRS More...
 
const QgsMapToPixelmapToPixel () const
 
QgsUnitTypes::DistanceUnit mapUnits () const
 Get units of map's geographical coordinates - used for scale calculation. More...
 
double mapUnitsPerPixel () const
 Return the distance in geographical coordinates that equals to one pixel in the map. More...
 
double outputDpi () const
 Return DPI used for conversion between real world units (e.g. More...
 
QgsRectangle outputExtentToLayerExtent (const QgsMapLayer *layer, QgsRectangle extent) const
 transform bounding box from output CRS to layer's CRS More...
 
QImage::Format outputImageFormat () const
 format of internal QImage, default QImage::Format_ARGB32_Premultiplied More...
 
QSize outputSize () const
 Return the size of the resulting map image. More...
 
void readXml (QDomNode &node)
 
double rotation () const
 Returns the rotation of the resulting map image, in degrees clockwise. More...
 
double scale () const
 Returns the calculated map scale. More...
 
double segmentationTolerance () const
 Gets the segmentation tolerance applied when rendering curved geometries. More...
 
QgsAbstractGeometry::SegmentationToleranceType segmentationToleranceType () const
 Gets segmentation tolerance type (maximum angle or maximum difference between curve and approximation) More...
 
QColor selectionColor () const
 Get color that is used for drawing of selected vector features. More...
 
void setBackgroundColor (const QColor &color)
 Set the background color of the map. More...
 
void setCustomRenderFlags (const QString &customRenderFlags)
 Sets the custom rendering flags. More...
 
void setDestinationCrs (const QgsCoordinateReferenceSystem &crs)
 sets destination coordinate reference system More...
 
bool setEllipsoid (const QString &ellipsoid)
 Sets the ellipsoid by its acronym. More...
 
void setExpressionContext (const QgsExpressionContext &context)
 Sets the expression context. More...
 
void setExtent (const QgsRectangle &rect, bool magnified=true)
 Set coordinates of the rectangle which should be rendered. More...
 
void setFlag (Flag flag, bool on=true)
 Enable or disable a particular flag (other flags are not affected) More...
 
void setFlags (QgsMapSettings::Flags flags)
 Set combination of flags that will be used for rendering. More...
 
void setLabelingEngineSettings (const QgsLabelingEngineSettings &settings)
 Sets global configuration of the labeling engine. More...
 
void setLayers (const QList< QgsMapLayer *> &layers)
 Set list of layers for map rendering. More...
 
void setLayerStyleOverrides (const QMap< QString, QString > &overrides)
 Set map of map layer style overrides (key: layer ID, value: style name) where a different style should be used instead of the current one. More...
 
void setMagnificationFactor (double factor)
 Set the magnification factor. More...
 
void setOutputDpi (double dpi)
 Set DPI used for conversion between real world units (e.g. mm) and pixels. More...
 
void setOutputImageFormat (QImage::Format format)
 sets format of internal QImage More...
 
void setOutputSize (QSize size)
 Set the size of the resulting map image. More...
 
void setRotation (double rotation)
 Sets the rotation of the resulting map image, in degrees clockwise. More...
 
void setSegmentationTolerance (double tolerance)
 Sets the segmentation tolerance applied when rendering curved geometries. More...
 
void setSegmentationToleranceType (QgsAbstractGeometry::SegmentationToleranceType type)
 Sets segmentation tolerance type (maximum angle or maximum difference between curve and approximation) More...
 
void setSelectionColor (const QColor &color)
 Set color that is used for drawing of selected vector features. More...
 
bool testFlag (Flag flag) const
 Check whether a particular flag is enabled. More...
 
QgsRectangle visibleExtent () const
 Return the actual extent derived from requested extent that takes takes output image size into account. More...
 
QPolygonF visiblePolygon () const
 Return the visible area as a polygon (may be rotated) More...
 
void writeXml (QDomNode &node, QDomDocument &doc)
 

Protected Member Functions

void updateDerived ()
 

Protected Attributes

QColor mBackgroundColor
 
QString mCustomRenderFlags
 
QgsDatumTransformStore mDatumTransformStore
 
QgsCoordinateReferenceSystem mDestCRS
 
double mDpi
 
QString mEllipsoid
 ellipsoid acronym (from table tbl_ellipsoids) More...
 
QgsExpressionContext mExpressionContext
 
QgsRectangle mExtent
 
Flags mFlags
 
QImage::Format mImageFormat = QImage::Format_ARGB32_Premultiplied
 
QgsLabelingEngineSettings mLabelingEngineSettings
 
QgsWeakMapLayerPointerList mLayers
 list of layers to be rendered (stored as weak pointers) More...
 
QMap< QString, QString > mLayerStyleOverrides
 
double mMagnificationFactor = 1.0
 
QgsMapToPixel mMapToPixel
 
double mMapUnitsPerPixel = 1
 
double mRotation = 0.0
 
double mScale = 1
 
QgsScaleCalculator mScaleCalculator
 
double mSegmentationTolerance
 
QgsAbstractGeometry::SegmentationToleranceType mSegmentationToleranceType = QgsAbstractGeometry::MaximumAngle
 
QColor mSelectionColor
 
QSize mSize
 
bool mValid = false
 Whether the actual settings are valid (set in updateDerived()) More...
 
QgsRectangle mVisibleExtent
 Extent with some additional white space that matches the output aspect ratio. More...
 

Detailed Description

The QgsMapSettings class contains configuration for rendering of the map.

The rendering itself is done by QgsMapRendererJob subclasses.

In order to set up QgsMapSettings instance, it is necessary to set at least few members: extent, output size and layers.

QgsMapSettings and QgsMapRendererJob (+subclasses) are intended to replace QgsMapRenderer class that existed before QGIS 2.4. The advantage of the new classes is that they separate the settings from the rendering and provide asynchronous API for map rendering.

Since
QGIS 2.4

Definition at line 59 of file qgsmapsettings.h.

Member Enumeration Documentation

◆ Flag

Enumeration of flags that adjust the way the map is rendered.

Enumerator
Antialiasing 

Enable anti-aliasing for map rendering.

DrawEditingInfo 

Enable drawing of vertex markers for layers in editing mode.

ForceVectorOutput 

Vector graphics should not be cached and drawn as raster images.

UseAdvancedEffects 

Enable layer opacity and blending effects.

DrawLabeling 

Enable drawing of labels on top of the map.

UseRenderingOptimization 

Enable vector simplification and other rendering optimizations.

DrawSelection 

Whether vector selections should be shown in the rendered map.

DrawSymbolBounds 

Draw bounds of symbols (for debugging/testing)

RenderMapTile 

Draw map such that there are no problems between adjacent tiles.

RenderPartialOutput 

Whether to make extra effort to update map image with partially rendered layers (better for interactive map canvas). Added in QGIS 3.0.

Definition at line 205 of file qgsmapsettings.h.

Constructor & Destructor Documentation

◆ QgsMapSettings()

QgsMapSettings::QgsMapSettings ( )

Definition at line 34 of file qgsmapsettings.cpp.

Member Function Documentation

◆ backgroundColor()

QColor QgsMapSettings::backgroundColor ( ) const
inline

Get the background color of the map.

Definition at line 197 of file qgsmapsettings.h.

◆ customRenderFlags()

QString QgsMapSettings::customRenderFlags ( ) const
inline

Get custom rendering flags.

Layers might honour these to alter their rendering.

Returns
custom flags strings, separated by ';'
Since
QGIS 2.16
See also
setCustomRenderFlags()

Definition at line 158 of file qgsmapsettings.h.

◆ datumTransformStore() [1/2]

const QgsDatumTransformStore& QgsMapSettings::datumTransformStore ( ) const
inline
Note
not available in Python bindings

Definition at line 273 of file qgsmapsettings.h.

◆ datumTransformStore() [2/2]

QgsDatumTransformStore& QgsMapSettings::datumTransformStore ( )
inline

Definition at line 274 of file qgsmapsettings.h.

◆ destinationCrs()

QgsCoordinateReferenceSystem QgsMapSettings::destinationCrs ( ) const

returns CRS of destination coordinate reference system

Definition at line 282 of file qgsmapsettings.cpp.

◆ ellipsoid()

QString QgsMapSettings::ellipsoid ( ) const
inline

Returns ellipsoid's acronym.

Calculations will only use the ellipsoid if a valid ellipsoid has been set.

Since
QGIS 3.0
See also
setEllipsoid()

Definition at line 192 of file qgsmapsettings.h.

◆ expressionContext()

const QgsExpressionContext& QgsMapSettings::expressionContext ( ) const
inline

Gets the expression context.

This context should be used for all expression evaluation associated with this map settings.

See also
setExpressionContext()
Since
QGIS 2.12

Definition at line 268 of file qgsmapsettings.h.

◆ extent()

QgsRectangle QgsMapSettings::extent ( ) const

Return geographical coordinates of the rectangle that should be rendered.

The actual visible extent used for rendering could be slightly different since the given extent may be expanded in order to fit the aspect ratio of output size. Use visibleExtent() to get the resulting extent.

Definition at line 74 of file qgsmapsettings.cpp.

◆ flags()

QgsMapSettings::Flags QgsMapSettings::flags ( ) const

Return combination of flags used for rendering.

Definition at line 314 of file qgsmapsettings.cpp.

◆ fullExtent()

QgsRectangle QgsMapSettings::fullExtent ( ) const

returns current extent of layer set

Definition at line 502 of file qgsmapsettings.cpp.

◆ hasValidSettings()

bool QgsMapSettings::hasValidSettings ( ) const

Check whether the map settings are valid and can be used for rendering.

Definition at line 330 of file qgsmapsettings.cpp.

◆ labelingEngineSettings()

const QgsLabelingEngineSettings& QgsMapSettings::labelingEngineSettings ( ) const
inline

Returns global configuration of the labeling engine.

Since
QGIS 3.0

Definition at line 366 of file qgsmapsettings.h.

◆ layerExtentToOutputExtent()

QgsRectangle QgsMapSettings::layerExtentToOutputExtent ( const QgsMapLayer layer,
QgsRectangle  extent 
) const

transform bounding box from layer's CRS to output CRS

See also
layerToMapCoordinates( QgsMapLayer* layer, QgsRectangle rect ) if you want to transform a rectangle
Returns
a bounding box (aligned rectangle) containing the transformed extent

Definition at line 385 of file qgsmapsettings.cpp.

◆ layerIds()

QStringList QgsMapSettings::layerIds ( ) const

Get list of layer IDs for map rendering The layers are stored in the reverse order of how they are rendered (layer with index 0 will be on top)

Definition at line 247 of file qgsmapsettings.cpp.

◆ layers()

QList< QgsMapLayer * > QgsMapSettings::layers ( ) const

Get list of layers for map rendering The layers are stored in the reverse order of how they are rendered (layer with index 0 will be on top)

Definition at line 253 of file qgsmapsettings.cpp.

◆ layerStyleOverrides()

QMap< QString, QString > QgsMapSettings::layerStyleOverrides ( ) const

Get map of map layer style overrides (key: layer ID, value: style name) where a different style should be used instead of the current one.

Since
QGIS 2.8

Definition at line 263 of file qgsmapsettings.cpp.

◆ layerToMapCoordinates() [1/2]

QgsPointXY QgsMapSettings::layerToMapCoordinates ( const QgsMapLayer layer,
QgsPointXY  point 
) const

transform point coordinates from layer's CRS to output CRS

Returns
the transformed point

Definition at line 433 of file qgsmapsettings.cpp.

◆ layerToMapCoordinates() [2/2]

QgsRectangle QgsMapSettings::layerToMapCoordinates ( const QgsMapLayer layer,
QgsRectangle  rect 
) const

transform rectangle from layer's CRS to output CRS

See also
layerExtentToOutputExtent() if you want to transform a bounding box
Returns
the transformed rectangle

Definition at line 450 of file qgsmapsettings.cpp.

◆ layerToMapUnits()

double QgsMapSettings::layerToMapUnits ( const QgsMapLayer layer,
const QgsRectangle referenceExtent = QgsRectangle() 
) const

Computes an estimated conversion factor between layer and map units: layerUnits * layerToMapUnits = mapUnits.

Parameters
layerThe layer
referenceExtentA reference extent based on which to perform the computation. If not specified, the layer extent is used
Since
QGIS 2.12

Definition at line 372 of file qgsmapsettings.cpp.

◆ layerTransform()

QgsCoordinateTransform QgsMapSettings::layerTransform ( const QgsMapLayer layer) const

Return coordinate transform from layer's CRS to destination CRS.

Parameters
layer
Returns
transform - may be invalid if the transform is not needed

Definition at line 366 of file qgsmapsettings.cpp.

◆ magnificationFactor()

double QgsMapSettings::magnificationFactor ( ) const

Return the magnification factor.

Since
QGIS 2.16
See also
setMagnificationFactor()

Definition at line 69 of file qgsmapsettings.cpp.

◆ mapToLayerCoordinates() [1/2]

QgsPointXY QgsMapSettings::mapToLayerCoordinates ( const QgsMapLayer layer,
QgsPointXY  point 
) const

transform point coordinates from output CRS to layer's CRS

Returns
the transformed point

Definition at line 467 of file qgsmapsettings.cpp.

◆ mapToLayerCoordinates() [2/2]

QgsRectangle QgsMapSettings::mapToLayerCoordinates ( const QgsMapLayer layer,
QgsRectangle  rect 
) const

transform rectangle from output CRS to layer's CRS

See also
outputExtentToLayerExtent() if you want to transform a bounding box
Returns
the transformed rectangle

Definition at line 484 of file qgsmapsettings.cpp.

◆ mapToPixel()

const QgsMapToPixel& QgsMapSettings::mapToPixel ( ) const
inline

Definition at line 276 of file qgsmapsettings.h.

◆ mapUnits()

QgsUnitTypes::DistanceUnit QgsMapSettings::mapUnits ( ) const

Get units of map's geographical coordinates - used for scale calculation.

Definition at line 324 of file qgsmapsettings.cpp.

◆ mapUnitsPerPixel()

double QgsMapSettings::mapUnitsPerPixel ( ) const

Return the distance in geographical coordinates that equals to one pixel in the map.

Definition at line 355 of file qgsmapsettings.cpp.

◆ outputDpi()

double QgsMapSettings::outputDpi ( ) const

Return DPI used for conversion between real world units (e.g.

mm) and pixels Default value is 96

Definition at line 234 of file qgsmapsettings.cpp.

◆ outputExtentToLayerExtent()

QgsRectangle QgsMapSettings::outputExtentToLayerExtent ( const QgsMapLayer layer,
QgsRectangle  extent 
) const

transform bounding box from output CRS to layer's CRS

See also
mapToLayerCoordinates( QgsMapLayer* layer,QgsRectangle rect ) if you want to transform a rectangle
Returns
a bounding box (aligned rectangle) containing the transformed extent

Definition at line 409 of file qgsmapsettings.cpp.

◆ outputImageFormat()

QImage::Format QgsMapSettings::outputImageFormat ( ) const
inline

format of internal QImage, default QImage::Format_ARGB32_Premultiplied

Definition at line 233 of file qgsmapsettings.h.

◆ outputSize()

QSize QgsMapSettings::outputSize ( ) const

Return the size of the resulting map image.

Definition at line 222 of file qgsmapsettings.cpp.

◆ readXml()

void QgsMapSettings::readXml ( QDomNode &  node)

Definition at line 560 of file qgsmapsettings.cpp.

◆ rotation()

double QgsMapSettings::rotation ( ) const

Returns the rotation of the resulting map image, in degrees clockwise.

Since
QGIS 2.8
See also
setRotation()

Definition at line 91 of file qgsmapsettings.cpp.

◆ scale()

double QgsMapSettings::scale ( ) const

Returns the calculated map scale.

The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map.

Definition at line 360 of file qgsmapsettings.cpp.

◆ segmentationTolerance()

double QgsMapSettings::segmentationTolerance ( ) const
inline

Gets the segmentation tolerance applied when rendering curved geometries.

Definition at line 347 of file qgsmapsettings.h.

◆ segmentationToleranceType()

QgsAbstractGeometry::SegmentationToleranceType QgsMapSettings::segmentationToleranceType ( ) const
inline

Gets segmentation tolerance type (maximum angle or maximum difference between curve and approximation)

Definition at line 354 of file qgsmapsettings.h.

◆ selectionColor()

QColor QgsMapSettings::selectionColor ( ) const
inline

Get color that is used for drawing of selected vector features.

Definition at line 202 of file qgsmapsettings.h.

◆ setBackgroundColor()

void QgsMapSettings::setBackgroundColor ( const QColor &  color)
inline

Set the background color of the map.

Definition at line 195 of file qgsmapsettings.h.

◆ setCustomRenderFlags()

void QgsMapSettings::setCustomRenderFlags ( const QString &  customRenderFlags)
inline

Sets the custom rendering flags.

Layers might honour these to alter their rendering.

Parameters
customRenderFlagscustom flags strings, separated by ';'
Since
QGIS 2.16
See also
customRenderFlags()

Definition at line 166 of file qgsmapsettings.h.

◆ setDestinationCrs()

void QgsMapSettings::setDestinationCrs ( const QgsCoordinateReferenceSystem crs)

sets destination coordinate reference system

Definition at line 273 of file qgsmapsettings.cpp.

◆ setEllipsoid()

bool QgsMapSettings::setEllipsoid ( const QString &  ellipsoid)

Sets the ellipsoid by its acronym.

Known ellipsoid acronyms can be retrieved using QgsEllipsoidUtils::acronyms(). Calculations will only use the ellipsoid if a valid ellipsoid has been set.

Returns
true if ellipsoid was successfully set
Since
QGIS 3.0
See also
ellipsoid()

Definition at line 287 of file qgsmapsettings.cpp.

◆ setExpressionContext()

void QgsMapSettings::setExpressionContext ( const QgsExpressionContext context)
inline

Sets the expression context.

This context is used for all expression evaluation associated with this map settings.

See also
expressionContext()
Since
QGIS 2.12

Definition at line 260 of file qgsmapsettings.h.

◆ setExtent()

void QgsMapSettings::setExtent ( const QgsRectangle rect,
bool  magnified = true 
)

Set coordinates of the rectangle which should be rendered.

The actual visible extent used for rendering could be slightly different since the given extent may be expanded in order to fit the aspect ratio of output size. Use visibleExtent() to get the resulting extent.

Definition at line 79 of file qgsmapsettings.cpp.

◆ setFlag()

void QgsMapSettings::setFlag ( QgsMapSettings::Flag  flag,
bool  on = true 
)

Enable or disable a particular flag (other flags are not affected)

Definition at line 306 of file qgsmapsettings.cpp.

◆ setFlags()

void QgsMapSettings::setFlags ( QgsMapSettings::Flags  flags)

Set combination of flags that will be used for rendering.

Definition at line 301 of file qgsmapsettings.cpp.

◆ setLabelingEngineSettings()

void QgsMapSettings::setLabelingEngineSettings ( const QgsLabelingEngineSettings settings)
inline

Sets global configuration of the labeling engine.

Since
QGIS 3.0

Definition at line 360 of file qgsmapsettings.h.

◆ setLayers()

void QgsMapSettings::setLayers ( const QList< QgsMapLayer *> &  layers)

Set list of layers for map rendering.

The layers must be registered in QgsProject. The layers are stored in the reverse order of how they are rendered (layer with index 0 will be on top)

Definition at line 258 of file qgsmapsettings.cpp.

◆ setLayerStyleOverrides()

void QgsMapSettings::setLayerStyleOverrides ( const QMap< QString, QString > &  overrides)

Set map of map layer style overrides (key: layer ID, value: style name) where a different style should be used instead of the current one.

Since
QGIS 2.8

Definition at line 268 of file qgsmapsettings.cpp.

◆ setMagnificationFactor()

void QgsMapSettings::setMagnificationFactor ( double  factor)

Set the magnification factor.

Parameters
factorthe factor of magnification
Since
QGIS 2.16
See also
magnificationFactor()

Definition at line 48 of file qgsmapsettings.cpp.

◆ setOutputDpi()

void QgsMapSettings::setOutputDpi ( double  dpi)

Set DPI used for conversion between real world units (e.g. mm) and pixels.

Definition at line 239 of file qgsmapsettings.cpp.

◆ setOutputImageFormat()

void QgsMapSettings::setOutputImageFormat ( QImage::Format  format)
inline

sets format of internal QImage

Definition at line 231 of file qgsmapsettings.h.

◆ setOutputSize()

void QgsMapSettings::setOutputSize ( QSize  size)

Set the size of the resulting map image.

Definition at line 227 of file qgsmapsettings.cpp.

◆ setRotation()

void QgsMapSettings::setRotation ( double  rotation)

Sets the rotation of the resulting map image, in degrees clockwise.

Since
QGIS 2.8
See also
rotation()

Definition at line 96 of file qgsmapsettings.cpp.

◆ setSegmentationTolerance()

void QgsMapSettings::setSegmentationTolerance ( double  tolerance)
inline

Sets the segmentation tolerance applied when rendering curved geometries.

Parameters
tolerancethe segmentation tolerance

Definition at line 345 of file qgsmapsettings.h.

◆ setSegmentationToleranceType()

void QgsMapSettings::setSegmentationToleranceType ( QgsAbstractGeometry::SegmentationToleranceType  type)
inline

Sets segmentation tolerance type (maximum angle or maximum difference between curve and approximation)

Parameters
typethe segmentation tolerance typename

Definition at line 352 of file qgsmapsettings.h.

◆ setSelectionColor()

void QgsMapSettings::setSelectionColor ( const QColor &  color)
inline

Set color that is used for drawing of selected vector features.

Definition at line 200 of file qgsmapsettings.h.

◆ testFlag()

bool QgsMapSettings::testFlag ( QgsMapSettings::Flag  flag) const

Check whether a particular flag is enabled.

Definition at line 319 of file qgsmapsettings.cpp.

◆ updateDerived()

void QgsMapSettings::updateDerived ( )
protected

Definition at line 108 of file qgsmapsettings.cpp.

◆ visibleExtent()

QgsRectangle QgsMapSettings::visibleExtent ( ) const

Return the actual extent derived from requested extent that takes takes output image size into account.

Definition at line 335 of file qgsmapsettings.cpp.

◆ visiblePolygon()

QPolygonF QgsMapSettings::visiblePolygon ( ) const

Return the visible area as a polygon (may be rotated)

Since
QGIS 2.8

Definition at line 340 of file qgsmapsettings.cpp.

◆ writeXml()

void QgsMapSettings::writeXml ( QDomNode &  node,
QDomDocument &  doc 
)

Definition at line 597 of file qgsmapsettings.cpp.

Member Data Documentation

◆ mBackgroundColor

QColor QgsMapSettings::mBackgroundColor
protected

Definition at line 390 of file qgsmapsettings.h.

◆ mCustomRenderFlags

QString QgsMapSettings::mCustomRenderFlags
protected

Definition at line 382 of file qgsmapsettings.h.

◆ mDatumTransformStore

QgsDatumTransformStore QgsMapSettings::mDatumTransformStore
protected

Definition at line 388 of file qgsmapsettings.h.

◆ mDestCRS

QgsCoordinateReferenceSystem QgsMapSettings::mDestCRS
protected

Definition at line 385 of file qgsmapsettings.h.

◆ mDpi

double QgsMapSettings::mDpi
protected

Definition at line 370 of file qgsmapsettings.h.

◆ mEllipsoid

QString QgsMapSettings::mEllipsoid
protected

ellipsoid acronym (from table tbl_ellipsoids)

Definition at line 387 of file qgsmapsettings.h.

◆ mExpressionContext

QgsExpressionContext QgsMapSettings::mExpressionContext
protected

Definition at line 383 of file qgsmapsettings.h.

◆ mExtent

QgsRectangle QgsMapSettings::mExtent
protected

Definition at line 374 of file qgsmapsettings.h.

◆ mFlags

Flags QgsMapSettings::mFlags
protected

Definition at line 393 of file qgsmapsettings.h.

◆ mImageFormat

QImage::Format QgsMapSettings::mImageFormat = QImage::Format_ARGB32_Premultiplied
protected

Definition at line 395 of file qgsmapsettings.h.

◆ mLabelingEngineSettings

QgsLabelingEngineSettings QgsMapSettings::mLabelingEngineSettings
protected

Definition at line 400 of file qgsmapsettings.h.

◆ mLayers

QgsWeakMapLayerPointerList QgsMapSettings::mLayers
protected

list of layers to be rendered (stored as weak pointers)

Definition at line 380 of file qgsmapsettings.h.

◆ mLayerStyleOverrides

QMap<QString, QString> QgsMapSettings::mLayerStyleOverrides
protected

Definition at line 381 of file qgsmapsettings.h.

◆ mMagnificationFactor

double QgsMapSettings::mMagnificationFactor = 1.0
protected

Definition at line 377 of file qgsmapsettings.h.

◆ mMapToPixel

QgsMapToPixel QgsMapSettings::mMapToPixel
protected

Definition at line 410 of file qgsmapsettings.h.

◆ mMapUnitsPerPixel

double QgsMapSettings::mMapUnitsPerPixel = 1
protected

Definition at line 405 of file qgsmapsettings.h.

◆ mRotation

double QgsMapSettings::mRotation = 0.0
protected

Definition at line 376 of file qgsmapsettings.h.

◆ mScale

double QgsMapSettings::mScale = 1
protected

Definition at line 406 of file qgsmapsettings.h.

◆ mScaleCalculator

QgsScaleCalculator QgsMapSettings::mScaleCalculator
protected

Definition at line 409 of file qgsmapsettings.h.

◆ mSegmentationTolerance

double QgsMapSettings::mSegmentationTolerance
protected

Definition at line 397 of file qgsmapsettings.h.

◆ mSegmentationToleranceType

QgsAbstractGeometry::SegmentationToleranceType QgsMapSettings::mSegmentationToleranceType = QgsAbstractGeometry::MaximumAngle
protected

Definition at line 398 of file qgsmapsettings.h.

◆ mSelectionColor

QColor QgsMapSettings::mSelectionColor
protected

Definition at line 391 of file qgsmapsettings.h.

◆ mSize

QSize QgsMapSettings::mSize
protected

Definition at line 372 of file qgsmapsettings.h.

◆ mValid

bool QgsMapSettings::mValid = false
protected

Whether the actual settings are valid (set in updateDerived())

Definition at line 403 of file qgsmapsettings.h.

◆ mVisibleExtent

QgsRectangle QgsMapSettings::mVisibleExtent
protected

Extent with some additional white space that matches the output aspect ratio.

Definition at line 404 of file qgsmapsettings.h.


The documentation for this class was generated from the following files: