16 #ifndef QGSMAPSETTINGS_H 17 #define QGSMAPSETTINGS_H 22 #include <QStringList> 68 void setExtent(
const QgsRectangle& rect,
bool magnified =
true );
71 QSize outputSize()
const;
73 void setOutputSize(
QSize size );
78 double rotation()
const;
82 void setRotation(
double degrees );
86 double outputDpi()
const;
88 void setOutputDpi(
double dpi );
96 void setMagnificationFactor(
double factor );
101 double magnificationFactor()
const;
132 void setCrsTransformEnabled(
bool enabled );
134 bool hasCrsTransformEnabled()
const;
160 DrawEditingInfo = 0x02,
161 ForceVectorOutput = 0x04,
162 UseAdvancedEffects = 0x08,
164 UseRenderingOptimization = 0x20,
165 DrawSelection = 0x40,
166 DrawSymbolBounds = 0x80,
167 RenderMapTile = 0x100,
168 RenderPartialOutput = 0x200,
171 Q_DECLARE_FLAGS( Flags,
Flag )
174 void setFlags(
const QgsMapSettings::Flags& flags );
176 void setFlag(
Flag flag,
bool on =
true );
180 bool testFlag(
Flag flag )
const;
188 bool hasValidSettings()
const;
195 double mapUnitsPerPixel()
const;
197 double scale()
const;
336 void updateDerived();
339 Q_DECLARE_OPERATORS_FOR_FLAGS( QgsMapSettings::Flags )
342 #endif // QGSMAPSETTINGS_H QgsAbstractGeometryV2::SegmentationToleranceType mSegmentationToleranceType
double mMagnificationFactor
A rectangle specified with double values.
Base class for all map layer types.
QgsDatumTransformStore & datumTransformStore()
QgsRectangle mVisibleExtent
extent with some additional white space that matches the output aspect ratio
QgsMapToPixel mMapToPixel
Abstract base class for map rendering implementations.
const QgsExpressionContext & expressionContext() const
Gets the expression context.
void setExpressionContext(const QgsExpressionContext &context)
Sets the expression context.
QgsCoordinateReferenceSystem mDestCRS
QMap< QString, QString > mLayerStyleOverrides
SegmentationToleranceType
Segmentation tolerance as maximum angle or maximum difference between approximation and circle...
QColor backgroundColor() const
Get the background color of the map.
void setCustomRenderFlags(const QString &customRenderFlags)
Sets the custom rendering flags.
const QgsDatumTransformStore & datumTransformStore() const
The QgsMapSettings class contains configuration for rendering of the map.
QString customRenderFlags() const
Get custom rendering flags.
Perform transforms between map coordinates and device coordinates.
QImage::Format mImageFormat
bool mValid
whether the actual settings are valid (set in updateDerived())
Flag
Enumeration of flags that adjust the way the map is rendered.
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
void setSegmentationTolerance(double tolerance)
Sets the segmentation tolerance applied when rendering curved geometries.
QImage::Format outputImageFormat() const
format of internal QImage, default QImage::Format_ARGB32_Premultiplied
void setOutputImageFormat(QImage::Format format)
sets format of internal QImage
QgsExpressionContext mExpressionContext
QgsScaleCalculator mScaleCalculator
A class to represent a point.
const QgsMapToPixel & mapToPixel() const
Calculates scale for a given combination of canvas size, map extent, and monitor dpi.
void setBackgroundColor(const QColor &color)
Set the background color of the map.
double segmentationTolerance() const
Gets the segmentation tolerance applied when rendering curved geometries.
double mSegmentationTolerance
void setSelectionColor(const QColor &color)
Set color that is used for drawing of selected vector features.
QgsAbstractGeometryV2::SegmentationToleranceType segmentationToleranceType() const
Gets segmentation tolerance type (maximum angle or maximum difference between curve and approximation...
Class for storing a coordinate reference system (CRS)
UnitType
Map units that qgis supports.
QColor selectionColor() const
Get color that is used for drawing of selected vector features.
QgsDatumTransformStore mDatumTransformStore
void setSegmentationToleranceType(QgsAbstractGeometryV2::SegmentationToleranceType type)
Sets segmentation tolerance type (maximum angle or maximum difference between curve and approximation...
QString mCustomRenderFlags