Seamly2D
Code documentation
vdxfpaintdevice.h
Go to the documentation of this file.
1 /************************************************************************
2  **
3  ** @file vdxfpaintdevice.h
4  ** @author Valentina Zhuravska <zhuravska19(at)gmail.com>
5  ** @date 12 812, 2015
6  **
7  ** @brief
8  ** @copyright
9  ** This source code is part of the Valentine project, a pattern making
10  ** program, whose allow create and modeling patterns of clothing.
11  ** Copyright (C) 2013-2015 Seamly2D project
12  ** <https://github.com/fashionfreedom/seamly2d> All Rights Reserved.
13  **
14  ** Seamly2D is free software: you can redistribute it and/or modify
15  ** it under the terms of the GNU General Public License as published by
16  ** the Free Software Foundation, either version 3 of the License, or
17  ** (at your option) any later version.
18  **
19  ** Seamly2D is distributed in the hope that it will be useful,
20  ** but WITHOUT ANY WARRANTY; without even the implied warranty of
21  ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22  ** GNU General Public License for more details.
23  **
24  ** You should have received a copy of the GNU General Public License
25  ** along with Seamly2D. If not, see <http://www.gnu.org/licenses/>.
26  **
27  *************************************************************************/
28 
29 #ifndef VDXFPAINTDEVICE_H
30 #define VDXFPAINTDEVICE_H
31 
32 #include <qcompilerdetection.h>
33 #include <QPaintDevice>
34 #include <QSize>
35 #include <QString>
36 #include <QtGlobal>
37 
38 #include "dxfdef.h"
39 #include "libdxfrw/drw_base.h"
40 
41 class VDxfEngine;
42 class VLayoutPiece;
43 
44 class VDxfPaintDevice : public QPaintDevice
45 {
46 public:
48  virtual ~VDxfPaintDevice() Q_DECL_OVERRIDE;
49  virtual QPaintEngine *paintEngine() const Q_DECL_OVERRIDE;
50 
51  QString getFileName() const;
52  void setFileName(const QString &value);
53 
54  QSize getSize();
55  void setSize(const QSize &size);
56 
57  double getResolution() const;
58  void setResolution(double dpi);
59 
60  DRW::Version GetVersion() const;
61  void SetVersion(DRW::Version version);
62 
63  void SetBinaryFormat(bool binary);
64  bool IsBinaryFormat() const;
65 
66  void setMeasurement(const VarMeasurement &var);
67  void setInsunits(const VarInsunits &var);
68 
69  bool ExportToAAMA(const QVector<VLayoutPiece> &details) const;
70 
71 protected:
72  virtual int metric(PaintDeviceMetric metric) const Q_DECL_OVERRIDE;
73 private:
74  Q_DISABLE_COPY(VDxfPaintDevice)
76  QString fileName;
77 };
78 
79 #endif // VDXFPAINTDEVICE_H
void setInsunits(const VarInsunits &var)
virtual ~VDxfPaintDevice() Q_DECL_OVERRIDE
virtual QPaintEngine * paintEngine() const Q_DECL_OVERRIDE
bool ExportToAAMA(const QVector< VLayoutPiece > &details) const
VDxfEngine * engine
void setFileName(const QString &value)
virtual int metric(PaintDeviceMetric metric) const Q_DECL_OVERRIDE
void SetBinaryFormat(bool binary)
QString getFileName() const
void setResolution(double dpi)
DRW::Version GetVersion() const
bool IsBinaryFormat() const
void SetVersion(DRW::Version version)
void setMeasurement(const VarMeasurement &var)
void setSize(const QSize &size)
double getResolution() const
VarMeasurement
Definition: dxfdef.h:61
VarInsunits
Definition: dxfdef.h:64