|
QCAD
Open Source 2D CAD
|
Go to the documentation of this file.
29 #define RDEFAULT_MIN1 -1
33 #define RDEFAULT_DOT '.'
47 static QString formatLinear(
double length,
RS::Unit unit,
49 int prec,
bool showUnit=
false,
50 bool showLeadingZeroes=
true,
51 bool showTrailingZeroes=
false,
52 bool onlyPreciseResult=
false,
54 static QString formatScientific(
double length,
RS::Unit unit,
55 int prec,
bool showUnit=
false,
56 bool showLeadingZeroes=
true,
57 bool showTrailingZeroes=
false,
58 bool onlyPreciseResult=
false);
59 static QString formatDecimal(
double length,
RS::Unit unit,
60 int prec,
bool showUnit=
false,
61 bool showLeadingZeroes=
true,
62 bool showTrailingZeroes=
false,
63 bool onlyPreciseResult=
false,
65 static QString formatEngineering(
double length,
RS::Unit unit,
66 int prec,
bool showUnit=
false,
67 bool showLeadingZeroes=
true,
68 bool showTrailingZeroes=
false,
69 bool onlyPreciseResult=
false);
70 static QString formatArchitectural(
double length,
RS::Unit unit,
71 int prec,
bool showUnit=
false,
72 bool showLeadingZeroes=
true,
73 bool showTrailingZeroes=
false,
74 bool onlyPreciseResult=
false);
75 static QString formatFractional(
double length,
RS::Unit unit,
76 int prec,
bool showUnit=
false,
77 bool showLeadingZeroes=
true,
78 bool showTrailingZeroes=
false,
79 bool onlyPreciseResult=
false);
83 bool showLeadingZeroes=
true,
84 bool showTrailingZeroes=
false,
98 static double getFactorToM(
RS::Unit unit);
99 static RS::Unit parseUnit(
const QString& str);
100 static QString unitToSymbol(
RS::Unit unit,
bool asText=
false);
101 static QString unitToName(
RS::Unit unit,
bool tr=
true);
102 static QString getLabel(
double v,
RDocument& document,
104 bool forceSuppressTrailingZeroes=
false,
105 bool onlyPreciseResult=
false,
108 static QString doubleToString(
double value,
double prec,
109 bool showLeadingZeroes=
true,
bool showTrailingZeroes=
false,
111 static QString doubleToString(
double value,
int prec,
112 bool showLeadingZeroes=
true,
bool showTrailingZeroes=
false,
117 bool showLeadingZeroes=
true,
bool showTrailingZeroes=
false,
120 return doubleToString(value, prec, showLeadingZeroes, showTrailingZeroes, decimalSeparator);
Unit
Enum of supported units (values correspond to DXF spec).
Definition: RS.h:317
LinearFormat
Format for length values.
Definition: RS.h:362
Conversion methods for units.
Definition: RUnit.h:43
Represents a 3d vector (x/y/z).
Definition: RVector.h:46
Q_DECLARE_METATYPE(RMath *)
A graphics document contains and owns entities, layers, user coordinate systems, variables,...
Definition: RDocument.h:72
AngleFormat
Angle format for printing angles.
Definition: RS.h:346
#define RDEFAULT_MIN1
Copyright (c) 2011-2018 by Andrew Mustun.
Definition: RUnit.h:29
#define RDEFAULT_DOT
Definition: RUnit.h:33
static QString doubleToStringDec(double value, int prec, bool showLeadingZeroes=true, bool showTrailingZeroes=false, char decimalSeparator=RDEFAULT_DOT)
Definition: RUnit.h:116
#define QCADCORE_EXPORT
Definition: core_global.h:10