Seamly2D
Code documentation
vpatternlabeldata.cpp
Go to the documentation of this file.
1 /************************************************************************
2  **
3  ** @file vpatternlabeldata.cpp
4  ** @author Bojan Kverh
5  ** @date June 16, 2016
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 #include "vpatternlabeldata.h"
30 #include "vpatternlabeldata_p.h"
31 #include "../ifc/ifcdef.h"
32 
33 #ifdef Q_COMPILER_RVALUE_REFS
35 { Swap(data); return *this; }
36 #endif
37 
38 void VPatternLabelData::Swap(VPatternLabelData &data) Q_DECL_NOTHROW
39 { VAbstractFloatItemData::Swap(data); std::swap(d, data.d); }
40 
41 //---------------------------------------------------------------------------------------------------------------------
44  , d(new VPatternLabelDataPrivate())
45 {}
46 
47 //---------------------------------------------------------------------------------------------------------------------
50  , d (data.d)
51 {}
52 
53 //---------------------------------------------------------------------------------------------------------------------
55 {
56  if ( &data == this )
57  {
58  return *this;
59  }
61  d = data.d;
62  return *this;
63 }
64 
65 //---------------------------------------------------------------------------------------------------------------------
67 {}
68 
69 //---------------------------------------------------------------------------------------------------------------------
71 {
72  return d->m_pieceLabelWidth;
73 }
74 
75 //---------------------------------------------------------------------------------------------------------------------
76 void VPatternLabelData::SetLabelWidth(const QString &dLabelW)
77 {
78  d->m_pieceLabelWidth = dLabelW;
79 }
80 
81 //---------------------------------------------------------------------------------------------------------------------
83 {
84  return d->m_pieceLabelHeight;
85 }
86 
87 //---------------------------------------------------------------------------------------------------------------------
88 void VPatternLabelData::SetLabelHeight(const QString &dLabelH)
89 {
90  d->m_pieceLabelHeight = dLabelH;
91 }
92 
93 //---------------------------------------------------------------------------------------------------------------------
95 {
96  return d->m_iFontSize;
97 }
98 
99 //---------------------------------------------------------------------------------------------------------------------
101 {
102  d->m_iFontSize = iSize;
103 }
104 
105 //---------------------------------------------------------------------------------------------------------------------
107 {
108  return d->m_pieceLabelAngle;
109 }
110 
111 //---------------------------------------------------------------------------------------------------------------------
112 void VPatternLabelData::SetRotation(const QString &dRot)
113 {
114  d->m_pieceLabelAngle = dRot;
115 }
116 
117 //---------------------------------------------------------------------------------------------------------------------
119 {
120  return d->m_centerAnchorPoint;
121 }
122 
123 //---------------------------------------------------------------------------------------------------------------------
124 void VPatternLabelData::setCenterAnchorPoint(const quint32 &centerAnchorPoint)
125 {
126  d->m_centerAnchorPoint = centerAnchorPoint;
127 }
128 
129 //---------------------------------------------------------------------------------------------------------------------
131 {
132  return d->m_topLeftAnchorPoint;
133 }
134 
135 //---------------------------------------------------------------------------------------------------------------------
136 void VPatternLabelData::setTopLeftAnchorPoint(const quint32 &topLeftAnchorPoint)
137 {
138  d->m_topLeftAnchorPoint = topLeftAnchorPoint;
139 }
140 
141 //---------------------------------------------------------------------------------------------------------------------
143 {
144  return d->m_bottomRightAnchorPoint;
145 }
146 
147 //---------------------------------------------------------------------------------------------------------------------
148 void VPatternLabelData::setBottomRightAnchorPoint(const quint32 &bottomRightAnchorPoint)
149 {
150  d->m_bottomRightAnchorPoint = bottomRightAnchorPoint;
151 }
void Swap(VAbstractFloatItemData &data) Q_DECL_NOTHROW
VAbstractFloatItemData & operator=(const VAbstractFloatItemData &data)
The VPatternLabelData class holds the information about pattern info label geometry.
void setBottomRightAnchorPoint(const quint32 &bottomRightAnchorPoint)
void Swap(VPatternLabelData &data) Q_DECL_NOTHROW
void setCenterAnchorPoint(const quint32 &centerAnchorPoint)
VPatternLabelData & operator=(const VPatternLabelData &data)
void SetLabelHeight(const QString &dLabelH)
void SetFontSize(int iSize)
quint32 centerAnchorPoint() const
QSharedDataPointer< VPatternLabelDataPrivate > d
void SetRotation(const QString &dRot)
quint32 topLeftAnchorPoint() const
QString GetLabelWidth() const
void SetLabelWidth(const QString &dLabelW)
QString GetRotation() const
void setTopLeftAnchorPoint(const quint32 &topLeftAnchorPoint)
quint32 bottomRightAnchorPoint() const
QString GetLabelHeight() const