2015-01-10 14:47:46 +01:00
|
|
|
/************************************************************************
|
2016-09-06 15:00:25 +02:00
|
|
|
**
|
|
|
|
** @file vlayoutpaper_p.h
|
|
|
|
** @author Roman Telezhynskyi <dismine(at)gmail.com>
|
|
|
|
** @date 8 1, 2015
|
|
|
|
**
|
|
|
|
** @brief
|
|
|
|
** @copyright
|
2017-10-05 11:20:01 +02:00
|
|
|
** This source code is part of the Valentina project, a pattern making
|
2016-09-06 15:00:25 +02:00
|
|
|
** program, whose allow create and modeling patterns of clothing.
|
|
|
|
** Copyright (C) 2013-2015 Valentina project
|
2020-01-31 07:00:05 +01:00
|
|
|
** <https://gitlab.com/smart-pattern/valentina> All Rights Reserved.
|
2016-09-06 15:00:25 +02:00
|
|
|
**
|
|
|
|
** 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/>.
|
|
|
|
**
|
|
|
|
*************************************************************************/
|
2015-01-10 14:47:46 +01:00
|
|
|
|
|
|
|
#ifndef VLAYOUTPAPER_P_H
|
|
|
|
#define VLAYOUTPAPER_P_H
|
|
|
|
|
|
|
|
#include <QSharedData>
|
|
|
|
#include <QVector>
|
|
|
|
#include <QPointF>
|
|
|
|
|
2017-01-22 10:02:02 +01:00
|
|
|
#include "vlayoutpiece.h"
|
2015-01-21 19:56:59 +01:00
|
|
|
#include "vcontour.h"
|
2015-01-10 14:47:46 +01:00
|
|
|
|
2016-08-06 20:42:40 +02:00
|
|
|
QT_WARNING_PUSH
|
|
|
|
QT_WARNING_DISABLE_GCC("-Weffc++")
|
2017-05-30 17:44:16 +02:00
|
|
|
QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor")
|
2015-01-10 14:47:46 +01:00
|
|
|
|
|
|
|
class VLayoutPaperData : public QSharedData
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
VLayoutPaperData()
|
|
|
|
{}
|
|
|
|
|
2019-03-27 08:03:19 +01:00
|
|
|
VLayoutPaperData(int height, int width, qreal layoutWidth)
|
|
|
|
: globalContour(VContour(height, width, layoutWidth)),
|
|
|
|
layoutWidth(layoutWidth)
|
2015-01-10 14:47:46 +01:00
|
|
|
{}
|
|
|
|
|
|
|
|
VLayoutPaperData(const VLayoutPaperData &paper)
|
2016-09-06 15:00:25 +02:00
|
|
|
: QSharedData(paper),
|
|
|
|
details(paper.details),
|
2019-04-10 14:54:18 +02:00
|
|
|
positionsCache(paper.positionsCache),
|
2016-09-06 15:00:25 +02:00
|
|
|
globalContour(paper.globalContour),
|
|
|
|
paperIndex(paper.paperIndex),
|
|
|
|
layoutWidth(paper.layoutWidth),
|
|
|
|
globalRotate(paper.globalRotate),
|
|
|
|
localRotate(paper.localRotate),
|
2019-03-29 18:52:37 +01:00
|
|
|
globalRotationNumber(paper.globalRotationNumber),
|
|
|
|
localRotationNumber(paper.localRotationNumber),
|
2018-12-27 14:54:29 +01:00
|
|
|
saveLength(paper.saveLength),
|
2019-06-18 13:28:16 +02:00
|
|
|
followGrainline(paper.followGrainline),
|
|
|
|
originPaperOrientation(paper.originPaperOrientation)
|
2015-01-10 14:47:46 +01:00
|
|
|
{}
|
|
|
|
|
|
|
|
~VLayoutPaperData() {}
|
|
|
|
|
|
|
|
/** @brief details list of arranged details. */
|
2019-03-26 18:14:05 +01:00
|
|
|
QVector<VLayoutPiece> details{};
|
2015-01-10 14:47:46 +01:00
|
|
|
|
2019-07-22 15:42:37 +02:00
|
|
|
QVector<VCachedPositions> positionsCache{};
|
2019-04-10 14:54:18 +02:00
|
|
|
|
2015-01-10 14:47:46 +01:00
|
|
|
/** @brief globalContour list of global points contour. */
|
2019-03-26 18:14:05 +01:00
|
|
|
VContour globalContour{};
|
2015-01-10 14:47:46 +01:00
|
|
|
|
2019-03-26 18:14:05 +01:00
|
|
|
quint32 paperIndex{0};
|
|
|
|
qreal layoutWidth{0};
|
|
|
|
bool globalRotate{true};
|
|
|
|
bool localRotate{true};
|
2019-03-29 18:52:37 +01:00
|
|
|
int globalRotationNumber{2};
|
|
|
|
int localRotationNumber{2};
|
2019-03-26 18:14:05 +01:00
|
|
|
bool saveLength{false};
|
|
|
|
bool followGrainline{false};
|
2019-06-18 13:28:16 +02:00
|
|
|
bool originPaperOrientation{true};
|
2015-10-31 13:56:28 +01:00
|
|
|
|
|
|
|
private:
|
2019-07-01 10:33:29 +02:00
|
|
|
Q_DISABLE_ASSIGN(VLayoutPaperData)
|
2015-01-10 14:47:46 +01:00
|
|
|
};
|
|
|
|
|
2016-08-06 20:42:40 +02:00
|
|
|
QT_WARNING_POP
|
2015-01-10 14:47:46 +01:00
|
|
|
|
|
|
|
#endif // VLAYOUTPAPER_P_H
|