Seamly2D
Code documentation
vpatternlabeldata_p.h
Go to the documentation of this file.
1 /************************************************************************
2  **
3  ** @file vpatternlabeldata_p.h
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 VPATTERNLABELDATA_P_H
30 #define VPATTERNLABELDATA_P_H
31 
32 #include <QPointF>
33 #include <QSharedData>
34 
35 #include "../vmisc/diagnostic.h"
36 #include "../ifc/ifcdef.h"
37 
38 QT_WARNING_PUSH
39 QT_WARNING_DISABLE_GCC("-Weffc++")
40 QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor")
41 
42 class VPatternLabelDataPrivate : public QSharedData
43 {
44 public:
46  : m_pieceLabelWidth()
47  , m_pieceLabelHeight()
48  , m_pieceLabelAngle()
49  , m_iFontSize(0)
50  , m_centerAnchorPoint(NULL_ID)
51  , m_topLeftAnchorPoint(NULL_ID)
52  , m_bottomRightAnchorPoint(NULL_ID)
53  {}
54 
56  : QSharedData(data)
57  , m_pieceLabelWidth(data.m_pieceLabelWidth)
58  , m_pieceLabelHeight(data.m_pieceLabelHeight)
59  , m_pieceLabelAngle(data.m_pieceLabelAngle)
60  , m_iFontSize(data.m_iFontSize)
61  , m_centerAnchorPoint(data.m_centerAnchorPoint)
62  , m_topLeftAnchorPoint(data.m_topLeftAnchorPoint)
63  , m_bottomRightAnchorPoint(data.m_bottomRightAnchorPoint)
64  {}
65 
66  ~VPatternLabelDataPrivate() Q_DECL_EQ_DEFAULT;
67 
68  QString m_pieceLabelWidth; /** @brief m_pieceLabelWidth formula to calculate the width of label */
69  QString m_pieceLabelHeight; /** @brief m_pieceLabelHeight formula to calculate the height of label */
70  QString m_pieceLabelAngle; /** @brief m_pieceLabelAngle formula to calculate the rotation angle of label */
71  int m_iFontSize; /** @brief m_iFontSize label text base font size */
72  quint32 m_centerAnchorPoint; /** @brief m_centerAnchorPoint center pin id */
73  quint32 m_topLeftAnchorPoint; /** @brief m_topLeftAnchorPoint top left corner pin id */
74  quint32 m_bottomRightAnchorPoint; /** @brief m_bottomRightAnchorPoint bottom right corner pin id */
75 
76 private:
77  VPatternLabelDataPrivate &operator=(const VPatternLabelDataPrivate &) Q_DECL_EQ_DELETE;
78 };
79 
81 
82 #endif // VPATTERNLABELDATA_P_H
VPatternLabelDataPrivate(const VPatternLabelDataPrivate &data)
~VPatternLabelDataPrivate() Q_DECL_EQ_DEFAULT
#define NULL_ID
Definition: ifcdef.h:76