16 #ifndef QGSMAPSETTINGS_H
17 #define QGSMAPSETTINGS_H
22 #include <QStringList>
69 QSize outputSize()
const;
71 void setOutputSize(
const QSize&
size );
75 int outputDpi()
const;
77 void setOutputDpi(
int dpi );
81 QStringList layers()
const;
84 void setLayers(
const QStringList& layers );
87 void setCrsTransformEnabled(
bool enabled );
89 bool hasCrsTransformEnabled()
const;
115 DrawEditingInfo = 0x02,
116 ForceVectorOutput = 0x04,
117 UseAdvancedEffects = 0x08,
119 UseRenderingOptimization = 0x20,
120 DrawSelection = 0x40,
123 Q_DECLARE_FLAGS( Flags, Flag )
126 void setFlags( Flags flags );
128 void setFlag( Flag flag,
bool on = true );
132 bool testFlag( Flag flag ) const;
135 void setOutputImageFormat( QImage::Format format ) { mImageFormat = format; }
140 bool hasValidSettings()
const;
144 double mapUnitsPerPixel()
const;
146 double scale()
const;
208 void readXML( QDomNode& theNode );
210 void writeXML( QDomNode& theNode, QDomDocument& theDoc );
244 void updateDerived();
247 Q_DECLARE_OPERATORS_FOR_FLAGS( QgsMapSettings::Flags )
250 #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.
QColor selectionColor() const
Get color that is used for drawing of selected vector features.
QgsCoordinateReferenceSystem mDestCRS
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.
QgsScaleCalculator mScaleCalculator
A class to represent a point geometry.
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