Seamly2D
Code documentation
vgrainlinedata_p.h
Go to the documentation of this file.
1 /************************************************************************
2  **
3  ** @file
4  ** @author Roman Telezhynskyi <dismine(at)gmail.com>
5  ** @date 23 2, 2017
6  **
7  ** @brief
8  ** @copyright
9  ** This source code is part of the Valentine project, a pattern making
10  ** program, whose allow create and modeling patterns of clothing.
11  ** Copyright (C) 2013 - 2022 Seamly2D project
12  ** <https://github.com/fashionfreedom/seamly2d> All Rights Reserved.
13  **
14  ** Seamly2D 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  ** Seamly2D 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 Seamly2D. If not, see <http://www.gnu.org/licenses/>.
26  **
27  *************************************************************************/
28 
29 #ifndef VGRAINLINEDATA_P_H
30 #define VGRAINLINEDATA_P_H
31 
32 #include <QPointF>
33 #include <QSharedData>
34 
35 #include "../vmisc/diagnostic.h"
36 #include "floatitemdef.h"
37 #include "../ifc/ifcdef.h"
38 
39 QT_WARNING_PUSH
40 QT_WARNING_DISABLE_GCC("-Weffc++")
41 QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor")
42 
43 class VGrainlineDataPrivate : public QSharedData
44 {
45 public:
47  : m_qsLength()
48  , m_dRotation()
49  , m_eArrowType(ArrowType::atBoth)
50  , m_centerAnchorPoint(NULL_ID)
51  , m_topAnchorPoint(NULL_ID)
52  , m_bottomAnchorPoint(NULL_ID)
53  {}
54 
56  : QSharedData(data)
57  , m_qsLength(data.m_qsLength)
58  , m_dRotation(data.m_dRotation)
59  , m_eArrowType(data.m_eArrowType)
60  , m_centerAnchorPoint(data.m_centerAnchorPoint)
61  , m_topAnchorPoint(data.m_topAnchorPoint)
62  , m_bottomAnchorPoint(data.m_bottomAnchorPoint)
63  {}
64 
65  ~VGrainlineDataPrivate() Q_DECL_EQ_DEFAULT;
66 
67  QString m_qsLength; /** @brief m_dLength formula to calculate the length of grainline */
68  QString m_dRotation; /** @brief m_dRotation formula to calculate the rotation of grainline in [degrees] */
69  ArrowType m_eArrowType; /** @brief m_eArrowType type of arrow on the grainline */
70  quint32 m_centerAnchorPoint; /** @brief m_centerAnchorPoint center anchor point id */
71  quint32 m_topAnchorPoint; /** @brief m_topAnchorPoint top anchor point id */
72  quint32 m_bottomAnchorPoint; /** @brief m_bottomAnchorPoint bottom anchor point id */
73 
74 private:
75  VGrainlineDataPrivate &operator=(const VGrainlineDataPrivate &) Q_DECL_EQ_DELETE;
76 };
77 
79 
80 #endif // VGRAINLINEDATA_P_H
VGrainlineDataPrivate(const VGrainlineDataPrivate &data)
~VGrainlineDataPrivate() Q_DECL_EQ_DEFAULT
ArrowType
Definition: floatitemdef.h:60
#define NULL_ID
Definition: ifcdef.h:76