Seamly2D
Code documentation
vpiece_p.h
Go to the documentation of this file.
1 /***************************************************************************
2  * *
3  * Copyright (C) 2017 Seamly, LLC *
4  * *
5  * https://github.com/fashionfreedom/seamly2d *
6  * *
7  ***************************************************************************
8  **
9  ** Seamly2D is free software: you can redistribute it and/or modify
10  ** it under the terms of the GNU General Public License as published by
11  ** the Free Software Foundation, either version 3 of the License, or
12  ** (at your option) any later version.
13  **
14  ** Seamly2D is distributed in the hope that it will be useful,
15  ** but WITHOUT ANY WARRANTY; without even the implied warranty of
16  ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  ** GNU General Public License for more details.
18  **
19  ** You should have received a copy of the GNU General Public License
20  ** along with Seamly2D. If not, see <http://www.gnu.org/licenses/>.
21  **
22  **************************************************************************
23 
24  ************************************************************************
25  **
26  ** @file
27  ** @author Roman Telezhynskyi <dismine(at)gmail.com>
28  ** @date 3 11, 2016
29  **
30  ** @brief
31  ** @copyright
32  ** This source code is part of the Valentine project, a pattern making
33  ** program, whose allow create and modeling patterns of clothing.
34  ** Copyright (C) 2016 Seamly2D project
35  ** <https://github.com/fashionfreedom/seamly2d> All Rights Reserved.
36  **
37  ** Seamly2D is free software: you can redistribute it and/or modify
38  ** it under the terms of the GNU General Public License as published by
39  ** the Free Software Foundation, either version 3 of the License, or
40  ** (at your option) any later version.
41  **
42  ** Seamly2D is distributed in the hope that it will be useful,
43  ** but WITHOUT ANY WARRANTY; without even the implied warranty of
44  ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
45  ** GNU General Public License for more details.
46  **
47  ** You should have received a copy of the GNU General Public License
48  ** along with Seamly2D. If not, see <http://www.gnu.org/licenses/>.
49  **
50  *************************************************************************/
51 
52 #ifndef VPIECE_P_H
53 #define VPIECE_P_H
54 
55 #include <QSharedData>
56 #include <QVector>
57 
58 #include "../vmisc/diagnostic.h"
59 #include "../vmisc/def.h"
60 #include "vpiecenode.h"
61 #include "vpiecepath.h"
65 
66 QT_WARNING_PUSH
67 QT_WARNING_DISABLE_GCC("-Weffc++")
68 QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor")
69 
70 class VPieceData : public QSharedData
71 {
72 public:
73  explicit VPieceData(PiecePathType type)
74  : m_path(type)
75  , m_inLayout(true)
76  , m_isLocked(false)
77  , m_united(false)
78  , m_customSARecords()
79  , m_internalPaths()
80  , m_anchors()
81  , m_ppData()
82  , m_piPatternInfo()
83  , m_glGrainline()
84  , m_formulaWidth('0')
85  {}
86 
87  VPieceData(const VPieceData &piece)
88  : QSharedData(piece)
89  , m_path(piece.m_path)
90  , m_inLayout(piece.m_inLayout)
91  , m_isLocked(piece.m_isLocked)
92  , m_united(piece.m_united)
93  , m_customSARecords(piece.m_customSARecords)
94  , m_internalPaths(piece.m_internalPaths)
95  , m_anchors(piece.m_anchors)
96  , m_ppData(piece.m_ppData)
97  , m_piPatternInfo(piece.m_piPatternInfo)
98  , m_glGrainline(piece.m_glGrainline)
99  , m_formulaWidth(piece.m_formulaWidth)
100  {}
101 
102  ~VPieceData();
103 
104  VPiecePath m_path; //! @brief nodes list piece nodes.
107  bool m_united;
111  VPieceLabelData m_ppData; //! @brief Pattern piece data
112  VPatternLabelData m_piPatternInfo; //! @brief Pattern info coordinates
113  VGrainlineData m_glGrainline; //! @brief m_glGrainline grainline geometry object
114  QString m_formulaWidth;
115 
116 private:
117  VPieceData &operator=(const VPieceData &) Q_DECL_EQ_DELETE;
118 };
119 
121 {}
122 
124 
125 #endif // VPIECE_P_H
The VGrainlineData class holds information about a grainline like position, size, rotation and visibi...
The VPatternLabelData class holds the information about pattern info label geometry.
VPatternLabelData m_piPatternInfo
Pattern piece data.
Definition: vpiece_p.h:112
VPieceLabelData m_ppData
Definition: vpiece_p.h:111
QVector< quint32 > m_anchors
Definition: vpiece_p.h:110
QVector< CustomSARecord > m_customSARecords
Definition: vpiece_p.h:108
VPiecePath m_path
Definition: vpiece_p.h:104
QVector< quint32 > m_internalPaths
Definition: vpiece_p.h:109
VPieceData(const VPieceData &piece)
Definition: vpiece_p.h:87
QString m_formulaWidth
m_glGrainline grainline geometry object
Definition: vpiece_p.h:114
VPieceData & operator=(const VPieceData &) Q_DECL_EQ_DELETE
bool m_isLocked
Definition: vpiece_p.h:106
VGrainlineData m_glGrainline
Pattern info coordinates.
Definition: vpiece_p.h:113
bool m_united
Definition: vpiece_p.h:107
bool m_inLayout
nodes list piece nodes.
Definition: vpiece_p.h:105
VPieceData(PiecePathType type)
Definition: vpiece_p.h:73
~VPieceData()
Definition: vpiece_p.h:120
The VPieceLabelData class holds some information about a single piece like letter,...
PiecePathType
Definition: def.h:157