2015-09-07 21:47:02 +02:00
|
|
|
/************************************************************************
|
|
|
|
**
|
|
|
|
** @file vdxfpaintdevice.h
|
|
|
|
** @author Valentina Zhuravska <zhuravska19(at)gmail.com>
|
|
|
|
** @date 12 812, 2015
|
|
|
|
**
|
|
|
|
** @brief
|
|
|
|
** @copyright
|
2017-10-05 11:20:01 +02:00
|
|
|
** This source code is part of the Valentina project, a pattern making
|
2015-09-07 21:47:02 +02:00
|
|
|
** program, whose allow create and modeling patterns of clothing.
|
|
|
|
** Copyright (C) 2013-2015 Valentina project
|
|
|
|
** <https://bitbucket.org/dismine/valentina> All Rights Reserved.
|
|
|
|
**
|
|
|
|
** Valentina is free software: you can redistribute it and/or modify
|
|
|
|
** it under the terms of the GNU General Public License as published by
|
|
|
|
** the Free Software Foundation, either version 3 of the License, or
|
|
|
|
** (at your option) any later version.
|
|
|
|
**
|
|
|
|
** Valentina is distributed in the hope that it will be useful,
|
|
|
|
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
** GNU General Public License for more details.
|
|
|
|
**
|
|
|
|
** You should have received a copy of the GNU General Public License
|
|
|
|
** along with Valentina. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
**
|
|
|
|
*************************************************************************/
|
|
|
|
|
|
|
|
#ifndef VDXFPAINTDEVICE_H
|
|
|
|
#define VDXFPAINTDEVICE_H
|
|
|
|
|
2016-08-08 13:44:49 +02:00
|
|
|
#include <qcompilerdetection.h>
|
2015-09-07 21:47:02 +02:00
|
|
|
#include <QPaintDevice>
|
2016-08-08 13:44:49 +02:00
|
|
|
#include <QSize>
|
2015-09-07 21:47:02 +02:00
|
|
|
#include <QString>
|
2016-08-08 13:44:49 +02:00
|
|
|
#include <QtGlobal>
|
|
|
|
|
2015-09-07 21:47:02 +02:00
|
|
|
#include "dxfdef.h"
|
2017-06-26 16:28:41 +02:00
|
|
|
#include "libdxfrw/drw_base.h"
|
2015-09-07 21:47:02 +02:00
|
|
|
|
|
|
|
class VDxfEngine;
|
2017-07-16 20:10:48 +02:00
|
|
|
class VLayoutPiece;
|
2015-09-07 21:47:02 +02:00
|
|
|
|
|
|
|
class VDxfPaintDevice : public QPaintDevice
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
VDxfPaintDevice();
|
2018-06-26 14:53:48 +02:00
|
|
|
virtual ~VDxfPaintDevice() override;
|
|
|
|
virtual QPaintEngine *paintEngine() const override;
|
2015-09-07 21:47:02 +02:00
|
|
|
|
|
|
|
QString getFileName() const;
|
|
|
|
void setFileName(const QString &value);
|
|
|
|
|
|
|
|
QSize getSize();
|
|
|
|
void setSize(const QSize &size);
|
|
|
|
|
2016-03-27 18:00:08 +02:00
|
|
|
double getResolution() const;
|
|
|
|
void setResolution(double dpi);
|
2015-09-07 21:47:02 +02:00
|
|
|
|
2017-06-26 16:28:41 +02:00
|
|
|
DRW::Version GetVersion() const;
|
|
|
|
void SetVersion(DRW::Version version);
|
|
|
|
|
|
|
|
void SetBinaryFormat(bool binary);
|
|
|
|
bool IsBinaryFromat() const;
|
|
|
|
|
2015-09-07 21:47:02 +02:00
|
|
|
void setMeasurement(const VarMeasurement &var);
|
|
|
|
void setInsunits(const VarInsunits &var);
|
|
|
|
|
2017-07-16 20:10:48 +02:00
|
|
|
bool ExportToAAMA(const QVector<VLayoutPiece> &details) const;
|
|
|
|
|
2015-09-07 21:47:02 +02:00
|
|
|
protected:
|
2018-06-26 14:53:48 +02:00
|
|
|
virtual int metric(PaintDeviceMetric metric) const override;
|
2015-09-07 21:47:02 +02:00
|
|
|
private:
|
|
|
|
Q_DISABLE_COPY(VDxfPaintDevice)
|
|
|
|
VDxfEngine *engine;
|
|
|
|
QString fileName;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // VDXFPAINTDEVICE_H
|