QGIS API Documentation  2.6.0-Brighton
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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