Seamly2D
Code documentation
vlayoutpaper_p.h
Go to the documentation of this file.
1 /***************************************************************************
2  ** @file vlayoutpaper_p.h
3  ** @author Douglas S Caskey
4  ** @date Dec 27, 2022
5  **
6  ** @copyright
7  ** Copyright (C) 2017 - 2022 Seamly, LLC
8  ** https://github.com/fashionfreedom/seamly2d
9  **
10  ** @brief
11  ** Seamly2D 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 3 of the License, or
14  ** (at your option) any later version.
15  **
16  ** Seamly2D is distributed in the hope that it will be useful,
17  ** but WITHOUT ANY WARRANTY; without even the implied warranty of
18  ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  ** GNU General Public License for more details.
20  **
21  ** You should have received a copy of the GNU General Public License
22  ** along with Seamly2D. If not, see <http://www.gnu.org/licenses/>.
23  **************************************************************************/
24 
25 /************************************************************************
26 **
27 ** @file vlayoutpaper_p.h
28 ** @author Roman Telezhynskyi <dismine(at)gmail.com>
29 ** @date 8 1, 2015
30 **
31 ** @brief
32 ** @copyright
33 ** This source code is part of the Valentina project, a pattern making
34 ** program, whose allow create and modeling patterns of clothing.
35 ** Copyright (C) 2013-2015 Valentina project
36 ** <https://bitbucket.org/dismine/valentina> All Rights Reserved.
37 **
38 ** Valentina is free software: you can redistribute it and/or modify
39 ** it under the terms of the GNU General Public License as published by
40 ** the Free Software Foundation, either version 3 of the License, or
41 ** (at your option) any later version.
42 **
43 ** Valentina is distributed in the hope that it will be useful,
44 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
45 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
46 ** GNU General Public License for more details.
47 **
48 ** You should have received a copy of the GNU General Public License
49 ** along with Valentina. If not, see <http://www.gnu.org/licenses/>.
50 **
51 *************************************************************************/
52 
53 #ifndef VLAYOUTPAPER_P_H
54 #define VLAYOUTPAPER_P_H
55 
56 #include <QSharedData>
57 #include <QVector>
58 #include <QPointF>
59 
60 #include "vlayoutpiece.h"
61 #include "vcontour.h"
62 
63 QT_WARNING_PUSH
64 QT_WARNING_DISABLE_GCC("-Weffc++")
65 QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor")
66 
67 class VLayoutPaperData : public QSharedData
68 {
69 public:
71  : pieces(QVector<VLayoutPiece>()),
72  globalContour(VContour()),
73  paperIndex(0),
74  frame(0),
75  layoutWidth(0),
76  globalRotate(true),
77  localRotate(true),
78  globalRotationIncrease(180),
79  localRotationIncrease(180),
80  saveLength(false)
81  {}
82 
83  VLayoutPaperData(int height, int width)
84  : pieces(QVector<VLayoutPiece>()),
85  globalContour(VContour(height, width)),
86  paperIndex(0),
87  frame(0),
88  layoutWidth(0),
89  globalRotate(true),
90  localRotate(true),
91  globalRotationIncrease(180),
92  localRotationIncrease(180),
93  saveLength(false)
94  {}
95 
97  : QSharedData(paper),
98  pieces(paper.pieces),
99  globalContour(paper.globalContour),
100  paperIndex(paper.paperIndex),
101  frame(paper.frame),
102  layoutWidth(paper.layoutWidth),
103  globalRotate(paper.globalRotate),
104  localRotate(paper.localRotate),
105  globalRotationIncrease(paper.globalRotationIncrease),
106  localRotationIncrease(paper.localRotationIncrease),
107  saveLength(paper.saveLength)
108  {}
109 
111 
112  /** @brief pieces list of arranged pieces. */
114 
115  /** @brief globalContour list of global points contour. */
117 
118  quint32 paperIndex;
119  quint32 frame;
120  qreal layoutWidth;
126 
127 private:
128  VLayoutPaperData& operator=(const VLayoutPaperData&) Q_DECL_EQ_DELETE;
129 };
130 
132 
133 #endif // VLAYOUTPAPER_P_H
VLayoutPaperData(int height, int width)
QVector< VLayoutPiece > pieces
pieces list of arranged pieces.
VLayoutPaperData(const VLayoutPaperData &paper)
VContour globalContour
globalContour list of global points contour.
VLayoutPaperData & operator=(const VLayoutPaperData &) Q_DECL_EQ_DELETE