QGIS API Documentation  2.5.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
qgsdxfpaintdevice.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsdxpaintdevice.h
3  ------------------
4  begin : November 2013
5  copyright : (C) 2013 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 QGSDXFPAINTDEVICE_H
19 #define QGSDXFPAINTDEVICE_H
20 
21 #include <QPaintDevice>
22 #include "qgsdxfpaintengine.h"
23 
24 class QgsDxfExport;
25 class QPaintEngine;
26 
29 class CORE_EXPORT QgsDxfPaintDevice: public QPaintDevice
30 {
31  public:
34 
35  QPaintEngine* paintEngine() const;
36 
37  void setDrawingSize( const QSizeF& size ) { mDrawingSize = size; }
38  void setOutputSize( const QRectF& r ) { mRectangle = r; }
39 
41  double widthScaleFactor() const;
42 
44  QPointF dxfCoordinates( const QPointF& pt ) const;
45 
46  /*int height() const { return mDrawingSize.height(); }
47  int width() const { return mDrawingSize.width(); }*/
48 
49  int metric( PaintDeviceMetric metric ) const;
50 
51  void setLayer( const QString& layer );
52 
53  void setShift( const QPointF& shift );
54 
55 
56  private:
57  QgsDxfPaintEngine* mPaintEngine;
58 
59  QSizeF mDrawingSize; //size (in source coordinates)
60  QRectF mRectangle; //size (in dxf coordinates)
61 };
62 
63 #endif // QGSDXFPAINTDEVICE_H
A paint device for drawing into dxf files.
Definition: qgsdxfpaintdevice.h:29
Definition: qgsdxfpaintengine.h:27
double widthScaleFactor
Definition: qgssvgcache.cpp:79
void setDrawingSize(const QSizeF &size)
Definition: qgsdxfpaintdevice.h:37
double size
Definition: qgssvgcache.cpp:77
Definition: qgsdxfexport.h:32
void setOutputSize(const QRectF &r)
Definition: qgsdxfpaintdevice.h:38