Seamly2D
Code documentation
def.h File Reference
#include <qcompilerdetection.h>
#include <QLineF>
#include <QString>
#include <QStringList>
#include <Qt>
#include <QtGlobal>
#include <QPrinter>
#include <csignal>
#include "debugbreak.h"
Include dependency graph for def.h:

Go to the source code of this file.

Classes

struct  CustomSARecord
 The CustomSA struct contains record about custom seam allowanse (SA). More...
 
class  QxtPrivate< PUB >
 
class  QxtPrivateInterface< PUB, PVT >
 

Macros

#define SceneSize   50000
 
#define QIMAGE_MAX   32768
 
#define SCASSERT(cond)
 
#define __has_cpp_attribute(x)   0
 
#define V_FALLTHROUGH
 
#define QXT_DECLARE_PRIVATE(PUB)   friend class PUB##Private; QxtPrivateInterface<PUB, PUB##Private> qxt_d;
 
#define QXT_DECLARE_PUBLIC(PUB)   friend class PUB;
 
#define QXT_INIT_PRIVATE(PUB)   qxt_d.setPublic(this);
 
#define QXT_D(PUB)   PUB##Private& d = qxt_d()
 
#define QXT_P(PUB)   PUB& p = qxt_p()
 

Typedefs

typedef int ToolVisHolderType
 

Enumerations

enum class  LayoutExportFormat : char {
  SVG = 0 , PDF = 1 , PDFTiled = 2 , PNG = 3 ,
  JPG = 4 , BMP = 5 , PPM = 6 , OBJ = 7 ,
  PS = 8 , EPS = 9 , DXF_AC1006_Flat = 10 , DXF_AC1009_Flat = 11 ,
  DXF_AC1012_Flat = 12 , DXF_AC1014_Flat = 13 , DXF_AC1015_Flat = 14 , DXF_AC1018_Flat = 15 ,
  DXF_AC1021_Flat = 16 , DXF_AC1024_Flat = 17 , DXF_AC1027_Flat = 18 , DXF_AC1006_AAMA = 19 ,
  DXF_AC1009_AAMA = 20 , DXF_AC1012_AAMA = 21 , DXF_AC1014_AAMA = 22 , DXF_AC1015_AAMA = 23 ,
  DXF_AC1018_AAMA = 24 , DXF_AC1021_AAMA = 25 , DXF_AC1024_AAMA = 26 , DXF_AC1027_AAMA = 27 ,
  DXF_AC1006_ASTM = 28 , DXF_AC1009_ASTM = 29 , DXF_AC1012_ASTM = 30 , DXF_AC1014_ASTM = 31 ,
  DXF_AC1015_ASTM = 32 , DXF_AC1018_ASTM = 33 , DXF_AC1021_ASTM = 34 , DXF_AC1024_ASTM = 35 ,
  DXF_AC1027_ASTM = 36 , TIF = 37 , COUNT
}
 
enum class  NodeDetail : char { Contour , Modeling }
 
enum class  SceneObject : char {
  Point , Line , Spline , Arc ,
  ElArc , SplinePath , Piece , Unknown
}
 
enum class  MeasurementsType : char { Multisize , Individual , Unknown }
 
enum class  Unit : char {
  Mm = 0 , Cm , Inch , Px ,
  LAST_UNIT_DO_NOT_USE
}
 
enum class  Source : char { FromGui , FromFile , FromTool }
 
enum class  NodeUsage : bool { NotInUse = false , InUse = true }
 
enum class  SelectionType : bool { ByMousePress , ByMouseRelease }
 
enum class  PageOrientation : bool { Portrait = true , Landscape = false }
 
enum class  PieceNodeAngle : unsigned char {
  ByLength = 0 , ByPointsIntersection , ByFirstEdgeSymmetry , BySecondEdgeSymmetry ,
  ByFirstEdgeRightAngle , BySecondEdgeRightAngle
}
 
enum class  NotchType : unsigned char {
  Slit = 0 , TNotch , VInternal , VExternal ,
  UNotch , Castle , Diamond
}
 
enum class  NotchSubType : unsigned char { Straightforward = 0 , Bisector , Intersection }
 
enum class  PiecePathIncludeType : unsigned char { AsMainPath = 0 , AsCustomSA = 1 }
 
enum class  PiecePathType : unsigned char { PiecePath = 0 , CustomSeamAllowance = 1 , InternalPath = 2 , Unknown = 3 }
 
enum class  Tool : ToolVisHolderType {
  Arrow , SinglePoint , DoublePoint , LinePoint ,
  AbstractSpline , Cut , BasePoint , EndLine ,
  Line , AlongLine , ShoulderPoint , Normal ,
  Bisector , LineIntersect , Spline , CubicBezier ,
  CutSpline , CutArc , Arc , ArcWithLength ,
  SplinePath , CubicBezierPath , CutSplinePath , PointOfContact ,
  Piece , InternalPath , NodePoint , NodeArc ,
  NodeElArc , NodeSpline , NodeSplinePath , Height ,
  Triangle , LineIntersectAxis , PointOfIntersectionArcs , PointOfIntersectionCircles ,
  PointOfIntersectionCurves , CurveIntersectAxis , ArcIntersectAxis , PointOfIntersection ,
  PointFromCircleAndTangent , PointFromArcAndTangent , TrueDarts , Union ,
  Group , Rotation , MirrorByLine , MirrorByAxis ,
  Move , Midpoint , EllipticalArc , AnchorPoint ,
  InsertNodes , LAST_ONE_DO_NOT_USE
}
 
enum class  Vis : ToolVisHolderType {
  ControlPointSpline = static_cast<ToolVisHolderType>(Tool::LAST_ONE_DO_NOT_USE) , GraphicsSimpleTextItem , SimplePoint , SimpleCurve ,
  ScaledLine , ScaledEllipse , Line , Path ,
  Operation , ToolAlongLine , ToolArc , ToolArcWithLength ,
  ToolBisector , ToolCutArc , ToolEndLine , ToolHeight ,
  ToolLine , ToolLineIntersect , ToolNormal , ToolPointOfContact ,
  ToolPointOfIntersection , ToolPointOfIntersectionArcs , ToolPointOfIntersectionCircles , ToolPointOfIntersectionCurves ,
  ToolPointFromCircleAndTangent , ToolPointFromArcAndTangent , ToolShoulderPoint , ToolSpline ,
  ToolCubicBezier , ToolCubicBezierPath , ToolTriangle , ToolCutSpline ,
  ToolSplinePath , ToolCutSplinePath , ToolLineIntersectAxis , ToolCurveIntersectAxis ,
  ToolTrueDarts , ToolRotation , ToolMirrorByLine , ToolMirrorByAxis ,
  ToolMove , ToolEllipticalArc , ToolPiece , ToolInternalPath ,
  ToolAnchorPoint , PieceAnchors , NoBrush , CurvePathItem ,
  GrainlineItem , PieceItem , TextGraphicsItem , ScenePoint ,
  ArrowedLineItem , LAST_ONE_DO_NOT_USE
}
 
enum class  VarType : char {
  Measurement , Increment , LineLength , CurveLength ,
  CurveCLength , LineAngle , CurveAngle , ArcRadius ,
  Unknown
}
 
enum class  GHeights : unsigned char {
  ALL , H50 =50 , H56 =56 , H62 =62 ,
  H68 =68 , H74 =74 , H80 =80 , H86 =86 ,
  H92 =92 , H98 =98 , H104 =104 , H110 =110 ,
  H116 =116 , H122 =122 , H128 =128 , H134 =134 ,
  H140 =140 , H146 =146 , H152 =152 , H158 =158 ,
  H164 =164 , H170 =170 , H176 =176 , H182 =182 ,
  H188 =188 , H194 =194 , H200 =200
}
 
enum class  GSizes : unsigned char {
  ALL , S22 =22 , S24 =24 , S26 =26 ,
  S28 =28 , S30 =30 , S32 =32 , S34 =34 ,
  S36 =36 , S38 =38 , S40 =40 , S42 =42 ,
  S44 =44 , S46 =46 , S48 =48 , S50 =50 ,
  S52 =52 , S54 =54 , S56 =56 , S58 =58 ,
  S60 =60 , S62 =62 , S64 =64 , S66 =66 ,
  S68 =68 , S70 =70 , S72 =72
}
 

Functions

QString notchTypeToString (NotchType type)
 
NotchType stringToNotchType (const QString &value)
 
QString notchSubTypeToString (NotchSubType type)
 
NotchSubType stringToNotchSubType (const QString &value)
 
Unit StrToUnits (const QString &unit)
 
QString UnitsToStr (const Unit &unit, const bool translate=false)
 UnitsToStr translate unit to string. More...
 
bool IsOptionSet (int argc, char *argv[], const char *option)
 
void InitHighDpiScaling (int argc, char *argv[])
 
void SetItemOverrideCursor (QGraphicsItem *item, const QString &pixmapPath, int hotX=-1, int hotY=-1)
 
Q_REQUIRED_RESULT double ToPixel (double val, const Unit &unit)
 
Q_REQUIRED_RESULT double FromPixel (double pix, const Unit &unit)
 
Q_REQUIRED_RESULT qreal UnitConvertor (qreal value, const Unit &from, const Unit &to)
 
Q_REQUIRED_RESULT QMarginsF UnitConvertor (const QMarginsF &margins, const Unit &from, const Unit &to)
 UnitConvertor Converts the values of the given margin from given unit to the new unit. returns a new instand of QMarginsF. More...
 
void InitLanguages (QComboBox *combobox)
 
Q_REQUIRED_RESULT QStringList SupportedLocales ()
 
QString makeHeaderName (const QString &name)
 makeHeaderName make a 1 char tablewidgetitem header name based on a translated string. More...
 
Q_REQUIRED_RESULT QString strippedName (const QString &fullFileName)
 strippedName the function call around curFile to exclude the path to the file. More...
 
Q_REQUIRED_RESULT QString RelativeMPath (const QString &patternPath, const QString &absoluteMPath)
 
Q_REQUIRED_RESULT QString AbsoluteMPath (const QString &patternPath, const QString &relativeMPath)
 
Q_REQUIRED_RESULT QSharedPointer< QPrinter > PreparePrinter (const QPrinterInfo &info, QPrinter::PrinterMode mode=QPrinter::ScreenResolution)
 
QMarginsF GetMinPrinterFields (const QSharedPointer< QPrinter > &printer)
 
QMarginsF GetPrinterFields (const QSharedPointer< QPrinter > &printer)
 
Q_REQUIRED_RESULT QPixmap darkenPixmap (const QPixmap &pixmap)
 
void ShowInGraphicalShell (const QString &filePath)
 
static Q_REQUIRED_RESULT bool VFuzzyComparePoints (const QPointF &p1, const QPointF &p2, qreal accuracy=accuracyPointOnLine)
 
static Q_REQUIRED_RESULT bool VFuzzyComparePossibleNulls (double p1, double p2)
 
 Q_DECLARE_TYPEINFO (CustomSARecord, Q_MOVABLE_TYPE)
 
template<typename T , template< typename > class C>
QSet< T > convertToSet (const C< T > &list)
 
template<typename T , typename C >
QSet< T > convertToSet (const C &list)
 
template<typename T , template< typename > class C>
QList< T > convertToList (const C< T > &set)
 

Variables

static const int heightStep = 6
 
static const int sizeStep = 2
 
const QString LONG_OPTION_NO_HDPI_SCALING
 
const QString degTorad_F
 
const QString radTodeg_F
 
const QString sin_F
 
const QString cos_F
 
const QString tan_F
 
const QString asin_F
 
const QString acos_F
 
const QString atan_F
 
const QString sinh_F
 
const QString cosh_F
 
const QString tanh_F
 
const QString asinh_F
 
const QString acosh_F
 
const QString atanh_F
 
const QString sinD_F
 
const QString cosD_F
 
const QString tanD_F
 
const QString asinD_F
 
const QString acosD_F
 
const QString atanD_F
 
const QString log2_F
 
const QString log10_F
 
const QString log_F
 
const QString ln_F
 
const QString exp_F
 
const QString sqrt_F
 
const QString sign_F
 
const QString rint_F
 
const QString abs_F
 
const QString min_F
 
const QString max_F
 
const QString sum_F
 
const QString avg_F
 
const QString fmod_F
 
const QStringList builInFunctions
 
const QString cm_Oprt
 
const QString mm_Oprt
 
const QString in_Oprt
 
const QStringList builInPostfixOperators
 
const QString pl_size
 
const QString pl_height
 
const QString pl_date
 
const QString pl_time
 
const QString pl_patternName
 
const QString pl_patternNumber
 
const QString pl_author
 
const QString pl_customer
 
const QString pl_pExt
 
const QString pl_pFileName
 
const QString pl_mFileName
 
const QString pl_mExt
 
const QString pl_pLetter
 
const QString pl_pAnnotation
 
const QString pl_pOrientation
 
const QString pl_pRotation
 
const QString pl_pTilt
 
const QString pl_pFoldPosition
 
const QString pl_pName
 
const QString pl_pQuantity
 
const QString pl_mFabric
 
const QString pl_mLining
 
const QString pl_mInterfacing
 
const QString pl_mInterlining
 
const QString pl_wCut
 
const QString pl_wOnFold
 
const QStringList labelTemplatePlaceholders
 
const QString cursorArrowOpenHand
 
const QString cursorArrowCloseHand
 
const QString degreeSymbol
 
const QString trueStr
 
const QString falseStr
 
const QString strSlit
 
const QString strStraightforward
 
const QString strBisector
 
const QString strIntersection
 
const QString unitMM
 
const QString unitCM
 
const QString unitINCH
 
const QString unitPX
 
const qreal PrintDPI
 
constexpr qreal accuracyPointOnLine = (0.1555 / 25.4) * 96.0
 

Macro Definition Documentation

◆ __has_cpp_attribute

#define __has_cpp_attribute (   x)    0

Definition at line 333 of file def.h.

◆ QIMAGE_MAX

#define QIMAGE_MAX   32768

Definition at line 298 of file def.h.

◆ QXT_D

#define QXT_D (   PUB)    PUB##Private& d = qxt_d()

Definition at line 544 of file def.h.

◆ QXT_DECLARE_PRIVATE

#define QXT_DECLARE_PRIVATE (   PUB)    friend class PUB##Private; QxtPrivateInterface<PUB, PUB##Private> qxt_d;

Definition at line 541 of file def.h.

◆ QXT_DECLARE_PUBLIC

#define QXT_DECLARE_PUBLIC (   PUB)    friend class PUB;

Definition at line 542 of file def.h.

◆ QXT_INIT_PRIVATE

#define QXT_INIT_PRIVATE (   PUB)    qxt_d.setPublic(this);

Definition at line 543 of file def.h.

◆ QXT_P

#define QXT_P (   PUB)    PUB& p = qxt_p()

Definition at line 545 of file def.h.

◆ SCASSERT

#define SCASSERT (   cond)
Value:
{ \
if (!(cond)) \
{ \
qCritical("ASSERT: %s in %s (%s:%u)", \
#cond, Q_FUNC_INFO , __FILE__, __LINE__); \
debug_break(); \
abort(); \
} \
} \

Definition at line 317 of file def.h.

◆ SceneSize

#define SceneSize   50000

Definition at line 57 of file def.h.

◆ V_FALLTHROUGH

#define V_FALLTHROUGH

Definition at line 351 of file def.h.

Typedef Documentation

◆ ToolVisHolderType

typedef int ToolVisHolderType

Definition at line 159 of file def.h.

Enumeration Type Documentation

◆ GHeights

enum GHeights : unsigned char
strong
Enumerator
ALL 
H50 
H56 
H62 
H68 
H74 
H80 
H86 
H92 
H98 
H104 
H110 
H116 
H122 
H128 
H134 
H140 
H146 
H152 
H158 
H164 
H170 
H176 
H182 
H188 
H194 
H200 

Definition at line 280 of file def.h.

◆ GSizes

enum GSizes : unsigned char
strong
Enumerator
ALL 
S22 
S24 
S26 
S28 
S30 
S32 
S34 
S36 
S38 
S40 
S42 
S44 
S46 
S48 
S50 
S52 
S54 
S56 
S58 
S60 
S62 
S64 
S66 
S68 
S70 
S72 

Definition at line 287 of file def.h.

◆ LayoutExportFormat

enum LayoutExportFormat : char
strong
Enumerator
SVG 
PDF 
PDFTiled 
PNG 
JPG 
BMP 
PPM 
OBJ 
PS 
EPS 
DXF_AC1006_Flat 
DXF_AC1009_Flat 
DXF_AC1012_Flat 
DXF_AC1014_Flat 
DXF_AC1015_Flat 
DXF_AC1018_Flat 
DXF_AC1021_Flat 
DXF_AC1024_Flat 
DXF_AC1027_Flat 
DXF_AC1006_AAMA 
DXF_AC1009_AAMA 
DXF_AC1012_AAMA 
DXF_AC1014_AAMA 
DXF_AC1015_AAMA 
DXF_AC1018_AAMA 
DXF_AC1021_AAMA 
DXF_AC1024_AAMA 
DXF_AC1027_AAMA 
DXF_AC1006_ASTM 
DXF_AC1009_ASTM 
DXF_AC1012_ASTM 
DXF_AC1014_ASTM 
DXF_AC1015_ASTM 
DXF_AC1018_ASTM 
DXF_AC1021_ASTM 
DXF_AC1024_ASTM 
DXF_AC1027_ASTM 
TIF 
COUNT 

Definition at line 59 of file def.h.

◆ MeasurementsType

enum MeasurementsType : char
strong
Enumerator
Multisize 
Individual 
Unknown 

Definition at line 104 of file def.h.

◆ NodeDetail

enum NodeDetail : char
strong
Enumerator
Contour 
Modeling 

Definition at line 102 of file def.h.

◆ NodeUsage

enum NodeUsage : bool
strong
Enumerator
NotInUse 
InUse 

Definition at line 107 of file def.h.

◆ NotchSubType

enum NotchSubType : unsigned char
strong
Enumerator
Straightforward 
Bisector 
Intersection 

Definition at line 136 of file def.h.

◆ NotchType

enum NotchType : unsigned char
strong
Enumerator
Slit 
TNotch 
VInternal 
VExternal 
UNotch 
Castle 
Diamond 

Definition at line 122 of file def.h.

◆ PageOrientation

enum PageOrientation : bool
strong
Enumerator
Portrait 
Landscape 

Definition at line 110 of file def.h.

◆ PieceNodeAngle

enum PieceNodeAngle : unsigned char
strong
Enumerator
ByLength 
ByPointsIntersection 
ByFirstEdgeSymmetry 
BySecondEdgeSymmetry 
ByFirstEdgeRightAngle 
BySecondEdgeRightAngle 

Definition at line 112 of file def.h.

◆ PiecePathIncludeType

enum PiecePathIncludeType : unsigned char
strong
Enumerator
AsMainPath 
AsCustomSA 

Definition at line 151 of file def.h.

◆ PiecePathType

enum PiecePathType : unsigned char
strong
Enumerator
PiecePath 
CustomSeamAllowance 
InternalPath 
Unknown 

Definition at line 157 of file def.h.

◆ SceneObject

enum SceneObject : char
strong
Enumerator
Point 
Line 
Spline 
Arc 
ElArc 
SplinePath 
Piece 
Unknown 

Definition at line 103 of file def.h.

◆ SelectionType

enum SelectionType : bool
strong
Enumerator
ByMousePress 
ByMouseRelease 

Definition at line 108 of file def.h.

◆ Source

enum Source : char
strong
Enumerator
FromGui 
FromFile 
FromTool 

Definition at line 106 of file def.h.

◆ Tool

enum Tool : ToolVisHolderType
strong
Enumerator
Arrow 
SinglePoint 
DoublePoint 
LinePoint 
AbstractSpline 
Cut 
BasePoint 
EndLine 
Line 
AlongLine 
ShoulderPoint 
Normal 
Bisector 
LineIntersect 
Spline 
CubicBezier 
CutSpline 
CutArc 
Arc 
ArcWithLength 
SplinePath 
CubicBezierPath 
CutSplinePath 
PointOfContact 
Piece 
InternalPath 
NodePoint 
NodeArc 
NodeElArc 
NodeSpline 
NodeSplinePath 
Height 
Triangle 
LineIntersectAxis 
PointOfIntersectionArcs 
PointOfIntersectionCircles 
PointOfIntersectionCurves 
CurveIntersectAxis 
ArcIntersectAxis 
PointOfIntersection 
PointFromCircleAndTangent 
PointFromArcAndTangent 
TrueDarts 
Union 
Group 
Rotation 
MirrorByLine 
MirrorByAxis 
Move 
Midpoint 
EllipticalArc 
AnchorPoint 
InsertNodes 
LAST_ONE_DO_NOT_USE 

Definition at line 160 of file def.h.

◆ Unit

enum Unit : char
strong
Enumerator
Mm 
Cm 
Inch 
Px 
LAST_UNIT_DO_NOT_USE 

Definition at line 105 of file def.h.

◆ VarType

enum VarType : char
strong
Enumerator
Measurement 
Increment 
LineLength 
CurveLength 
CurveCLength 
LineAngle 
CurveAngle 
ArcRadius 
Unknown 

Definition at line 276 of file def.h.

◆ Vis

enum Vis : ToolVisHolderType
strong
Enumerator
ControlPointSpline 
GraphicsSimpleTextItem 
SimplePoint 
SimpleCurve 
ScaledLine 
ScaledEllipse 
Line 
Path 
Operation 
ToolAlongLine 
ToolArc 
ToolArcWithLength 
ToolBisector 
ToolCutArc 
ToolEndLine 
ToolHeight 
ToolLine 
ToolLineIntersect 
ToolNormal 
ToolPointOfContact 
ToolPointOfIntersection 
ToolPointOfIntersectionArcs 
ToolPointOfIntersectionCircles 
ToolPointOfIntersectionCurves 
ToolPointFromCircleAndTangent 
ToolPointFromArcAndTangent 
ToolShoulderPoint 
ToolSpline 
ToolCubicBezier 
ToolCubicBezierPath 
ToolTriangle 
ToolCutSpline 
ToolSplinePath 
ToolCutSplinePath 
ToolLineIntersectAxis 
ToolCurveIntersectAxis 
ToolTrueDarts 
ToolRotation 
ToolMirrorByLine 
ToolMirrorByAxis 
ToolMove 
ToolEllipticalArc 
ToolPiece 
ToolInternalPath 
ToolAnchorPoint 
PieceAnchors 
NoBrush 
CurvePathItem 
GrainlineItem 
PieceItem 
TextGraphicsItem 
ScenePoint 
ArrowedLineItem 
LAST_ONE_DO_NOT_USE 

Definition at line 218 of file def.h.

Function Documentation

◆ AbsoluteMPath()

◆ convertToList()

template<typename T , template< typename > class C>
QList<T> convertToList ( const C< T > &  set)
inline

Definition at line 645 of file def.h.

Referenced by TMainWindow::FilterMeasurements().

◆ convertToSet() [1/2]

template<typename T , typename C >
QSet<T> convertToSet ( const C &  list)
inline

Definition at line 635 of file def.h.

◆ convertToSet() [2/2]

template<typename T , template< typename > class C>
QSet<T> convertToSet ( const C< T > &  list)
inline

Definition at line 625 of file def.h.

◆ darkenPixmap()

Q_REQUIRED_RESULT QPixmap darkenPixmap ( const QPixmap &  pixmap)

Definition at line 489 of file def.cpp.

Referenced by MainWindow::UpdateWindowTitle(), and TMainWindow::UpdateWindowTitle().

◆ FromPixel()

◆ GetMinPrinterFields()

QMarginsF GetMinPrinterFields ( const QSharedPointer< QPrinter > &  printer)

Definition at line 463 of file def.cpp.

References Mm, Px, and UnitConvertor().

Referenced by DialogLayoutSettings::MinPrinterFields().

◆ GetPrinterFields()

QMarginsF GetPrinterFields ( const QSharedPointer< QPrinter > &  printer)

Definition at line 477 of file def.cpp.

References Mm, Px, and UnitConvertor().

Referenced by DialogLayoutSettings::GetDefPrinterFields(), and DialogLayoutSettings::PrinterMargins().

◆ InitHighDpiScaling()

void InitHighDpiScaling ( int  argc,
char *  argv[] 
)

Definition at line 551 of file def.cpp.

References IsOptionSet(), and LONG_OPTION_NO_HDPI_SCALING.

Referenced by main().

◆ InitLanguages()

void InitLanguages ( QComboBox *  combobox)

◆ IsOptionSet()

bool IsOptionSet ( int  argc,
char *  argv[],
const char *  option 
)

Definition at line 538 of file def.cpp.

Referenced by InitHighDpiScaling().

◆ makeHeaderName()

QString makeHeaderName ( const QString &  name)

makeHeaderName make a 1 char tablewidgetitem header name based on a translated string.

Parameters
namefull name of header item.
Returns
1 char name.

Definition at line 401 of file def.cpp.

Referenced by GroupsWidget::fillTable().

◆ notchSubTypeToString()

QString notchSubTypeToString ( NotchSubType  type)

◆ notchTypeToString()

QString notchTypeToString ( NotchType  type)

◆ PreparePrinter()

Q_REQUIRED_RESULT QSharedPointer<QPrinter> PreparePrinter ( const QPrinterInfo &  info,
QPrinter::PrinterMode  mode = QPrinter::ScreenResolution 
)

Definition at line 440 of file def.cpp.

References PrintDPI.

Referenced by MainWindowsNoGUI::LayoutPrint(), and MainWindowsNoGUI::PrintPreview().

◆ Q_DECLARE_TYPEINFO()

Q_DECLARE_TYPEINFO ( CustomSARecord  ,
Q_MOVABLE_TYPE   
)

◆ RelativeMPath()

Q_REQUIRED_RESULT QString RelativeMPath ( const QString &  patternPath,
const QString &  absoluteMPath 
)

◆ SetItemOverrideCursor()

◆ ShowInGraphicalShell()

void ShowInGraphicalShell ( const QString &  filePath)

Definition at line 514 of file def.cpp.

◆ stringToNotchSubType()

NotchSubType stringToNotchSubType ( const QString &  value)

◆ stringToNotchType()

NotchType stringToNotchType ( const QString &  value)

◆ strippedName()

Q_REQUIRED_RESULT QString strippedName ( const QString &  fullFileName)

strippedName the function call around curFile to exclude the path to the file.

Parameters
fullFileNamefull path to the file.
Returns
file name.

Definition at line 391 of file def.cpp.

Referenced by MainWindow::GetMeasurementFileName(), MainWindow::UpdateRecentFileActions(), and TMainWindow::UpdateRecentFileActions().

◆ StrToUnits()

◆ SupportedLocales()

Q_REQUIRED_RESULT QStringList SupportedLocales ( )

Definition at line 361 of file def.cpp.

◆ ToPixel()

Q_REQUIRED_RESULT double ToPixel ( double  val,
const Unit unit 
)

Definition at line 231 of file def.cpp.

References Cm, Inch, Mm, PrintDPI, and Px.

Referenced by VLayoutPiece::createAllowanceItem(), VPiece::createBuiltInSaNotch(), VLayoutPiece::createCutoutPathItem(), VPE::LineWeightProperty::createIcon(), VLayoutPiece::createInternalPathItem(), VLayoutPiece::createMainItem(), VPiece::createSeamAllowanceNotch(), VEllipticalArc::CutArc(), VArc::CutArc(), VAbstractCubicBezier::CutSpline(), VAbstractCubicBezierPath::CutSplinePath(), DoubleLinePointTool::DoubleLinePointTool(), MainWindowsNoGUI::exportPiecesAsFlatLayout(), VEllipticalArc::FindF2(), anonymous_namespace{vlayoutpiece.cpp}::FindGrainlineGeometry(), PatternPieceTool::FindGrainlineGeometry(), anonymous_namespace{vlayoutpiece.cpp}::FindLabelGeometry(), PatternPieceTool::FindLabelGeometry(), PatternPieceDialog::getFormulaValue(), VPiece::getNodeSAPoints(), VPieceNode::GetSAAfter(), VPieceNode::GetSABefore(), VPiece::getSeamNotchSAPoint(), DoubleLinePointTool::hoverEnterEvent(), VToolLinePoint::hoverEnterEvent(), DoubleLinePointTool::hoverLeaveEvent(), VToolLinePoint::hoverLeaveEvent(), PatternPieceTool::InitInternalPaths(), VAbstractSpline::paint(), PatternPieceTool::paint(), DoubleLinePointTool::paint(), VToolLinePoint::paint(), VToolLine::paint(), VToolInternalPath::paint(), VGrainlineItem::paint(), PatternPieceTool::PrepareLabelData(), MainWindowsNoGUI::PrintPages(), DoubleLinePointTool::RefreshGeometry(), VToolLinePoint::RefreshGeometry(), VScenePoint::refreshLeader(), VSimpleCurve::ScalePenWidth(), VPiece::SeamAllowancePoints(), Visualization::setLineWeight(), VLayoutPiece::SetPatternInfo(), VLayoutPiece::SetPieceText(), VAbstractApplication::toPixel(), PatternPieceTool::UpdateGrainline(), and VToolLinePoint::VToolLinePoint().

◆ UnitConvertor() [1/2]

Q_REQUIRED_RESULT QMarginsF UnitConvertor ( const QMarginsF &  margins,
const Unit from,
const Unit to 
)

UnitConvertor Converts the values of the given margin from given unit to the new unit. returns a new instand of QMarginsF.

Parameters
margin
from
to
Returns

Definition at line 349 of file def.cpp.

References UnitConvertor().

◆ UnitConvertor() [2/2]

Q_REQUIRED_RESULT qreal UnitConvertor ( qreal  value,
const Unit from,
const Unit to 
)

Definition at line 269 of file def.cpp.

References Cm, Inch, Mm, PrintDPI, and Px.

Referenced by VMeasurement::CalcValue(), AbstractTest::Comparison(), DialogLayoutSettings::ConvertLayoutSize(), DialogLayoutSettings::ConvertPaperSize(), DialogLayoutSettings::DialogAccepted(), DialogNewMeasurements::DialogNewMeasurements(), TMainWindow::EvalFormula(), VCommonSettings::GetDefaultSeamAllowance(), VSettings::GetDefLayoutWidth(), DialogLayoutSettings::GetFields(), VSettings::GetLayoutPaperHeight(), VSettings::GetLayoutPaperWidth(), DialogLayoutSettings::GetLayoutWidth(), GetMinPrinterFields(), DialogLayoutSettings::GetPaperHeight(), DialogLayoutSettings::GetPaperWidth(), GetPrinterFields(), DialogLayoutSettings::GetShift(), VAbstractLayoutDialog::getTemplateSize(), VSettings::GetTiledPDFMargins(), VSettings::getTiledPDFPaperHeight(), VSettings::getTiledPDFPaperWidth(), DialogPatternProperties::InitComboBox(), PatternPieceDialog::initializeSeamAllowanceTab(), DialogInternalPath::InitSeamAllowanceTab(), DialogLayoutSettings::LayoutToPixels(), VMeasurement::ListValue(), MainWindow::LoadMeasurements(), DialogLayoutSettings::MinimumLayoutSize(), DialogLayoutSettings::MinimumPaperSize(), DialogLayoutSettings::PageToPixels(), VMeasurements::ReadMeasurements(), DialogLayoutSettings::ReadSettings(), TMainWindow::RefreshTable(), TMainWindow::SetBaseMHeight(), TMainWindow::SetBaseMSize(), VCommonSettings::SetDefaultSeamAllowance(), DialogLayoutSettings::SetFields(), PatternPieceDialog::setGrainlineLength(), MainWindow::SetHeight(), DialogLayoutSettings::SetLayoutWidth(), DialogLayoutSettings::SetPaperHeight(), DialogLayoutSettings::SetPaperWidth(), PatternPieceDialog::setPatternLabelHeight(), PatternPieceDialog::setPatternLabelWidth(), PatternPieceDialog::setPieceLabelHeight(), PatternPieceDialog::setPieceLabelWidth(), MainWindowsNoGUI::SetPrinterSettings(), DialogLayoutSettings::SetShift(), MainWindow::SetSize(), VSettings::setTiledPDFMargins(), VSettings::setTiledPDFPaperHeight(), VSettings::setTiledPDFPaperWidth(), MainWindow::ShowMeasurements(), TMainWindow::ShowNewMData(), VMeasurements::UniqueTagAttr(), and UnitConvertor().

◆ UnitsToStr()

QString UnitsToStr ( const Unit unit,
const bool  translate 
)

UnitsToStr translate unit to string.

This method used when need write unit in xml file and for showing unit in dialogs.

Parameters
unitcurent unit
translatetrue if need show translated name. Default value false.
Returns
string reprezantation for unit.

Definition at line 702 of file def.cpp.

References Cm, Inch, Mm, Px, translate, unitCM, unitINCH, unitMM, and unitPX.

Referenced by DialogInternalPath::afterWidthChanged(), PatternPieceDialog::afterWidthChanged(), DialogInternalPath::beforeWidthChanged(), PatternPieceDialog::beforeWidthChanged(), TMainWindow::changeEvent(), IntersectCirclesDialog::Circle1RadiusChanged(), IntersectCirclesDialog::Circle2RadiusChanged(), IntersectCircleTangentDialog::CircleRadiusChanged(), VAbstractOperation::complexCurveToolTip(), VPattern::CreateEmptyFile(), VMeasurements::CreateEmptyIndividualFile(), VMeasurements::CreateEmptyMultisizeFile(), DialogInternalPath::defaultWidthChanged(), PatternPieceDialog::defaultWidthChanged(), DialogInternalPath::editAfterSeamAllowanceWidth(), PatternPieceDialog::editAfterSeamAllowanceWidth(), DialogInternalPath::editBeforeSeamAllowanceWidth(), PatternPieceDialog::editBeforeSeamAllowanceWidth(), DialogInternalPath::editDefaultSeamAllowanceWidth(), PatternPieceDialog::editDefaultSeamAllowanceWidth(), DialogMove::editLengthFormula(), IntersectCirclesDialog::EvalCircle1Radius(), IntersectCirclesDialog::EvalCircle2Radius(), IntersectCircleTangentDialog::EvalCircleRadius(), DialogTool::EvalFormula(), TMainWindow::EvalFormula(), DialogSpline::EvalLength1(), DialogSplinePath::EvalLength1(), DialogSpline::EvalLength2(), DialogSplinePath::EvalLength2(), DialogArc::EvalRadius(), DialogEllipticalArc::EvalRadiuses(), DialogInternalPath::evaluateAfterWidth(), PatternPieceDialog::evaluateAfterWidth(), DialogInternalPath::evaluateBeforeWidth(), PatternPieceDialog::evaluateBeforeWidth(), DialogInternalPath::evaluateDefaultWidth(), PatternPieceDialog::evaluateDefaultWidth(), DialogMove::evaluateLength(), DialogVariables::evalVariableFormula(), DialogVariables::Fx(), TMainWindow::Fx(), IntersectCirclesDialog::FXCircle1Radius(), IntersectCirclesDialog::FXCircle2Radius(), IntersectCircleTangentDialog::FXCircleRadius(), DialogAlongLine::FXLength(), DialogArcWithLength::FXLength(), DialogBisector::FXLength(), DialogCutArc::FXLength(), DialogCutSpline::FXLength(), DialogCutSplinePath::FXLength(), DialogEndLine::FXLength(), DialogNormal::FXLength(), DialogShoulderPoint::FXLength(), DialogSpline::FXLength1(), DialogSplinePath::FXLength1(), DialogSpline::FXLength2(), DialogSplinePath::FXLength2(), DialogArc::FXRadius(), DialogArcWithLength::FXRadius(), DialogPointOfContact::FXRadius(), DialogEllipticalArc::FXRadius1(), DialogEllipticalArc::FXRadius2(), VToolPointOfContact::getArcRadius(), IntersectCircleTangentTool::GetCircleRadius(), IntersectCirclesTool::GetFirstCircleRadius(), VToolCut::GetFormula(), VToolMove::GetFormulaLength(), VToolArcWithLength::GetFormulaLength(), VToolLinePoint::GetFormulaLength(), VToolArc::GetFormulaRadius(), VToolArcWithLength::GetFormulaRadius(), VToolEllipticalArc::GetFormulaRadius1(), VToolEllipticalArc::GetFormulaRadius2(), IntersectCirclesTool::GetSecondCircleRadius(), TMainWindow::InitComboBoxUnits(), PreferencesPatternPage::initDefaultSeamAllowance(), PreferencesPatternPage::initGrainlines(), PreferencesPatternPage::initializeLabelsTab(), DialogLayoutSettings::InitLayoutUnits(), PreferencesPatternPage::initNotches(), DialogLayoutSettings::InitPaperUnits(), DialogNewPattern::InitUnits(), TMainWindow::InitWindow(), DialogArcWithLength::Length(), DialogSpline::Length1Changed(), DialogSpline::Length2Changed(), DialogArcWithLength::LengthChanged(), VToolMove::makeToolTip(), VAbstractSpline::makeToolTip(), VToolArc::makeToolTip(), VToolArcWithLength::makeToolTip(), VToolEllipticalArc::makeToolTip(), VToolCutArc::makeToolTip(), VToolCutSpline::makeToolTip(), VToolCutSplinePath::makeToolTip(), DoubleLinePointTool::makeToolTip(), VToolAlongLine::makeToolTip(), VToolHeight::makeToolTip(), VToolLineIntersectAxis::makeToolTip(), VToolLinePoint::makeToolTip(), VToolShoulderPoint::makeToolTip(), VToolLineIntersect::makeToolTip(), VToolPointOfContact::makeToolTip(), VToolLine::makeToolTip(), MouseCoordinates::MouseCoordinates(), TMainWindow::printPages(), DialogArcWithLength::Radius(), DialogEllipticalArc::Radius1Changed(), DialogEllipticalArc::Radius2Changed(), DialogArc::RadiusChanged(), DialogArcWithLength::RadiusChanged(), VisToolMove::RefreshGeometry(), VisToolEndLine::RefreshGeometry(), DialogVariables::saveCustomVariableFormula(), TMainWindow::SaveMValue(), ShowInfoDialog::ShowInfoDialog(), MainWindow::ShowMeasurements(), TMainWindow::ShowNewMData(), VToolOptionsPropertyBrowser::showOptionsToolSpline(), DialogVariables::showUnits(), TMainWindow::ShowUnits(), VDomDocument::UnitsHelpString(), PatternPieceDialog::updateGrainlineValues(), VToolOptionsPropertyBrowser::updateOptionsToolSpline(), PatternPieceDialog::updatePatternLabelValues(), PatternPieceDialog::updatePieceLabelValues(), and EditFormulaDialog::valueChanged().

◆ VFuzzyComparePoints()

static bool VFuzzyComparePoints ( const QPointF &  p1,
const QPointF &  p2,
qreal  accuracy = accuracyPointOnLine 
)
inlinestatic

Definition at line 484 of file def.h.

Referenced by AbstractTest::Comparison(), and VEllipticalArc::getPoints().

◆ VFuzzyComparePossibleNulls()

Variable Documentation

◆ abs_F

const QString abs_F
extern

Definition at line 113 of file def.cpp.

Referenced by VTranslateVars::InitFunctions().

◆ accuracyPointOnLine

constexpr qreal accuracyPointOnLine = (0.1555 / 25.4) * 96.0
constexpr

Definition at line 479 of file def.h.

◆ acos_F

const QString acos_F
extern

Definition at line 91 of file def.cpp.

Referenced by VTranslateVars::InitFunctions().

◆ acosD_F

const QString acosD_F
extern

Definition at line 103 of file def.cpp.

Referenced by VTranslateVars::InitFunctions().

◆ acosh_F

const QString acosh_F
extern

Definition at line 97 of file def.cpp.

Referenced by VTranslateVars::InitFunctions().

◆ asin_F

const QString asin_F
extern

Definition at line 90 of file def.cpp.

Referenced by VTranslateVars::InitFunctions().

◆ asinD_F

const QString asinD_F
extern

Definition at line 102 of file def.cpp.

Referenced by VTranslateVars::InitFunctions().

◆ asinh_F

const QString asinh_F
extern

Definition at line 96 of file def.cpp.

Referenced by VTranslateVars::InitFunctions().

◆ atan_F

const QString atan_F
extern

Definition at line 92 of file def.cpp.

Referenced by VTranslateVars::InitFunctions().

◆ atanD_F

const QString atanD_F
extern

Definition at line 104 of file def.cpp.

Referenced by VTranslateVars::InitFunctions().

◆ atanh_F

const QString atanh_F
extern

Definition at line 98 of file def.cpp.

Referenced by VTranslateVars::InitFunctions().

◆ avg_F

const QString avg_F
extern

Definition at line 117 of file def.cpp.

Referenced by VTranslateVars::InitFunctions().

◆ builInFunctions

const QStringList builInFunctions
extern

◆ builInPostfixOperators

const QStringList builInPostfixOperators
extern

Definition at line 133 of file def.cpp.

Referenced by VAbstractPattern::IsPostfixOperator().

◆ cm_Oprt

const QString cm_Oprt
extern

Definition at line 129 of file def.cpp.

Referenced by VTranslateVars::InitPostfixOperators().

◆ cos_F

const QString cos_F
extern

Definition at line 88 of file def.cpp.

Referenced by VTranslateVars::InitFunctions().

◆ cosD_F

const QString cosD_F
extern

Definition at line 100 of file def.cpp.

Referenced by VTranslateVars::InitFunctions().

◆ cosh_F

const QString cosh_F
extern

Definition at line 94 of file def.cpp.

Referenced by VTranslateVars::InitFunctions().

◆ cursorArrowCloseHand

◆ cursorArrowOpenHand

◆ degreeSymbol

const QString degreeSymbol
extern

Definition at line 196 of file def.cpp.

Referenced by DialogSpline::Angle1Changed(), DialogSpline::Angle2Changed(), DialogMove::angleChanged(), DialogRotation::angleChanged(), DialogCurveIntersectAxis::AngleTextChanged(), DialogEndLine::AngleTextChanged(), DialogLineIntersectAxis::AngleTextChanged(), DialogMove::editAngleFormula(), DialogRotation::editAngleFormula(), DialogMove::editRotationFormula(), DialogCurveIntersectAxis::EvalAngle(), DialogEndLine::EvalAngle(), DialogLineIntersectAxis::EvalAngle(), DialogSpline::EvalAngle1(), DialogSplinePath::EvalAngle1(), DialogSpline::EvalAngle2(), DialogSplinePath::EvalAngle2(), DialogEllipticalArc::EvalAngles(), DialogArc::EvalF(), DialogArcWithLength::EvalF(), DialogMove::evaluateAngle(), DialogRotation::evaluateAngle(), DialogMove::evaluateRotation(), DialogArc::F1Changed(), DialogArcWithLength::F1Changed(), DialogEllipticalArc::F1Changed(), DialogArc::F2Changed(), DialogEllipticalArc::F2Changed(), DialogCurveIntersectAxis::FXAngle(), DialogEndLine::FXAngle(), DialogLineIntersectAxis::FXAngle(), DialogSpline::FXAngle1(), DialogSplinePath::FXAngle1(), DialogSpline::FXAngle2(), DialogSplinePath::FXAngle2(), DialogArc::FXF1(), DialogArcWithLength::FXF1(), DialogEllipticalArc::FXF1(), DialogArc::FXF2(), DialogEllipticalArc::FXF2(), DialogEllipticalArc::FXRotationAngle(), VToolMove::GetFormulaAngle(), VToolRotation::GetFormulaAngle(), VToolCurveIntersectAxis::GetFormulaAngle(), VToolEndLine::GetFormulaAngle(), VToolLineIntersectAxis::GetFormulaAngle(), VToolArc::GetFormulaF1(), VToolArcWithLength::GetFormulaF1(), VToolEllipticalArc::GetFormulaF1(), VToolArc::GetFormulaF2(), VToolEllipticalArc::GetFormulaF2(), VToolMove::getFormulaRotation(), VToolEllipticalArc::GetFormulaRotationAngle(), DialogMove::lengthChanged(), DialogEllipticalArc::RotationAngleChanged(), DialogMove::rotationChanged(), VToolOptionsPropertyBrowser::showOptionsToolSpline(), DialogVariables::showUnits(), PatternPieceDialog::updateGrainlineValues(), VToolOptionsPropertyBrowser::updateOptionsToolSpline(), PatternPieceDialog::updatePatternLabelValues(), PatternPieceDialog::updatePieceLabelValues(), and EditFormulaDialog::valueChanged().

◆ degTorad_F

const QString degTorad_F
extern

Definition at line 85 of file def.cpp.

Referenced by VTranslateVars::InitFunctions().

◆ exp_F

const QString exp_F
extern

Definition at line 109 of file def.cpp.

Referenced by VTranslateVars::InitFunctions().

◆ falseStr

◆ fmod_F

const QString fmod_F
extern

Definition at line 118 of file def.cpp.

Referenced by VTranslateVars::InitFunctions().

◆ heightStep

const int heightStep = 6
static

Definition at line 279 of file def.h.

Referenced by VMeasurement::WholeListHeights().

◆ in_Oprt

const QString in_Oprt
extern

Definition at line 131 of file def.cpp.

Referenced by VTranslateVars::InitPostfixOperators().

◆ labelTemplatePlaceholders

const QStringList labelTemplatePlaceholders
extern

Definition at line 164 of file def.cpp.

◆ ln_F

const QString ln_F
extern

Definition at line 108 of file def.cpp.

Referenced by VTranslateVars::InitFunctions().

◆ log10_F

const QString log10_F
extern

Definition at line 106 of file def.cpp.

Referenced by VTranslateVars::InitFunctions().

◆ log2_F

const QString log2_F
extern

Definition at line 105 of file def.cpp.

Referenced by VTranslateVars::InitFunctions().

◆ log_F

const QString log_F
extern

Definition at line 107 of file def.cpp.

Referenced by VTranslateVars::InitFunctions().

◆ LONG_OPTION_NO_HDPI_SCALING

◆ max_F

const QString max_F
extern

Definition at line 115 of file def.cpp.

Referenced by VTranslateVars::InitFunctions().

◆ min_F

const QString min_F
extern

Definition at line 114 of file def.cpp.

Referenced by VTranslateVars::InitFunctions().

◆ mm_Oprt

const QString mm_Oprt
extern

Definition at line 130 of file def.cpp.

Referenced by VTranslateVars::InitPostfixOperators().

◆ pl_author

◆ pl_customer

◆ pl_date

◆ pl_height

◆ pl_mExt

◆ pl_mFabric

◆ pl_mFileName

◆ pl_mInterfacing

◆ pl_mInterlining

◆ pl_mLining

◆ pl_pAnnotation

◆ pl_patternName

◆ pl_patternNumber

◆ pl_pExt

◆ pl_pFileName

◆ pl_pFoldPosition

◆ pl_pLetter

◆ pl_pName

◆ pl_pOrientation

◆ pl_pQuantity

◆ pl_pRotation

◆ pl_pTilt

◆ pl_size

◆ pl_time

◆ pl_wCut

◆ pl_wOnFold

◆ PrintDPI

◆ radTodeg_F

const QString radTodeg_F
extern

Definition at line 86 of file def.cpp.

Referenced by VTranslateVars::InitFunctions().

◆ rint_F

const QString rint_F
extern

Definition at line 112 of file def.cpp.

Referenced by VTranslateVars::InitFunctions().

◆ sign_F

const QString sign_F
extern

Definition at line 111 of file def.cpp.

Referenced by VTranslateVars::InitFunctions().

◆ sin_F

const QString sin_F
extern

Definition at line 87 of file def.cpp.

Referenced by VTranslateVars::InitFunctions().

◆ sinD_F

const QString sinD_F
extern

Definition at line 99 of file def.cpp.

Referenced by VTranslateVars::InitFunctions().

◆ sinh_F

const QString sinh_F
extern

Definition at line 93 of file def.cpp.

Referenced by VTranslateVars::InitFunctions().

◆ sizeStep

const int sizeStep = 2
static

Definition at line 286 of file def.h.

Referenced by VMeasurement::WholeListSizes().

◆ sqrt_F

const QString sqrt_F
extern

Definition at line 110 of file def.cpp.

Referenced by VTranslateVars::InitFunctions().

◆ strBisector

const QString strBisector
extern

Definition at line 628 of file def.cpp.

Referenced by notchSubTypeToString(), and stringToNotchSubType().

◆ strIntersection

const QString strIntersection
extern

Definition at line 629 of file def.cpp.

Referenced by notchSubTypeToString(), and stringToNotchSubType().

◆ strSlit

const QString strSlit
extern

Definition at line 565 of file def.cpp.

Referenced by notchTypeToString(), VAbstractPattern::ParseSANode(), and stringToNotchType().

◆ strStraightforward

const QString strStraightforward
extern

◆ sum_F

const QString sum_F
extern

Definition at line 116 of file def.cpp.

Referenced by VTranslateVars::InitFunctions().

◆ tan_F

const QString tan_F
extern

Definition at line 89 of file def.cpp.

Referenced by VTranslateVars::InitFunctions().

◆ tanD_F

const QString tanD_F
extern

Definition at line 101 of file def.cpp.

Referenced by VTranslateVars::InitFunctions().

◆ tanh_F

const QString tanh_F
extern

Definition at line 95 of file def.cpp.

Referenced by VTranslateVars::InitFunctions().

◆ trueStr

◆ unitCM

◆ unitINCH

const QString unitINCH
extern

◆ unitMM

const QString unitMM
extern

◆ unitPX

const QString unitPX
extern

Definition at line 203 of file def.cpp.

Referenced by StrToUnits(), and UnitsToStr().