Seamly2D
Code documentation
vlayoutpiece_p.h
Go to the documentation of this file.
1 /***************************************************************************
2  ** @file vlayoutdetail_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 vlayoutdetail_p.h
28  ** @author Roman Telezhynskyi <dismine(at)gmail.com>
29  ** @date 3 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 VLAYOUTDETAIL_P_H
54 #define VLAYOUTDETAIL_P_H
55 
56 #include <QSharedData>
57 #include <QPointF>
58 #include <QVector>
59 #include <QTransform>
60 
61 #include "../vpatterndb/floatItemData/vpiecelabeldata.h"
62 #include "../vpatterndb/floatItemData/vpatternlabeldata.h"
63 #include "../vpatterndb/floatItemData/vgrainlinedata.h"
64 #include "../vmisc/diagnostic.h"
65 #include "vlayoutpiecepath.h"
66 
67 #include "vtextmanager.h"
68 
69 QT_WARNING_PUSH
70 QT_WARNING_DISABLE_GCC("-Weffc++")
71 QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor")
72 
73 class VLayoutPieceData : public QSharedData
74 {
75 public:
77  : contour(),
78  seamAllowance(),
79  layoutAllowance(),
80  notches(),
81  m_internalPaths(),
82  m_cutoutPaths(),
83  transform(),
84  layoutWidth(0),
85  mirror(false),
86  pieceLabel(),
87  patternInfo(),
88  grainlinePoints(),
89  m_tmPiece(),
90  m_tmPattern()
91  {}
92 
94  : QSharedData(piece),
95  contour(piece.contour),
96  seamAllowance(piece.seamAllowance),
97  layoutAllowance(piece.layoutAllowance),
98  notches(piece.notches),
99  m_internalPaths(piece.m_internalPaths),
100  m_cutoutPaths(piece.m_cutoutPaths),
101  transform(piece.transform),
102  layoutWidth(piece.layoutWidth),
103  mirror(piece.mirror),
104  pieceLabel(piece.pieceLabel),
105  patternInfo(piece.patternInfo),
106  grainlinePoints(piece.grainlinePoints),
107  m_tmPiece(piece.m_tmPiece),
108  m_tmPattern(piece.m_tmPattern)
109  {}
110 
112 
113  QVector<QPointF> contour; //! @brief contour list of contour points.
114  QVector<QPointF> seamAllowance; //! @brief seamAllowance list of seam allowance points.
115  QVector<QPointF> layoutAllowance; //! @brief layoutAllowance list of layout allowance points.
116  QVector<QLineF> notches; //! @brief notches list of notches.
117  QVector<VLayoutPiecePath> m_internalPaths; //! @brief m_internalPaths list of internal paths.
118  QVector<VLayoutPiecePath> m_cutoutPaths; //! @brief m_cutoutPaths list of internal cutout paths.
119  QTransform transform; //! @brief transform transformation transform
120  qreal layoutWidth; //! @brief layoutWidth value layout allowance width in pixels.
121  bool mirror;
122  QVector<QPointF> pieceLabel; //! @brief pieceLabel piece label rectangle
123  QVector<QPointF> patternInfo; //! @brief patternInfo pattern info rectangle
124  QVector<QPointF> grainlinePoints; //! @brief grainlineInfo line
125  VTextManager m_tmPiece; //! @brief m_tmPiece text manager for laying out piece info
126  VTextManager m_tmPattern; //! @brief m_tmPattern text manager for laying out pattern info */
127 
128 private:
129  VLayoutPieceData &operator=(const VLayoutPieceData &) Q_DECL_EQ_DELETE;
130 };
131 
133 
134 #endif // VLAYOUTDETAIL_P_H
QVector< VLayoutPiecePath > m_internalPaths
notches list of notches.
QVector< QPointF > patternInfo
pieceLabel piece label rectangle
QVector< QPointF > grainlinePoints
patternInfo pattern info rectangle
QVector< VLayoutPiecePath > m_cutoutPaths
m_internalPaths list of internal paths.
VTextManager m_tmPattern
m_tmPiece text manager for laying out piece info
VLayoutPieceData & operator=(const VLayoutPieceData &) Q_DECL_EQ_DELETE
m_tmPattern text manager for laying out pattern info *‍/
VLayoutPieceData(const VLayoutPieceData &piece)
VTextManager m_tmPiece
grainlineInfo line
QVector< QPointF > pieceLabel
qreal layoutWidth
transform transformation transform
QTransform transform
m_cutoutPaths list of internal cutout paths.
QVector< QPointF > seamAllowance
contour list of contour points.
bool mirror
layoutWidth value layout allowance width in pixels.
QVector< QPointF > contour
QVector< QPointF > layoutAllowance
seamAllowance list of seam allowance points.
QVector< QLineF > notches
layoutAllowance list of layout allowance points.
The VTextManager class this class is used to determine whether a collection of text lines can fit int...
Definition: vtextmanager.h:66