17 #ifndef QGSMAPRENDER_H
18 #define QGSMAPRENDER_H
21 #include <QStringList>
46 QgsLabelPosition(
int id,
double r,
const QVector< QgsPoint >& corners,
const QgsRectangle& rect,
double w,
double h,
const QString& layer,
bool upside_down,
bool diagram =
false ):
47 featureId( id ), rotation( r ), cornerPoints( corners ), labelRect( rect ), width( w ), height( h ), layerID( layer ), upsideDown( upside_down ), isDiagram( diagram ) {}
48 QgsLabelPosition(): featureId( -1 ), rotation( 0 ), labelRect(
QgsRectangle() ), width( 0 ), height( 0 ), layerID(
"" ), upsideDown( false ), isDiagram( false ) {}
85 virtual void exit() = 0;
121 void render( QPainter* painter );
131 double scale()
const {
return mScale; }
137 int width()
const {
return mSize.width(); };
138 int height()
const {
return mSize.height(); };
152 void setOutputSize( QSize size,
int dpi );
153 void setOutputSize( QSizeF size,
double dpi );
159 QSizeF outputSizeF();
174 void setProjectionsEnabled(
bool enabled );
177 bool hasCrsTransformEnabled();
205 QStringList& layerSet();
208 void setLayerSet(
const QStringList& layers );
211 void updateFullExtent();
214 bool readXML( QDomNode & theNode );
217 bool writeXML( QDomNode & theNode, QDomDocument & theDoc );
233 void drawingProgress(
int current,
int total );
235 void hasCrsTransformEnabled(
bool flag );
237 void destinationSrsChanged();
241 void mapUnitsChanged();
249 void onDrawingProgress(
int current,
int total );
254 void adjustExtentToSize();