16 #ifndef QGSMAPSETTINGS_H 17 #define QGSMAPSETTINGS_H 22 #include <QStringList> 70 QSize outputSize()
const;
72 void setOutputSize(
QSize size );
77 double rotation()
const;
81 void setRotation(
double degrees );
85 int outputDpi()
const;
87 void setOutputDpi(
int dpi );
104 void setCrsTransformEnabled(
bool enabled );
106 bool hasCrsTransformEnabled()
const;
132 DrawEditingInfo = 0x02,
133 ForceVectorOutput = 0x04,
134 UseAdvancedEffects = 0x08,
136 UseRenderingOptimization = 0x20,
137 DrawSelection = 0x40,
138 DrawSymbolBounds = 0x80,
139 RenderMapTile = 0x100
142 Q_DECLARE_FLAGS( Flags,
Flag )
147 void setFlag(
Flag flag,
bool on = true );
151 bool testFlag(
Flag flag ) const;
154 void setOutputImageFormat(
QImage::Format format ) { mImageFormat = format; }
159 bool hasValidSettings()
const;
166 double mapUnitsPerPixel()
const;
168 double scale()
const;
291 void updateDerived();
294 Q_DECLARE_OPERATORS_FOR_FLAGS( QgsMapSettings::Flags )
297 #endif // QGSMAPSETTINGS_H const QgsDatumTransformStore & datumTransformStore() const
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.
void setExpressionContext(const QgsExpressionContext &context)
Sets the expression context.
QColor selectionColor() const
Get color that is used for drawing of selected vector features.
QgsCoordinateReferenceSystem mDestCRS
QMap< QString, QString > mLayerStyleOverrides
const QgsMapToPixel & mapToPixel() const
The QgsMapSettings class contains configuration for rendering of the map.
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 how map is rendered.
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
QgsExpressionContext mExpressionContext
QgsScaleCalculator mScaleCalculator
A class to represent a point.
QColor backgroundColor() const
Get the background color of the map.
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.
void setSelectionColor(const QColor &color)
Set color that is used for drawing of selected vector features.
QImage::Format outputImageFormat() const
format of internal QImage, default QImage::Format_ARGB32_Premultiplied
Class for storing a coordinate reference system (CRS)
UnitType
Map units that qgis supports.
QgsDatumTransformStore mDatumTransformStore
const QgsExpressionContext & expressionContext() const
Gets the expression context.