Seamly2D
Code documentation
def.h
Go to the documentation of this file.
1 /************************************************************************
2  **
3  ** @file def.h
4  ** @author Roman Telezhynskyi <dismine(at)gmail.com>
5  ** @date 11 4, 2015
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 DEF_H
30 #define DEF_H
31 
32 #include <qcompilerdetection.h>
33 #include <QLineF>
34 #include <QString>
35 #include <QStringList>
36 #include <Qt>
37 #include <QtGlobal>
38 #include <QPrinter>
39 #include <csignal>
40 #ifdef Q_OS_WIN
41  #include <windows.h>
42 #endif /* Q_OS_WIN */
43 
44 #include "debugbreak.h"
45 
46 template <class T> class QSharedPointer;
47 
48 #ifdef Q_CC_MSVC
49  #include <ciso646>
50 #endif /* Q_CC_MSVC */
51 
52 class QComboBox;
53 class QMarginsF;
55 class QGraphicsItem;
56 
57 #define SceneSize 50000
58 
59 enum class LayoutExportFormat : char
60 {
61  SVG = 0,
62  PDF = 1,
63  PDFTiled = 2,
64  PNG = 3,
65  JPG = 4,
66  BMP = 5,
67  PPM = 6,
68  OBJ = 7, /* Wavefront OBJ*/
69  PS = 8,
70  EPS = 9,
71  DXF_AC1006_Flat = 10, /* R10. */
72  DXF_AC1009_Flat = 11, /* R11 & R12. */
73  DXF_AC1012_Flat = 12, /* R13. */
74  DXF_AC1014_Flat = 13, /* R14. */
75  DXF_AC1015_Flat = 14, /* ACAD 2000. */
76  DXF_AC1018_Flat = 15, /* ACAD 2004. */
77  DXF_AC1021_Flat = 16, /* ACAD 2007. */
78  DXF_AC1024_Flat = 17, /* ACAD 2010. */
79  DXF_AC1027_Flat = 18, /* ACAD 2013. */
80  DXF_AC1006_AAMA = 19, /* R10. */
81  DXF_AC1009_AAMA = 20, /* R11 & R12. */
82  DXF_AC1012_AAMA = 21, /* R13. */
83  DXF_AC1014_AAMA = 22, /* R14. */
84  DXF_AC1015_AAMA = 23, /* ACAD 2000. */
85  DXF_AC1018_AAMA = 24, /* ACAD 2004. */
86  DXF_AC1021_AAMA = 25, /* ACAD 2007. */
87  DXF_AC1024_AAMA = 26, /* ACAD 2010. */
88  DXF_AC1027_AAMA = 27, /* ACAD 2013. */
89  DXF_AC1006_ASTM = 28, /* R10. */
90  DXF_AC1009_ASTM = 29, /* R11 & R12. */
91  DXF_AC1012_ASTM = 30, /* R13. */
92  DXF_AC1014_ASTM = 31, /* R14. */
93  DXF_AC1015_ASTM = 32, /* ACAD 2000. */
94  DXF_AC1018_ASTM = 33, /* ACAD 2004. */
95  DXF_AC1021_ASTM = 34, /* ACAD 2007. */
96  DXF_AC1024_ASTM = 35, /* ACAD 2010. */
97  DXF_AC1027_ASTM = 36, /* ACAD 2013. */
98  TIF = 37, /* TIFF */
99  COUNT /*Use only for validation*/
100 };
101 
102 enum class NodeDetail : char { Contour, Modeling };
103 enum class SceneObject : char { Point, Line, Spline, Arc, ElArc, SplinePath, Piece, Unknown };
105 enum class Unit : char { Mm = 0, Cm, Inch, Px, LAST_UNIT_DO_NOT_USE};
106 enum class Source : char { FromGui, FromFile, FromTool };
107 enum class NodeUsage : bool {NotInUse = false, InUse = true};
109 
110 enum class PageOrientation : bool {Portrait = true, Landscape = false};
111 
112 enum class PieceNodeAngle : unsigned char
113 {
114  ByLength = 0,
120 };
121 
122 enum class NotchType : unsigned char
123 {
124  Slit = 0, // Default
125  TNotch,
126  VInternal,
127  VExternal,
128  UNotch,
129  Castle,
130  Diamond
131 };
132 
133 QString notchTypeToString(NotchType type);
134 NotchType stringToNotchType(const QString &value);
135 
136 enum class NotchSubType : unsigned char
137 {
138  Straightforward = 0, // Default
139  Bisector,
141 };
142 
143 QString notchSubTypeToString(NotchSubType type);
144 NotchSubType stringToNotchSubType(const QString &value);
145 
146 
147 Unit StrToUnits(const QString &unit);
148 QString UnitsToStr(const Unit &unit, const bool translate = false);
149 
150 
151 enum class PiecePathIncludeType : unsigned char
152 {
153  AsMainPath = 0,
154  AsCustomSA = 1
155 };
156 
157 enum class PiecePathType : unsigned char {PiecePath = 0, CustomSeamAllowance = 1, InternalPath = 2, Unknown = 3};
158 
159 typedef int ToolVisHolderType;
161 {
162  Arrow,
163  SinglePoint,
164  DoublePoint,
165  LinePoint,
167  Cut,
168  BasePoint,
169  EndLine,
170  Line,
171  AlongLine,
173  Normal,
174  Bisector,
176  Spline,
177  CubicBezier,
178  CutSpline,
179  CutArc,
180  Arc,
182  SplinePath,
186  Piece,
187  InternalPath,
188  NodePoint,
189  NodeArc,
190  NodeElArc,
191  NodeSpline,
193  Height,
194  Triangle,
204  TrueDarts,
205  Union,
206  Group,
207  Rotation,
208  MirrorByLine,
209  MirrorByAxis,
210  Move,
211  Midpoint,
213  AnchorPoint,
214  InsertNodes,
215  LAST_ONE_DO_NOT_USE //add new stuffs above this, this constant must be last and never used
216 };
217 
218 enum class Vis : ToolVisHolderType
219 {
222  SimplePoint,
223  SimpleCurve,
224  ScaledLine,
226  Line,
227  Path,
228  Operation,
230  ToolArc,
232  ToolBisector,
233  ToolCutArc,
234  ToolEndLine,
235  ToolHeight,
236  ToolLine,
238  ToolNormal,
247  ToolSpline,
250  ToolTriangle,
257  ToolRotation,
260  ToolMove,
262  ToolPiece,
265  PieceAnchors,
266  NoBrush,
269  PieceItem,
271  ScenePoint,
273  LAST_ONE_DO_NOT_USE //add new types above this, this constant must be last and never used
274 };
275 
277  ArcRadius, Unknown };
278 
279 static const int heightStep = 6;
280 enum class GHeights : unsigned char { ALL,
281  H50=50, H56=56, H62=62, H68=68, H74=74, H80=80, H86=86, H92=92,
282  H98=98, H104=104, H110=110, H116=116, H122=122, H128=128, H134=134, H140=140,
283  H146=146, H152=152, H158=158, H164=164, H170=170, H176=176, H182=182, H188=188,
284  H194=194, H200=200};
285 
286 static const int sizeStep = 2;
287 enum class GSizes : unsigned char { ALL,
288  S22=22, S24=24, S26=26, S28=28, S30=30, S32=32, S34=34, S36=36, S38=38, S40=40,
289  S42=42, S44=44, S46=46, S48=48, S50=50, S52=52, S54=54, S56=56, S58=58, S60=60,
290  S62=62, S64=64, S66=66, S68=68, S70=70, S72=72 };
291 
292 /* QImage supports a maximum of 32768x32768 px images (signed short).
293  * This follows from the condition: width * height * colordepth < INT_MAX (4 billion) -> 32768 * 32768 * 4 = 4 billion.
294  * The second condition is of course that malloc is able to allocate the requested memory.
295  *
296  * If you really need bigger images you will have to use another wrapper or split into multiple QImage's.
297  */
298 #define QIMAGE_MAX 32768
299 
300 /*
301  * This macros SCASSERT (for Stop and Continue Assert) will break into the debugger on the line of the assert and allow
302  * you to continue afterwards should you choose to.
303  * idea: Q_ASSERT no longer pauses debugger - http://qt-project.org/forums/viewthread/13148
304  * Usefull links:
305  * 1. What's the difference between __PRETTY_FUNCTION__, __FUNCTION__, __func__? -
306  * https://stackoverflow.com/questions/4384765/whats-the-difference-between-pretty-function-function-func
307  *
308  * 2. Windows Predefined Macros - http://msdn.microsoft.com/library/b0084kay.aspx
309  *
310  * 3. Windows DebugBreak function - http://msdn.microsoft.com/en-us/library/ms679297%28VS.85%29.aspx
311  *
312  * 4. Continue to debug after failed assertion on Linux? [C/C++] -
313  * https://stackoverflow.com/questions/1721543/continue-to-debug-after-failed-assertion-on-linux-c-c
314  */
315 #ifndef V_NO_ASSERT
316 
317 #define SCASSERT(cond) \
318 { \
319  if (!(cond)) \
320  { \
321  qCritical("ASSERT: %s in %s (%s:%u)", \
322  #cond, Q_FUNC_INFO , __FILE__, __LINE__); \
323  debug_break(); \
324  abort(); \
325  } \
326 } \
327 
328 #else // define but disable this function if debugging is not set
329 #define SCASSERT(cond) qt_noop();
330 #endif /* V_NO_ASSERT */
331 
332 #ifndef __has_cpp_attribute
333 # define __has_cpp_attribute(x) 0
334 #endif
335 
336 #if __cplusplus > 201402L && __has_cpp_attribute(fallthrough)
337 # define V_FALLTHROUGH [[fallthrough]];
338 #elif defined(Q_CC_CLANG) && __cplusplus >= 201103L
339  /* clang's fallthrough annotations are only available starting in C++11. */
340 # define V_FALLTHROUGH [[clang::fallthrough]];
341 #elif defined(Q_CC_MSVC)
342  /*
343  * MSVC's __fallthrough annotations are checked by /analyze (Code Analysis):
344  * https://msdn.microsoft.com/en-us/library/ms235402%28VS.80%29.aspx
345  */
346 # include <sal.h>
347 # define V_FALLTHROUGH __fallthrough;
348 #elif defined(Q_CC_GNU) && (__GNUC__ >= 7)
349 # define V_FALLTHROUGH [[gnu::fallthrough]];
350 #else
351 # define V_FALLTHROUGH
352 #endif
353 
354 extern const QString LONG_OPTION_NO_HDPI_SCALING;
355 bool IsOptionSet(int argc, char *argv[], const char *option);
356 void InitHighDpiScaling(int argc, char *argv[]);
357 
358 // functions
359 extern const QString degTorad_F;
360 extern const QString radTodeg_F;
361 extern const QString sin_F;
362 extern const QString cos_F;
363 extern const QString tan_F;
364 extern const QString asin_F;
365 extern const QString acos_F;
366 extern const QString atan_F;
367 extern const QString sinh_F;
368 extern const QString cosh_F;
369 extern const QString tanh_F;
370 extern const QString asinh_F;
371 extern const QString acosh_F;
372 extern const QString atanh_F;
373 extern const QString sinD_F;
374 extern const QString cosD_F;
375 extern const QString tanD_F;
376 extern const QString asinD_F;
377 extern const QString acosD_F;
378 extern const QString atanD_F;
379 extern const QString log2_F;
380 extern const QString log10_F;
381 extern const QString log_F;
382 extern const QString ln_F;
383 extern const QString exp_F;
384 extern const QString sqrt_F;
385 extern const QString sign_F;
386 extern const QString rint_F;
387 extern const QString abs_F;
388 extern const QString min_F;
389 extern const QString max_F;
390 extern const QString sum_F;
391 extern const QString avg_F;
392 extern const QString fmod_F;
393 
394 extern const QStringList builInFunctions;
395 
396 // Postfix operators
397 extern const QString cm_Oprt;
398 extern const QString mm_Oprt;
399 extern const QString in_Oprt;
400 
401 extern const QStringList builInPostfixOperators;
402 
403 // Placeholders
404 extern const QString pl_size;
405 extern const QString pl_height;
406 extern const QString pl_date;
407 extern const QString pl_time;
408 extern const QString pl_patternName;
409 extern const QString pl_patternNumber;
410 extern const QString pl_author;
411 extern const QString pl_customer;
412 extern const QString pl_pExt;
413 extern const QString pl_pFileName;
414 extern const QString pl_mFileName;
415 extern const QString pl_mExt;
416 extern const QString pl_pLetter;
417 extern const QString pl_pAnnotation;
418 extern const QString pl_pOrientation;
419 extern const QString pl_pRotation;
420 extern const QString pl_pTilt;
421 extern const QString pl_pFoldPosition;
422 extern const QString pl_pName;
423 extern const QString pl_pQuantity;
424 extern const QString pl_mFabric;
425 extern const QString pl_mLining;
426 extern const QString pl_mInterfacing;
427 extern const QString pl_mInterlining;
428 extern const QString pl_wCut;
429 extern const QString pl_wOnFold;
430 
431 extern const QStringList labelTemplatePlaceholders;
432 
433 extern const QString cursorArrowOpenHand;
434 extern const QString cursorArrowCloseHand;
435 
436 extern const QString degreeSymbol;
437 extern const QString trueStr;
438 extern const QString falseStr;
439 
440 extern const QString strSlit;
441 
442 extern const QString strStraightforward;
443 extern const QString strBisector;
444 extern const QString strIntersection;
445 
446 extern const QString unitMM;
447 extern const QString unitCM;
448 extern const QString unitINCH;
449 extern const QString unitPX;
450 
451 void SetItemOverrideCursor(QGraphicsItem *item, const QString & pixmapPath, int hotX = -1, int hotY = -1);
452 
453 extern const qreal PrintDPI;
454 
455 Q_REQUIRED_RESULT double ToPixel(double val, const Unit &unit);
456 Q_REQUIRED_RESULT double FromPixel(double pix, const Unit &unit);
457 
458 Q_REQUIRED_RESULT qreal UnitConvertor(qreal value, const Unit &from, const Unit &to);
459 Q_REQUIRED_RESULT QMarginsF UnitConvertor(const QMarginsF &margins, const Unit &from, const Unit &to);
460 
461 void InitLanguages(QComboBox *combobox);
462 Q_REQUIRED_RESULT QStringList SupportedLocales();
463 
464 QString makeHeaderName(const QString &name);
465 Q_REQUIRED_RESULT QString strippedName(const QString &fullFileName);
466 Q_REQUIRED_RESULT QString RelativeMPath(const QString &patternPath, const QString &absoluteMPath);
467 Q_REQUIRED_RESULT QString AbsoluteMPath(const QString &patternPath, const QString &relativeMPath);
468 
469 Q_REQUIRED_RESULT QSharedPointer<QPrinter> PreparePrinter(const QPrinterInfo &info,
470  QPrinter::PrinterMode mode = QPrinter::ScreenResolution);
471 
472 QMarginsF GetMinPrinterFields(const QSharedPointer<QPrinter> &printer);
473 QMarginsF GetPrinterFields(const QSharedPointer<QPrinter> &printer);
474 
475 Q_REQUIRED_RESULT QPixmap darkenPixmap(const QPixmap &pixmap);
476 
477 void ShowInGraphicalShell(const QString &filePath);
478 
479 constexpr qreal accuracyPointOnLine = (0.1555/*mm*/ / 25.4) * 96.0;
480 
481 Q_REQUIRED_RESULT static inline bool VFuzzyComparePoints(const QPointF &p1, const QPointF &p2,
482  qreal accuracy = accuracyPointOnLine);
483 
484 static inline bool VFuzzyComparePoints(const QPointF &p1, const QPointF &p2, qreal accuracy)
485 {
486  return QLineF(p1, p2).length() <= accuracy;
487 }
488 
489 Q_REQUIRED_RESULT static inline bool VFuzzyComparePossibleNulls(double p1, double p2);
490 static inline bool VFuzzyComparePossibleNulls(double p1, double p2)
491 {
492  if(qFuzzyIsNull(p1))
493  {
494  return qFuzzyIsNull(p2);
495  }
496  else if(qFuzzyIsNull(p2))
497  {
498  return false;
499  }
500  else
501  {
502  return qFuzzyCompare(p1, p2);
503  }
504 }
505 
506 /**
507  * @brief The CustomSA struct contains record about custom seam allowanse (SA).
508  */
510 {
512  : startPoint(0),
513  path(0),
514  endPoint(0),
515  reverse(false),
517  {}
518 
519  quint32 startPoint;
520  quint32 path;
521  quint32 endPoint;
522  bool reverse;
524 };
525 
526 Q_DECLARE_METATYPE(CustomSARecord)
528 
529 /****************************************************************************
530 ** This file is derived from code bearing the following notice:
531 ** The sole author of this file, Adam Higerd, has explicitly disclaimed all
532 ** copyright interest and protection for the content within. This file has
533 ** been placed in the public domain according to United States copyright
534 ** statute and case law. In jurisdictions where this public domain dedication
535 ** is not legally recognized, anyone who receives a copy of this file is
536 ** permitted to use, modify, duplicate, and redistribute this file, in whole
537 ** or in part, with no restrictions or conditions. In these jurisdictions,
538 ** this file shall be copyright (C) 2006-2008 by Adam Higerd.
539 ****************************************************************************/
540 
541 #define QXT_DECLARE_PRIVATE(PUB) friend class PUB##Private; QxtPrivateInterface<PUB, PUB##Private> qxt_d;
542 #define QXT_DECLARE_PUBLIC(PUB) friend class PUB;
543 #define QXT_INIT_PRIVATE(PUB) qxt_d.setPublic(this);
544 #define QXT_D(PUB) PUB##Private& d = qxt_d()
545 #define QXT_P(PUB) PUB& p = qxt_p()
546 
547 template <typename PUB>
549 {
550 public:
551  QxtPrivate(): qxt_p_ptr(nullptr)
552  {}
553  virtual ~QxtPrivate()
554  {}
555  inline void QXT_setPublic(PUB* pub)
556  {
557  qxt_p_ptr = pub;
558  }
559 
560 protected:
561  inline PUB& qxt_p()
562  {
563  return *qxt_p_ptr;
564  }
565  inline const PUB& qxt_p() const
566  {
567  return *qxt_p_ptr;
568  }
569  inline PUB* qxt_ptr()
570  {
571  return qxt_p_ptr;
572  }
573  inline const PUB* qxt_ptr() const
574  {
575  return qxt_p_ptr;
576  }
577 
578 private:
579  Q_DISABLE_COPY(QxtPrivate)
580  PUB* qxt_p_ptr;
581 };
582 
583 template <typename PUB, typename PVT>
585 {
586  friend class QxtPrivate<PUB>;
587 public:
588  QxtPrivateInterface() : pvt(new PVT)
589  {}
591  {
592  delete pvt;
593  }
594 
595  inline void setPublic(PUB* pub)
596  {
597  pvt->QXT_setPublic(pub);
598  }
599  inline PVT& operator()()
600  {
601  return *static_cast<PVT*>(pvt);
602  }
603  inline const PVT& operator()() const
604  {
605  return *static_cast<PVT*>(pvt);
606  }
607  inline PVT * operator->()
608  {
609  return static_cast<PVT*>(pvt);
610  }
611  inline const PVT * operator->() const
612  {
613  return static_cast<PVT*>(pvt);
614  }
615 private:
616  Q_DISABLE_COPY(QxtPrivateInterface)
617  QxtPrivate<PUB>* pvt;
618 };
619 
620 /*
621  Convert to a QSet
622 */
623 //---------------------------------------------------------------------------------------------------------------------
624 template <typename T, template <typename> class C>
625 inline QSet<T> convertToSet(const C<T> &list)
626 {
627  return QSet<T>(list.begin(), list.end());
628 }
629 
630 /*
631  Convert to a QSet
632 */
633 //---------------------------------------------------------------------------------------------------------------------
634 template <typename T, typename C>
635 inline QSet<T> convertToSet(const C &list)
636 {
637  return QSet<T>(list.begin(), list.end());
638 }
639 
640 /*
641  Convert to a QList
642 */
643 //---------------------------------------------------------------------------------------------------------------------
644 template <typename T, template <typename> class C>
645 inline QList<T> convertToList(const C<T> &set)
646 {
647  return QList<T>(set.begin(), set.end());
648 }
649 
650 
651 #endif // DEF_H
~QxtPrivateInterface()
Definition: def.h:590
void setPublic(PUB *pub)
Definition: def.h:595
PVT & operator()()
Definition: def.h:599
PVT * operator->()
Definition: def.h:607
const PVT & operator()() const
Definition: def.h:603
const PVT * operator->() const
Definition: def.h:611
QxtPrivateInterface()
Definition: def.h:588
void QXT_setPublic(PUB *pub)
Definition: def.h:555
virtual ~QxtPrivate()
Definition: def.h:553
PUB * qxt_p_ptr
Definition: def.h:580
PUB & qxt_p()
Definition: def.h:561
PUB * qxt_ptr()
Definition: def.h:569
QxtPrivate()
Definition: def.h:551
const PUB * qxt_ptr() const
Definition: def.h:573
const PUB & qxt_p() const
Definition: def.h:565
const QString pl_size
Definition: def.cpp:137
const QString asinD_F
Definition: def.cpp:102
const QString pl_customer
Definition: def.cpp:144
Unit StrToUnits(const QString &unit)
Definition: def.cpp:670
static const int heightStep
Definition: def.h:279
const QString log10_F
Definition: def.cpp:106
NotchType
Definition: def.h:123
QString makeHeaderName(const QString &name)
makeHeaderName make a 1 char tablewidgetitem header name based on a translated string.
Definition: def.cpp:401
const QString cursorArrowOpenHand
Definition: def.cpp:191
const QStringList builInFunctions
Definition: def.cpp:120
Q_REQUIRED_RESULT QString AbsoluteMPath(const QString &patternPath, const QString &relativeMPath)
Definition: def.cpp:424
const QString cm_Oprt
Definition: def.cpp:129
const QString pl_pExt
Definition: def.cpp:145
NodeDetail
Definition: def.h:102
const QString tanh_F
Definition: def.cpp:95
void InitHighDpiScaling(int argc, char *argv[])
Definition: def.cpp:551
Q_REQUIRED_RESULT QSharedPointer< QPrinter > PreparePrinter(const QPrinterInfo &info, QPrinter::PrinterMode mode=QPrinter::ScreenResolution)
Definition: def.cpp:440
LayoutExportFormat
Definition: def.h:60
const QString pl_mExt
Definition: def.cpp:148
const QString ln_F
Definition: def.cpp:108
const QString pl_pFoldPosition
Definition: def.cpp:154
QMarginsF GetPrinterFields(const QSharedPointer< QPrinter > &printer)
Definition: def.cpp:477
constexpr qreal accuracyPointOnLine
Definition: def.h:479
const QString mm_Oprt
Definition: def.cpp:130
PieceNodeAngle
Definition: def.h:113
const qreal PrintDPI
Definition: def.cpp:228
const QString tanD_F
Definition: def.cpp:101
const QString pl_wCut
Definition: def.cpp:161
static Q_REQUIRED_RESULT bool VFuzzyComparePossibleNulls(double p1, double p2)
Definition: def.h:490
const QString acos_F
Definition: def.cpp:91
QSet< T > convertToSet(const C< T > &list)
Definition: def.h:625
const QString pl_author
Definition: def.cpp:143
Q_REQUIRED_RESULT QPixmap darkenPixmap(const QPixmap &pixmap)
Definition: def.cpp:489
const QString sum_F
Definition: def.cpp:116
QString notchSubTypeToString(NotchSubType type)
Definition: def.cpp:632
const QString pl_time
Definition: def.cpp:140
QList< T > convertToList(const C< T > &set)
Definition: def.h:645
Vis
Definition: def.h:219
@ ScaledLine
@ ToolPointOfContact
@ ToolCutSplinePath
@ ScenePoint
@ ToolLineIntersectAxis
@ ToolEllipticalArc
@ ToolPointOfIntersectionArcs
@ ToolAnchorPoint
@ Operation
@ ToolPointFromCircleAndTangent
@ ToolLine
@ ToolPointOfIntersectionCurves
@ NoBrush
@ ControlPointSpline
@ ToolArcWithLength
@ ToolPiece
@ ToolPointFromArcAndTangent
@ ToolCubicBezierPath
@ ToolTrueDarts
@ ToolShoulderPoint
@ ToolInternalPath
@ SimpleCurve
@ ToolSplinePath
@ GrainlineItem
@ SimplePoint
@ ToolMirrorByLine
@ ToolPointOfIntersectionCircles
@ ScaledEllipse
@ ToolCutArc
@ ToolRotation
@ ToolPointOfIntersection
@ TextGraphicsItem
@ ToolMove
@ CurvePathItem
@ ToolBisector
@ ToolAlongLine
@ PieceAnchors
@ GraphicsSimpleTextItem
@ ToolHeight
@ PieceItem
@ ToolCubicBezier
@ ToolSpline
@ ToolNormal
@ ToolCurveIntersectAxis
@ ToolTriangle
@ ToolArc
@ ToolCutSpline
@ ToolLineIntersect
@ ToolMirrorByAxis
@ ToolEndLine
const QString unitMM
Definition: def.cpp:200
GHeights
Definition: def.h:280
const QString tan_F
Definition: def.cpp:89
static Q_REQUIRED_RESULT bool VFuzzyComparePoints(const QPointF &p1, const QPointF &p2, qreal accuracy=accuracyPointOnLine)
Definition: def.h:484
GSizes
Definition: def.h:287
PageOrientation
Definition: def.h:110
const QString pl_pQuantity
Definition: def.cpp:156
MeasurementsType
Definition: def.h:104
const QString LONG_OPTION_NO_HDPI_SCALING
Definition: def.cpp:535
const QString strIntersection
Definition: def.cpp:629
const QString atan_F
Definition: def.cpp:92
NotchSubType
Definition: def.h:137
const QString min_F
Definition: def.cpp:114
const QString sin_F
Definition: def.cpp:87
const QStringList labelTemplatePlaceholders
Definition: def.cpp:164
const QString strStraightforward
Definition: def.cpp:627
const QString pl_mFileName
Definition: def.cpp:147
const QString pl_patternName
Definition: def.cpp:141
const QString acosD_F
Definition: def.cpp:103
const QString pl_pAnnotation
Definition: def.cpp:150
const QString cosD_F
Definition: def.cpp:100
Q_REQUIRED_RESULT QString RelativeMPath(const QString &patternPath, const QString &absoluteMPath)
Definition: def.cpp:408
const QString in_Oprt
Definition: def.cpp:131
const QString sinD_F
Definition: def.cpp:99
SceneObject
Definition: def.h:103
const QString pl_pName
Definition: def.cpp:155
const QString unitCM
Definition: def.cpp:201
VarType
Definition: def.h:276
@ CurveCLength
void ShowInGraphicalShell(const QString &filePath)
Definition: def.cpp:514
const QString cursorArrowCloseHand
Definition: def.cpp:192
Q_REQUIRED_RESULT QStringList SupportedLocales()
Definition: def.cpp:361
const QString pl_wOnFold
Definition: def.cpp:162
const QString sinh_F
Definition: def.cpp:93
const QString rint_F
Definition: def.cpp:112
const QStringList builInPostfixOperators
Definition: def.cpp:133
Q_REQUIRED_RESULT QString strippedName(const QString &fullFileName)
strippedName the function call around curFile to exclude the path to the file.
Definition: def.cpp:391
const QString pl_patternNumber
Definition: def.cpp:142
PiecePathType
Definition: def.h:157
const QString strSlit
Definition: def.cpp:565
const QString cos_F
Definition: def.cpp:88
const QString avg_F
Definition: def.cpp:117
const QString acosh_F
Definition: def.cpp:97
const QString pl_mLining
Definition: def.cpp:158
const QString atanD_F
Definition: def.cpp:104
const QString atanh_F
Definition: def.cpp:98
bool IsOptionSet(int argc, char *argv[], const char *option)
Definition: def.cpp:538
const QString degreeSymbol
Definition: def.cpp:196
const QString log2_F
Definition: def.cpp:105
Unit
Definition: def.h:105
@ LAST_UNIT_DO_NOT_USE
const QString asinh_F
Definition: def.cpp:96
const QString fmod_F
Definition: def.cpp:118
void InitLanguages(QComboBox *combobox)
Definition: def.cpp:725
const QString pl_pFileName
Definition: def.cpp:146
const QString cosh_F
Definition: def.cpp:94
static const int sizeStep
Definition: def.h:286
const QString unitPX
Definition: def.cpp:203
Tool
Definition: def.h:161
@ PointOfIntersectionCurves
@ PointOfIntersectionCircles
@ LineIntersectAxis
@ ArcWithLength
@ AlongLine
@ EndLine
@ SinglePoint
@ PointFromCircleAndTangent
@ MirrorByLine
@ ShoulderPoint
@ NodeSplinePath
@ NodeSpline
@ NodeElArc
@ TrueDarts
@ Triangle
@ CurveIntersectAxis
@ LineIntersect
@ LinePoint
@ NodeArc
@ BasePoint
@ Midpoint
@ CutArc
@ ArcIntersectAxis
@ Normal
@ DoublePoint
@ PointOfContact
@ CutSplinePath
@ PointFromArcAndTangent
@ AbstractSpline
@ PointOfIntersection
@ NodePoint
@ LAST_ONE_DO_NOT_USE
@ MirrorByAxis
@ PointOfIntersectionArcs
@ InsertNodes
@ Height
@ Rotation
@ CutSpline
@ AnchorPoint
SelectionType
Definition: def.h:108
PiecePathIncludeType
Definition: def.h:152
Q_REQUIRED_RESULT double ToPixel(double val, const Unit &unit)
Definition: def.cpp:231
Source
Definition: def.h:106
const QString radTodeg_F
Definition: def.cpp:86
const QString abs_F
Definition: def.cpp:113
const QString sign_F
Definition: def.cpp:111
Q_DECLARE_TYPEINFO(CustomSARecord, Q_MOVABLE_TYPE)
void SetItemOverrideCursor(QGraphicsItem *item, const QString &pixmapPath, int hotX=-1, int hotY=-1)
Definition: def.cpp:206
const QString pl_date
Definition: def.cpp:139
const QString pl_mInterfacing
Definition: def.cpp:159
const QString sqrt_F
Definition: def.cpp:110
const QString unitINCH
Definition: def.cpp:202
const QString pl_mFabric
Definition: def.cpp:157
Q_REQUIRED_RESULT qreal UnitConvertor(qreal value, const Unit &from, const Unit &to)
Definition: def.cpp:269
int ToolVisHolderType
Definition: def.h:159
const QString pl_pOrientation
Definition: def.cpp:151
const QString pl_pRotation
Definition: def.cpp:152
const QString asin_F
Definition: def.cpp:90
const QString trueStr
Definition: def.cpp:197
const QString pl_mInterlining
Definition: def.cpp:160
const QString degTorad_F
Definition: def.cpp:85
Q_REQUIRED_RESULT double FromPixel(double pix, const Unit &unit)
Definition: def.cpp:250
const QString falseStr
Definition: def.cpp:198
QMarginsF GetMinPrinterFields(const QSharedPointer< QPrinter > &printer)
Definition: def.cpp:463
NotchType stringToNotchType(const QString &value)
Definition: def.cpp:600
const QString pl_pTilt
Definition: def.cpp:153
QString UnitsToStr(const Unit &unit, const bool translate=false)
UnitsToStr translate unit to string.
Definition: def.cpp:702
const QString max_F
Definition: def.cpp:115
const QString exp_F
Definition: def.cpp:109
NodeUsage
Definition: def.h:107
const QString pl_height
Definition: def.cpp:138
const QString strBisector
Definition: def.cpp:628
const QString pl_pLetter
Definition: def.cpp:149
QString notchTypeToString(NotchType type)
Definition: def.cpp:574
const QString log_F
Definition: def.cpp:107
NotchSubType stringToNotchSubType(const QString &value)
Definition: def.cpp:650
The CustomSA struct contains record about custom seam allowanse (SA).
Definition: def.h:510
quint32 endPoint
Definition: def.h:521
quint32 path
Definition: def.h:520
CustomSARecord()
Definition: def.h:511
quint32 startPoint
Definition: def.h:519
bool reverse
Definition: def.h:522
PiecePathIncludeType includeType
Definition: def.h:523
#define translate(context, source)
Definition: vcmdexport.cpp:41
@ CubicBezierPath
@ SplinePath
@ EllipticalArc
@ CubicBezier
@ Modeling