Seamly2D
Code documentation
ifcdef.h
Go to the documentation of this file.
1 /******************************************************************************
2 * @file ifcdef.h
3 ** @author Douglas S Caskey
4 ** @date 30 Apr, 2023
5 **
6 ** @brief
7 ** @copyright
8 ** This source code is part of the Seamly2D project, a pattern making
9 ** program to create and model patterns of clothing.
10 ** Copyright (C) 2017-2023 Seamly2D project
11 ** <https://github.com/fashionfreedom/seamly2d> All Rights Reserved.
12 **
13 ** Seamly2D is free software: you can redistribute it and/or modify
14 ** it under the terms of the GNU General Public License as published by
15 ** the Free Software Foundation, either version 3 of the License, or
16 ** (at your option) any later version.
17 **
18 ** Seamly2D is distributed in the hope that it will be useful,
19 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
20 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ** GNU General Public License for more details.
22 **
23 ** You should have received a copy of the GNU General Public License
24 ** along with Seamly2D. If not, see <http://www.gnu.org/licenses/>.
25 **
26 *************************************************************************/
27 
28 /************************************************************************
29  **
30  ** @file ifcdef.h
31  ** @author Roman Telezhynskyi <dismine(at)gmail.com>
32  ** @date 10 12, 2014
33  **
34  ** @brief
35  ** @copyright
36  ** This source code is part of the Valentine project, a pattern making
37  ** program, whose allow create and modeling patterns of clothing.
38  ** Copyright (C) 2013-2015 Seamly2D project
39  ** <https://github.com/fashionfreedom/seamly2d> All Rights Reserved.
40  **
41  ** Seamly2D is free software: you can redistribute it and/or modify
42  ** it under the terms of the GNU General Public License as published by
43  ** the Free Software Foundation, either version 3 of the License, or
44  ** (at your option) any later version.
45  **
46  ** Seamly2D is distributed in the hope that it will be useful,
47  ** but WITHOUT ANY WARRANTY; without even the implied warranty of
48  ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
49  ** GNU General Public License for more details.
50  **
51  ** You should have received a copy of the GNU General Public License
52  ** along with Seamly2D. If not, see <http://www.gnu.org/licenses/>.
53  **
54  *************************************************************************/
55 
56 #ifndef IFCDEF_H
57 #define IFCDEF_H
58 
59 #include <QString>
60 #include <QStringList>
61 #include <QtGlobal>
62 
63 #include "../vmisc/def.h"
64 #include "../vmisc/diagnostic.h"
65 
66 extern const QString CustomMSign;
67 extern const QString CustomIncrSign;
68 
69 #ifdef Q_OS_WIN32
70  extern Q_CORE_EXPORT int qt_ntfs_permission_lookup;
71  #include <windows.h>
72 #endif /*Q_OS_WIN32*/
73 
74 static const quint32 null_id = 0;
75 
76 #define NULL_ID null_id//use this value for initialization variables that keeps id values. 0 mean Unknown id value.
77 #define NULL_ID_STR "0"
78 
79 // Detect whether the compiler supports C++11 noexcept exception specifications.
80 # if defined(__clang__)
81 # if __has_feature(cxx_noexcept)
82 # define V_NOEXCEPT_EXPR(x) noexcept(x) // Clang 3.0 and above have noexcept
83 # endif
84 # elif defined(__GNUC__)
85 # if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) && defined(__GXX_EXPERIMENTAL_CXX0X__)
86 # define V_NOEXCEPT_EXPR(x) noexcept(x) // GCC 4.7 and following have noexcept
87 # endif
88 # elif defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 190023026
89 # define V_NOEXCEPT_EXPR(x) noexcept(x) // Visual Studio 2015 and following have noexcept
90 # else
91 # define V_NOEXCEPT_EXPR(x)
92 # endif
93 
94 extern const QString AttrType;
95 extern const QString AttrMx;
96 extern const QString AttrMy;
97 extern const QString AttrName;
98 extern const QString AttrMx1;
99 extern const QString AttrMy1;
100 extern const QString AttrName1;
101 extern const QString AttrMx2;
102 extern const QString AttrMy2;
103 extern const QString AttrName2;
104 extern const QString AttrBaseLineP1;
105 extern const QString AttrBaseLineP2;
106 extern const QString AttrDartP1;
107 extern const QString AttrDartP2;
108 extern const QString AttrDartP3;
109 extern const QString AttrX;
110 extern const QString AttrY;
111 extern const QString AttrLineType;
112 extern const QString AttrLineWeight;
113 extern const QString AttrObjName;
114 extern const QString AttrCut;
115 extern const QString AttrLength;
116 extern const QString AttrBasePoint;
117 extern const QString AttrFirstPoint;
118 extern const QString AttrSecondPoint;
119 extern const QString AttrThirdPoint;
120 extern const QString AttrCenter;
121 extern const QString AttrRadius;
122 extern const QString AttrRadius1;
123 extern const QString AttrRadius2;
124 extern const QString AttrAngle;
125 extern const QString AttrAngle1;
126 extern const QString AttrAngle2;
127 extern const QString AttrRotationAngle;
128 extern const QString AttrLength1;
129 extern const QString AttrLength2;
130 extern const QString AttrP1Line;
131 extern const QString AttrP2Line;
132 extern const QString AttrP1Line1;
133 extern const QString AttrP2Line1;
134 extern const QString AttrP1Line2;
135 extern const QString AttrP2Line2;
136 extern const QString AttrPShoulder;
137 extern const QString AttrPoint1;
138 extern const QString AttrPoint2;
139 extern const QString AttrPoint3;
140 extern const QString AttrPoint4;
141 extern const QString AttrKAsm1;// TODO. Delete if minimal supported version is 0.2.7
142 extern const QString AttrKAsm2;// TODO. Delete if minimal supported version is 0.2.7
143 extern const QString AttrKCurve;// TODO. Delete if minimal supported version is 0.2.7
144 extern const QString AttrDuplicate;
145 extern const QString AttrPathPoint;
146 extern const QString AttrPSpline;
147 extern const QString AttrAxisP1;
148 extern const QString AttrAxisP2;
149 extern const QString AttrCurve;
150 extern const QString AttrCurve1;
151 extern const QString AttrCurve2;
152 extern const QString AttrLineColor;
153 extern const QString AttrColor;
154 extern const QString AttrPenStyle;
155 extern const QString AttrFirstArc;
156 extern const QString AttrSecondArc;
157 extern const QString AttrCrossPoint;
158 extern const QString AttrVCrossPoint;
159 extern const QString AttrHCrossPoint;
160 extern const QString AttrAxisType;
161 extern const QString AttrC1Center;
162 extern const QString AttrC2Center;
163 extern const QString AttrC1Radius;
164 extern const QString AttrC2Radius;
165 extern const QString AttrCCenter;
166 extern const QString AttrTangent;
167 extern const QString AttrCRadius;
168 extern const QString AttrArc;
169 extern const QString AttrSuffix;
170 extern const QString AttrIdObject;
171 extern const QString AttrInLayout;
172 extern const QString AttrPieceLocked;
173 extern const QString AttrClosed;
174 extern const QString AttrShowPointName;
175 extern const QString AttrShowPointName1;
176 extern const QString AttrShowPointName2;
177 extern const QString AttrAlias;
178 
179 extern const QString LineTypeNone;
180 extern const QString LineTypeSolidLine;
181 extern const QString LineTypeDashLine;
182 extern const QString LineTypeDotLine;
183 extern const QString LineTypeDashDotLine;
184 extern const QString LineTypeDashDotDotLine;
185 
186 QStringList LineTypes();
187 Qt::PenStyle lineTypeToPenStyle(const QString &lineType);
188 QString PenStyleToLineType(Qt::PenStyle penStyle);
191 
193 
194 extern const QString LineWeightByGroup;
195 extern const QString LineTypeByGroup;
196 extern const QString ColorByGroup;
197 extern const QString ColorNone;
198 extern const QString ColorBlack;
199 extern const QString ColorGreen;
200 extern const QString ColorBlue;
201 extern const QString ColorDarkRed;
202 extern const QString ColorDarkGreen;
203 extern const QString ColorDarkBlue;
204 extern const QString ColorYellow;
205 extern const QString ColorLightSalmon;
206 extern const QString ColorGoldenRod;
207 extern const QString ColorOrange;
208 extern const QString ColorDeepPink;
209 extern const QString ColorViolet;
210 extern const QString ColorDarkViolet;
211 extern const QString ColorMediumSeaGreen;
212 extern const QString ColorLime;
213 extern const QString ColorDeepSkyBlue;
214 extern const QString ColorCornFlowerBlue;
215 extern const QString ColorGray;
216 extern const QString ColorDarkGray;
217 extern const QString ColorLightGray;
218 extern const QString ColorWhite;
219 
220 extern const QString FillNone;
221 extern const QString FillSolid;
222 extern const QString FillDense1;
223 extern const QString FillDense2;
224 extern const QString FillDense3;
225 extern const QString FillDense4;
226 extern const QString FillDense5;
227 extern const QString FillDense6;
228 extern const QString FillDense7;
229 extern const QString FillHorizLines;
230 extern const QString FillVertLines;
231 extern const QString FillCross;
232 extern const QString FillBackwardDiagonal;
233 extern const QString FillForwardDiagonal;
234 extern const QString FilldDiagonalCross;
235 
236 // variables name
237 // Hacks for avoiding the linker error "undefined reference to"
238 #define SPL_ "Spl_"
239 #define ARC_ "Arc_"
240 #define ELARC_ "ElArc_"
241 
242 extern const QString measurement_;
243 extern const QString variable_;
244 extern const QString line_;
245 extern const QString angleLine_;
246 extern const QString arc_;
247 extern const QString elarc_;
248 extern const QString spl_;
249 extern const QString splPath;
250 extern const QString radius_V;
251 extern const QString radiusArc_;
252 extern const QString radius1ElArc_;
253 extern const QString radius2ElArc_;
254 extern const QString angle1_V;
255 extern const QString angle2_V;
256 extern const QString c1Length_V;
257 extern const QString c2Length_V;
258 extern const QString c1LengthSpl_;
259 extern const QString c2LengthSpl_;
260 extern const QString c1LengthSplPath;
261 extern const QString c2LengthSplPath;
262 extern const QString angle1Arc_;
263 extern const QString angle2Arc_;
264 extern const QString angle1ElArc_;
265 extern const QString angle2ElArc_;
266 extern const QString angle1Spl_;
267 extern const QString angle2Spl_;
268 extern const QString angle1SplPath;
269 extern const QString angle2SplPath;
270 extern const QString seg_;
271 extern const QString currentLength;
272 extern const QString currentSeamAllowance;
273 
274 extern const QStringList builInVariables;
275 
276 QT_WARNING_PUSH
277 QT_WARNING_DISABLE_GCC("-Weffc++")
278 
280 {
281  QString line;
282  bool bold;
283  bool italic;
286 };
287 
289 
290 #endif // IFCDEF_H
const QString ColorDarkRed
Definition: ifcdef.cpp:376
const QString AttrPoint2
Definition: ifcdef.cpp:116
const QString ColorDarkGray
Definition: ifcdef.cpp:391
const QString AttrBasePoint
Definition: ifcdef.cpp:95
const QString ColorCornFlowerBlue
Definition: ifcdef.cpp:389
const QString CustomMSign
Definition: ifcdef.cpp:70
const QString AttrC1Radius
Definition: ifcdef.cpp:141
const QString LineTypeByGroup
Definition: ifcdef.cpp:370
const QString AttrName
Definition: ifcdef.cpp:76
const QString AttrKAsm2
Definition: ifcdef.cpp:120
const QString CustomIncrSign
Definition: ifcdef.cpp:71
const QString splPath
Definition: ifcdef.cpp:419
const QString AttrDuplicate
Definition: ifcdef.cpp:122
const QString angle1ElArc_
Definition: ifcdef.cpp:434
const QString ColorNone
Definition: ifcdef.cpp:372
const QString angle1SplPath
Definition: ifcdef.cpp:438
const QString elarc_
Definition: ifcdef.cpp:418
const QString c2Length_V
Definition: ifcdef.cpp:427
const QString AttrLength
Definition: ifcdef.cpp:94
const QString ColorLightGray
Definition: ifcdef.cpp:392
const QString AttrPShoulder
Definition: ifcdef.cpp:114
const QString AttrName1
Definition: ifcdef.cpp:79
const QString radius2ElArc_
Definition: ifcdef.cpp:423
const QString c1LengthSpl_
Definition: ifcdef.cpp:428
const QString FillDense6
Definition: ifcdef.cpp:402
const QString ColorBlue
Definition: ifcdef.cpp:375
const QString AttrLineType
Definition: ifcdef.cpp:90
const QString angle1Arc_
Definition: ifcdef.cpp:432
const QString AttrBaseLineP1
Definition: ifcdef.cpp:83
const QString arc_
Definition: ifcdef.cpp:417
const QString AttrSecondPoint
Definition: ifcdef.cpp:97
const QString AttrC2Radius
Definition: ifcdef.cpp:142
const QString FilldDiagonalCross
Definition: ifcdef.cpp:409
const QString AttrCurve2
Definition: ifcdef.cpp:129
const QString radius_V
Definition: ifcdef.cpp:420
const QString FillBackwardDiagonal
Definition: ifcdef.cpp:407
const QString FillDense4
Definition: ifcdef.cpp:400
const QString LineTypeSolidLine
Definition: ifcdef.cpp:159
const QString AttrFirstPoint
Definition: ifcdef.cpp:96
const QString AttrLineWeight
Definition: ifcdef.cpp:91
const QString AttrP1Line1
Definition: ifcdef.cpp:110
const QString AttrPSpline
Definition: ifcdef.cpp:124
const QString ColorMediumSeaGreen
Definition: ifcdef.cpp:386
const QString AttrShowPointName2
Definition: ifcdef.cpp:155
const QString AttrP1Line
Definition: ifcdef.cpp:108
const QString ColorYellow
Definition: ifcdef.cpp:379
const QString AttrPenStyle
Definition: ifcdef.cpp:132
const QString AttrSecondArc
Definition: ifcdef.cpp:134
const QString AttrAngle
Definition: ifcdef.cpp:103
const QString AttrCurve
Definition: ifcdef.cpp:127
const QString AttrShowPointName1
Definition: ifcdef.cpp:154
const QString LineTypeDashDotLine
Definition: ifcdef.cpp:162
const QString AttrFirstArc
Definition: ifcdef.cpp:133
const QString LineTypeDashDotDotLine
Definition: ifcdef.cpp:163
const QString AttrMx
Definition: ifcdef.cpp:74
const QString ColorGray
Definition: ifcdef.cpp:390
const QString AttrRadius2
Definition: ifcdef.cpp:102
const QString AttrShowPointName
Definition: ifcdef.cpp:153
const QString angle2Arc_
Definition: ifcdef.cpp:433
const QString AttrCurve1
Definition: ifcdef.cpp:128
const QString FillDense3
Definition: ifcdef.cpp:399
const QString LineTypeDashLine
Definition: ifcdef.cpp:160
const QString AttrP2Line
Definition: ifcdef.cpp:109
const QString seg_
Definition: ifcdef.cpp:440
const QString FillHorizLines
Definition: ifcdef.cpp:404
const QString AttrAxisType
Definition: ifcdef.cpp:138
static const quint32 null_id
Definition: ifcdef.h:74
const QString AttrY
Definition: ifcdef.cpp:89
const QString ColorGoldenRod
Definition: ifcdef.cpp:381
const QString AttrC1Center
Definition: ifcdef.cpp:139
const QString ColorDarkBlue
Definition: ifcdef.cpp:378
QStringList LineTypes()
LineTypeList return list of all line types.
Definition: ifcdef.cpp:170
const QString ColorViolet
Definition: ifcdef.cpp:384
const QString FillNone
Definition: ifcdef.cpp:395
const QString AttrCrossPoint
Definition: ifcdef.cpp:135
QMap< QString, QString > lineTypeList()
Definition: ifcdef.cpp:239
const QString AttrX
Definition: ifcdef.cpp:88
const QString AttrTangent
Definition: ifcdef.cpp:144
const QString AttrPoint3
Definition: ifcdef.cpp:117
const QString AttrMx2
Definition: ifcdef.cpp:80
const QString AttrDartP2
Definition: ifcdef.cpp:86
const QString FillCross
Definition: ifcdef.cpp:406
const QString FillDense2
Definition: ifcdef.cpp:398
const QString AttrLength2
Definition: ifcdef.cpp:107
const QString angle2_V
Definition: ifcdef.cpp:425
const QString angle2ElArc_
Definition: ifcdef.cpp:435
QMap< QString, QString > curveLineTypeList()
Definition: ifcdef.cpp:231
const QString AttrPoint1
Definition: ifcdef.cpp:115
const QString AttrAxisP2
Definition: ifcdef.cpp:126
const QString currentSeamAllowance
Definition: ifcdef.cpp:442
const QString line_
Definition: ifcdef.cpp:414
const QString angle2SplPath
Definition: ifcdef.cpp:439
const QString FillDense5
Definition: ifcdef.cpp:401
const QString c1Length_V
Definition: ifcdef.cpp:426
const QString AttrPieceLocked
Definition: ifcdef.cpp:150
const QString ColorLightSalmon
Definition: ifcdef.cpp:380
const QString AttrRotationAngle
Definition: ifcdef.cpp:151
const QString ColorBlack
Definition: ifcdef.cpp:373
const QString AttrBaseLineP2
Definition: ifcdef.cpp:84
const QString AttrClosed
Definition: ifcdef.cpp:152
const QString AttrDartP1
Definition: ifcdef.cpp:85
const QString LineTypeNone
Definition: ifcdef.cpp:158
const QString AttrRadius1
Definition: ifcdef.cpp:101
const QString AttrObjName
Definition: ifcdef.cpp:92
const QString AttrRadius
Definition: ifcdef.cpp:100
const QString variable_
Definition: ifcdef.cpp:413
const QString AttrName2
Definition: ifcdef.cpp:82
const QString AttrHCrossPoint
Definition: ifcdef.cpp:137
const QString AttrLength1
Definition: ifcdef.cpp:106
const QString AttrInLayout
Definition: ifcdef.cpp:149
const QString c1LengthSplPath
Definition: ifcdef.cpp:430
const QString spl_
Definition: ifcdef.cpp:416
QString PenStyleToLineType(Qt::PenStyle penStyle)
Definition: ifcdef.cpp:204
const QString c2LengthSpl_
Definition: ifcdef.cpp:429
const QString angle1Spl_
Definition: ifcdef.cpp:436
const QString AttrC2Center
Definition: ifcdef.cpp:140
const QString AttrKCurve
Definition: ifcdef.cpp:121
const QString radiusArc_
Definition: ifcdef.cpp:421
const QString angleLine_
Definition: ifcdef.cpp:415
const QString ColorDarkGreen
Definition: ifcdef.cpp:377
const QString AttrThirdPoint
Definition: ifcdef.cpp:98
const QString currentLength
Definition: ifcdef.cpp:441
const QString ColorWhite
Definition: ifcdef.cpp:393
const QString FillSolid
Definition: ifcdef.cpp:396
const QString AttrType
Definition: ifcdef.cpp:73
const QStringList builInVariables
Definition: ifcdef.cpp:444
const QString AttrVCrossPoint
Definition: ifcdef.cpp:136
const QString AttrDartP3
Definition: ifcdef.cpp:87
const QString ColorDeepPink
Definition: ifcdef.cpp:383
const QString AttrAxisP1
Definition: ifcdef.cpp:125
const QString AttrCRadius
Definition: ifcdef.cpp:145
const QString AttrMy
Definition: ifcdef.cpp:75
const QString AttrLineColor
Definition: ifcdef.cpp:130
const QString c2LengthSplPath
Definition: ifcdef.cpp:431
const QString AttrAngle2
Definition: ifcdef.cpp:105
const QString AttrPathPoint
Definition: ifcdef.cpp:123
const QString AttrMx1
Definition: ifcdef.cpp:77
const QString AttrP2Line2
Definition: ifcdef.cpp:113
const QString AttrP1Line2
Definition: ifcdef.cpp:112
const QString AttrPoint4
Definition: ifcdef.cpp:118
const QString AttrColor
Definition: ifcdef.cpp:131
const QString AttrIdObject
Definition: ifcdef.cpp:148
const QString AttrMy1
Definition: ifcdef.cpp:78
const QString AttrSuffix
Definition: ifcdef.cpp:147
const QString AttrMy2
Definition: ifcdef.cpp:81
const QString angle2Spl_
Definition: ifcdef.cpp:437
const QString AttrP2Line1
Definition: ifcdef.cpp:111
const QString AttrAlias
Definition: ifcdef.cpp:156
const QString AttrCCenter
Definition: ifcdef.cpp:143
const QString FillDense1
Definition: ifcdef.cpp:397
const QString FillVertLines
Definition: ifcdef.cpp:405
const QString angle1_V
Definition: ifcdef.cpp:424
const QString FillDense7
Definition: ifcdef.cpp:403
const QString measurement_
Definition: ifcdef.cpp:412
Qt::PenStyle lineTypeToPenStyle(const QString &lineType)
LineStyle return pen style for current line style.
Definition: ifcdef.cpp:183
const QString AttrArc
Definition: ifcdef.cpp:146
QMap< QString, QString > lineWeightList()
Definition: ifcdef.cpp:276
const QString ColorGreen
Definition: ifcdef.cpp:374
const QString ColorByGroup
Definition: ifcdef.cpp:371
const QString AttrAngle1
Definition: ifcdef.cpp:104
const QString ColorOrange
Definition: ifcdef.cpp:382
const QString LineWeightByGroup
Definition: ifcdef.cpp:369
const QString radius1ElArc_
Definition: ifcdef.cpp:422
const QString ColorLime
Definition: ifcdef.cpp:387
const QString AttrCenter
Definition: ifcdef.cpp:99
const QString ColorDeepSkyBlue
Definition: ifcdef.cpp:388
const QString AttrCut
Definition: ifcdef.cpp:93
const QString AttrKAsm1
Definition: ifcdef.cpp:119
const QString ColorDarkViolet
Definition: ifcdef.cpp:385
const QString LineTypeDotLine
Definition: ifcdef.cpp:161
const QString FillForwardDiagonal
Definition: ifcdef.cpp:408
QString line
Definition: ifcdef.h:281
int fontSizeIncrement
Definition: ifcdef.h:285