1 /************************************************************************
2  **
3  **  @file
4  **  @author Roman Telezhynskyi <dismine(at)gmail.com>
5  **  @date   22 11, 2016
6  **
7  **  @brief
8  **  @copyright
9  **  This source code is part of the Valentina project, a pattern making
10  **  program, whose allow create and modeling patterns of clothing.
11  **  Copyright (C) 2016 Valentina project
12  **  <https://gitlab.com/smart-pattern/valentina> All Rights Reserved.
13  **
14  **  Valentina is free software: you can redistribute it and/or modify
15  **  it under the terms of the GNU General Public License as published by
16  **  the Free Software Foundation, either version 3 of the License, or
17  **  (at your option) any later version.
18  **
19  **  Valentina is distributed in the hope that it will be useful,
20  **  but WITHOUT ANY WARRANTY; without even the implied warranty of
21  **  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22  **  GNU General Public License for more details.
23  **
24  **  You should have received a copy of the GNU General Public License
25  **  along with Valentina.  If not, see <http://www.gnu.org/licenses/>.
26  **
27  *************************************************************************/
28 
29 #ifndef VPIECEPATH_P_H
30 #define VPIECEPATH_P_H
31 
32 #include <QSharedData>
33 #include <QVector>
34 
35 #include "../vmisc/diagnostic.h"
36 #include "vpiecenode.h"
37 
38 QT_WARNING_PUSH
39 QT_WARNING_DISABLE_GCC("-Weffc++")
40 QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor")
41 
42 class VPiecePathData : public QSharedData
43 {
44 public:
VPiecePathData()45     VPiecePathData()
46     {}
47 
VPiecePathData(PiecePathType type)48     explicit VPiecePathData(PiecePathType type)
49         : m_type(type)
50     {}
51 
VPiecePathData(const VPiecePathData & path)52     VPiecePathData(const VPiecePathData &path)
53         : QSharedData(path),
54           m_nodes(path.m_nodes),
55           m_type(path.m_type),
56           m_name(path.m_name),
57           m_penType(path.m_penType),
58           m_cut(path.m_cut),
59           m_visibilityTrigger(path.m_visibilityTrigger),
60           m_firstToCuttingCountour(path.m_firstToCuttingCountour),
61           m_lastToCuttingCountour(path.m_lastToCuttingCountour)
62     {}
63 
64     ~VPiecePathData();
65 
66     QVector<VPieceNode> m_nodes{};
67     PiecePathType m_type{PiecePathType::Unknown};
68     QString m_name{};
69     Qt::PenStyle m_penType{Qt::SolidLine};
70     bool m_cut{false};
71     QString m_visibilityTrigger{'1'};
72     bool m_firstToCuttingCountour{false};
73     bool m_lastToCuttingCountour{false};
74 
75 private:
76     Q_DISABLE_ASSIGN(VPiecePathData)
77 };
78 
~VPiecePathData()79 VPiecePathData::~VPiecePathData()
80 {}
81 
82 QT_WARNING_POP
83 
84 #endif // VPIECEPATH_P_H
85 
86