QGIS API Documentation  2.5.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
qgsdxfpallabeling.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsdxfpallabeling.h
3  -------------------
4  begin : January 2014
5  copyright : (C) 2014 by Marco Hugentobler
6  email : marco at sourcepole dot ch
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef QGSDXFPALLABELING_H
19 #define QGSDXFPALLABELING_H
20 
21 #include "qgspallabeling.h"
22 #include "qgsmaprenderer.h"
23 #include "qgsrendercontext.h"
24 
25 class QgsDxfExport;
26 
27 class CORE_EXPORT QgsDxfPalLabeling: public QgsPalLabeling
28 {
29  public:
30  QgsDxfPalLabeling( QgsDxfExport* dxf, const QgsRectangle& bbox, double scale, QGis::UnitType mapUnits );
32 
33  QgsRenderContext& renderContext() { return mRenderContext; }
34  void drawLabel( pal::LabelPosition* label, QgsRenderContext& context, QgsPalLayerSettings& tmpLyr, DrawLabelType drawType, double dpiRatio = 1.0 );
35 
36  private:
37  QgsDxfExport* mDxfExport;
38  QgsRenderContext mRenderContext;
39 
40  //only used for render context
41  QImage* mImage;
42  QPainter* mPainter;
43  QgsMapSettings* mSettings;
44 };
45 
46 #endif // QGSDXFPALLABELING_H
A rectangle specified with double values.
Definition: qgsrectangle.h:35
virtual void drawLabel(pal::LabelPosition *label, QgsRenderContext &context, QgsPalLayerSettings &tmpLyr, DrawLabelType drawType, double dpiRatio=1.0)
drawLabel
Definition: qgspallabeling.cpp:4281
Definition: qgspallabeling.h:705
Definition: qgsdxfpallabeling.h:27
UnitType
Map units that qgis supports.
Definition: qgis.h:229
Definition: qgspallabeling.h:64
The QgsMapSettings class contains configuration for rendering of the map.
Definition: qgsmapsettings.h:52
Contains information about the context of a rendering operation.
Definition: qgsrendercontext.h:39
LabelPositon is a candidate feature label position.
Definition: labelposition.h:53
QgsRenderContext & renderContext()
Definition: qgsdxfpallabeling.h:33
Definition: qgsdxfexport.h:32