Refactoring. Use QChar instead of QString where possible.
--HG-- branch : develop
This commit is contained in:
parent
ef87a062fb
commit
3970bbdbc0
|
@ -3168,7 +3168,7 @@ void TMainWindow::ImportIndividualMeasurements(const QxtCsvModel &csv)
|
|||
{
|
||||
IndividualMeasurement()
|
||||
: name(),
|
||||
value("0"),
|
||||
value('0'),
|
||||
fullName(),
|
||||
description()
|
||||
{}
|
||||
|
|
|
@ -100,7 +100,7 @@ void VCommandLine::InitOptions(VCommandLineOptions &options, QMap<QString, int>
|
|||
translate("VCommandLine", "Number corresponding to output format (default = "
|
||||
"0, export mode):") +
|
||||
DialogSaveLayout::MakeHelpFormatList(),
|
||||
translate("VCommandLine", "Format number"), "0"));
|
||||
translate("VCommandLine", "Format number"), QChar('0')));
|
||||
|
||||
optionsIndex.insert(LONG_OPTION_BINARYDXF, index++);
|
||||
options.append(new QCommandLineOption(QStringList() << LONG_OPTION_BINARYDXF,
|
||||
|
@ -144,7 +144,7 @@ void VCommandLine::InitOptions(VCommandLineOptions &options, QMap<QString, int>
|
|||
translate("VCommandLine", "Number corresponding to layout page template "
|
||||
"(default = 0, export mode):") +
|
||||
DialogLayoutSettings::MakeHelpTemplateList(),
|
||||
translate("VCommandLine", "Template number"), "0"));
|
||||
translate("VCommandLine", "Template number"), QChar('0')));
|
||||
|
||||
optionsIndex.insert(LONG_OPTION_PAGEW, index++);
|
||||
options.append(new QCommandLineOption(QStringList() << SINGLE_OPTION_PAGEW << LONG_OPTION_PAGEW,
|
||||
|
@ -259,7 +259,7 @@ void VCommandLine::InitOptions(VCommandLineOptions &options, QMap<QString, int>
|
|||
options.append(new QCommandLineOption(QStringList() << SINGLE_OPTION_GROUPPING << LONG_OPTION_GROUPPING,
|
||||
translate("VCommandLine", "Sets layout groupping cases (export mode): %1.")
|
||||
.arg(DialogLayoutSettings::MakeGroupsHelp()),
|
||||
translate("VCommandLine", "Grouping type"), "2"));
|
||||
translate("VCommandLine", "Grouping type"), QChar('2')));
|
||||
|
||||
optionsIndex.insert(LONG_OPTION_TEST, index++);
|
||||
options.append(new QCommandLineOption(QStringList() << SINGLE_OPTION_TEST << LONG_OPTION_TEST,
|
||||
|
@ -323,7 +323,7 @@ void VCommandLine::InitOptions(VCommandLineOptions &options, QMap<QString, int>
|
|||
"(default = 0, export mode with tiled pdf "
|
||||
"format):") +
|
||||
DialogLayoutSettings::MakeHelpTiledPdfTemplateList(),
|
||||
translate("VCommandLine", "Template number"), "0"));
|
||||
translate("VCommandLine", "Template number"), QChar('0')));
|
||||
|
||||
optionsIndex.insert(LONG_OPTION_TILED_PDF_LEFT_MARGIN, index++);
|
||||
options.append(new QCommandLineOption(QStringList() << LONG_OPTION_TILED_PDF_LEFT_MARGIN,
|
||||
|
|
|
@ -269,7 +269,7 @@ void DialogFinalMeasurements::Add()
|
|||
|
||||
VFinalMeasurement m;
|
||||
m.name = tr("measurement");
|
||||
m.formula = "0";
|
||||
m.formula = QLatin1Char('0');
|
||||
|
||||
m_measurements.append(m);
|
||||
|
||||
|
|
|
@ -460,7 +460,7 @@ QString DialogHistory::PointName(quint32 pointId)
|
|||
//---------------------------------------------------------------------------------------------------------------------
|
||||
quint32 DialogHistory::AttrUInt(const QDomElement &domElement, const QString &name)
|
||||
{
|
||||
return doc->GetParametrUInt(domElement, name, "0");
|
||||
return doc->GetParametrUInt(domElement, name, QChar('0'));
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -563,7 +563,7 @@ void DialogSaveLayout::PathChanged(const QString &text)
|
|||
void DialogSaveLayout::ShowExample()
|
||||
{
|
||||
const LayoutExportFormats currentFormat = Format();
|
||||
ui->labelExample->setText(tr("Example:") + FileName() + QLatin1String("1") + ExportFromatSuffix(currentFormat));
|
||||
ui->labelExample->setText(tr("Example:") + FileName() + QLatin1Char('1') + ExportFromatSuffix(currentFormat));
|
||||
|
||||
ui->checkBoxBinaryDXF->setEnabled(false);
|
||||
ui->groupBoxPaperFormat->setEnabled(false);
|
||||
|
|
|
@ -677,7 +677,7 @@ VNodeDetail VPattern::ParseDetailNode(const QDomElement &domElement) const
|
|||
const quint32 id = GetParametrUInt(domElement, AttrIdObject, NULL_ID_STR);
|
||||
const qreal mx = GetParametrDouble(domElement, AttrMx, "0.0");
|
||||
const qreal my = GetParametrDouble(domElement, AttrMy, "0.0");
|
||||
const bool reverse = GetParametrUInt(domElement, VAbstractPattern::AttrNodeReverse, "0");
|
||||
const bool reverse = GetParametrUInt(domElement, VAbstractPattern::AttrNodeReverse, QChar('0'));
|
||||
const NodeDetail nodeType = NodeDetail::Contour;
|
||||
|
||||
const QString t = GetParametrString(domElement, AttrType, "NodePoint");
|
||||
|
@ -900,7 +900,7 @@ void VPattern::ParseDetailElement(QDomElement &domElement, const Document &parse
|
|||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VPattern::ParseDetailInternals(const QDomElement &domElement, VPiece &detail) const
|
||||
{
|
||||
const uint version = GetParametrUInt(domElement, AttrVersion, "1");
|
||||
const uint version = GetParametrUInt(domElement, AttrVersion, QChar('1'));
|
||||
|
||||
const QStringList tags = QStringList() << TagNodes
|
||||
<< TagData
|
||||
|
@ -935,7 +935,7 @@ void VPattern::ParseDetailInternals(const QDomElement &domElement, VPiece &detai
|
|||
// TODO. Delete if minimal supported version is 0.4.0
|
||||
Q_STATIC_ASSERT_X(VPatternConverter::PatternMinVer < CONVERTER_VERSION_CHECK(0, 4, 0),
|
||||
"Time to refactor the code.");
|
||||
const bool closed = GetParametrUInt(domElement, AttrClosed, "1");
|
||||
const bool closed = GetParametrUInt(domElement, AttrClosed, QChar('1'));
|
||||
const qreal width = GetParametrDouble(domElement, AttrWidth, "0.0");
|
||||
futurePathV1 = QtConcurrent::run(this, &VPattern::ParseDetailNodes, element, width, closed);
|
||||
}
|
||||
|
@ -1047,13 +1047,14 @@ VPieceLabelData VPattern::ParsePieceDataTag(const QDomElement &domElement, VPiec
|
|||
ppData.SetRotationWay(GetParametrEmptyString(domElement, AttrRotationWay));
|
||||
ppData.SetTilt(GetParametrEmptyString(domElement, AttrTilt));
|
||||
ppData.SetFoldPosition(GetParametrEmptyString(domElement, AttrFoldPosition));
|
||||
ppData.SetQuantity(static_cast<int>(GetParametrUInt(domElement, AttrQuantity, "1")));
|
||||
ppData.SetQuantity(static_cast<int>(GetParametrUInt(domElement, AttrQuantity, QChar('1'))));
|
||||
ppData.SetOnFold(GetParametrBool(domElement, AttrOnFold, falseStr));
|
||||
ppData.SetPos(QPointF(GetParametrDouble(domElement, AttrMx, "0"), GetParametrDouble(domElement, AttrMy, "0")));
|
||||
ppData.SetLabelWidth(GetParametrString(domElement, AttrWidth, "1"));
|
||||
ppData.SetLabelHeight(GetParametrString(domElement, AttrHeight, "1"));
|
||||
ppData.SetFontSize(static_cast<int>(GetParametrUInt(domElement, VToolSeamAllowance::AttrFont, "0")));
|
||||
ppData.SetRotation(GetParametrString(domElement, AttrRotation, "0"));
|
||||
ppData.SetPos(QPointF(GetParametrDouble(domElement, AttrMx, QChar('0')),
|
||||
GetParametrDouble(domElement, AttrMy, QChar('0'))));
|
||||
ppData.SetLabelWidth(GetParametrString(domElement, AttrWidth, QChar('1')));
|
||||
ppData.SetLabelHeight(GetParametrString(domElement, AttrHeight, QChar('1')));
|
||||
ppData.SetFontSize(static_cast<int>(GetParametrUInt(domElement, VToolSeamAllowance::AttrFont, QChar('0'))));
|
||||
ppData.SetRotation(GetParametrString(domElement, AttrRotation, QChar('0')));
|
||||
ppData.SetCenterPin(GetParametrUInt(domElement, VToolSeamAllowance::AttrCenterPin, NULL_ID_STR));
|
||||
ppData.SetTopLeftPin(GetParametrUInt(domElement, VToolSeamAllowance::AttrTopLeftPin, NULL_ID_STR));
|
||||
ppData.SetBottomRightPin(GetParametrUInt(domElement, VToolSeamAllowance::AttrBottomRightPin, NULL_ID_STR));
|
||||
|
@ -1065,11 +1066,12 @@ VPieceLabelData VPattern::ParsePieceDataTag(const QDomElement &domElement, VPiec
|
|||
VPatternLabelData VPattern::ParsePiecePatternInfo(const QDomElement &domElement, VPatternLabelData patternInfo) const
|
||||
{
|
||||
patternInfo.SetVisible(GetParametrBool(domElement, AttrVisible, trueStr));
|
||||
patternInfo.SetPos(QPointF(GetParametrDouble(domElement, AttrMx, "0"), GetParametrDouble(domElement, AttrMy, "0")));
|
||||
patternInfo.SetLabelWidth(GetParametrString(domElement, AttrWidth, "1"));
|
||||
patternInfo.SetLabelHeight(GetParametrString(domElement, AttrHeight, "1"));
|
||||
patternInfo.SetFontSize(static_cast<int>(GetParametrUInt(domElement, VToolSeamAllowance::AttrFont, "0")));
|
||||
patternInfo.SetRotation(GetParametrString(domElement, AttrRotation, "0"));
|
||||
patternInfo.SetPos(QPointF(GetParametrDouble(domElement, AttrMx, QChar('0')),
|
||||
GetParametrDouble(domElement, AttrMy, QChar('0'))));
|
||||
patternInfo.SetLabelWidth(GetParametrString(domElement, AttrWidth, QChar('1')));
|
||||
patternInfo.SetLabelHeight(GetParametrString(domElement, AttrHeight, QChar('1')));
|
||||
patternInfo.SetFontSize(static_cast<int>(GetParametrUInt(domElement, VToolSeamAllowance::AttrFont, QChar('0'))));
|
||||
patternInfo.SetRotation(GetParametrString(domElement, AttrRotation, QChar('0')));
|
||||
patternInfo.SetCenterPin(GetParametrUInt(domElement, VToolSeamAllowance::AttrCenterPin, NULL_ID_STR));
|
||||
patternInfo.SetTopLeftPin(GetParametrUInt(domElement, VToolSeamAllowance::AttrTopLeftPin, NULL_ID_STR));
|
||||
patternInfo.SetBottomRightPin(GetParametrUInt(domElement, VToolSeamAllowance::AttrBottomRightPin, NULL_ID_STR));
|
||||
|
@ -1080,10 +1082,11 @@ VPatternLabelData VPattern::ParsePiecePatternInfo(const QDomElement &domElement,
|
|||
VGrainlineData VPattern::ParsePieceGrainline(const QDomElement &domElement, VGrainlineData gGeometry) const
|
||||
{
|
||||
gGeometry.SetVisible(GetParametrBool(domElement, AttrVisible, falseStr));
|
||||
gGeometry.SetPos(QPointF(GetParametrDouble(domElement, AttrMx, "0"), GetParametrDouble(domElement, AttrMy, "0")));
|
||||
gGeometry.SetLength(GetParametrString(domElement, AttrLength, "1"));
|
||||
gGeometry.SetPos(QPointF(GetParametrDouble(domElement, AttrMx, QChar('0')),
|
||||
GetParametrDouble(domElement, AttrMy, QChar('0'))));
|
||||
gGeometry.SetLength(GetParametrString(domElement, AttrLength, QChar('1')));
|
||||
gGeometry.SetRotation(GetParametrString(domElement, AttrRotation, "90"));
|
||||
gGeometry.SetArrowType(static_cast<ArrowType>(GetParametrUInt(domElement, AttrArrows, "0")));
|
||||
gGeometry.SetArrowType(static_cast<ArrowType>(GetParametrUInt(domElement, AttrArrows, QChar('0'))));
|
||||
gGeometry.SetCenterPin(GetParametrUInt(domElement, VToolSeamAllowance::AttrCenterPin, NULL_ID_STR));
|
||||
gGeometry.SetTopPin(GetParametrUInt(domElement, VToolSeamAllowance::AttrTopPin, NULL_ID_STR));
|
||||
gGeometry.SetBottomPin(GetParametrUInt(domElement, VToolSeamAllowance::AttrBottomPin, NULL_ID_STR));
|
||||
|
@ -1696,7 +1699,7 @@ void VPattern::ParseToolPointOfContact(VMainGraphicsScene *scene, QDomElement &d
|
|||
initData.typeCreation = Source::FromFile;
|
||||
|
||||
PointsCommonAttributes(domElement, initData);
|
||||
initData.radius = GetParametrString(domElement, AttrRadius, "0");
|
||||
initData.radius = GetParametrString(domElement, AttrRadius, QChar('0'));
|
||||
const QString f = initData.radius;//need for saving fixed formula;
|
||||
initData.center = GetParametrUInt(domElement, AttrCenter, NULL_ID_STR);
|
||||
initData.firstPointId = GetParametrUInt(domElement, AttrFirstPoint, NULL_ID_STR);
|
||||
|
@ -1824,7 +1827,7 @@ void VPattern::ParsePlaceLabel(QDomElement &domElement, const Document &parse)
|
|||
initData.angle = GetParametrString(domElement, AttrAngle, "0.0");
|
||||
const QString angle = initData.angle;//need for saving fixed formula;
|
||||
|
||||
initData.type = static_cast<PlaceLabelType>(GetParametrUInt(domElement, AttrPlaceLabelType, "0"));
|
||||
initData.type = static_cast<PlaceLabelType>(GetParametrUInt(domElement, AttrPlaceLabelType, QChar('0')));
|
||||
|
||||
VToolPlaceLabel::Create(initData);
|
||||
|
||||
|
@ -1959,7 +1962,7 @@ void VPattern::ParseToolCutSpline(VMainGraphicsScene *scene, QDomElement &domEle
|
|||
initData.typeCreation = Source::FromFile;
|
||||
|
||||
PointsCommonAttributes(domElement, initData);
|
||||
initData.formula = GetParametrString(domElement, AttrLength, "0");
|
||||
initData.formula = GetParametrString(domElement, AttrLength, QChar('0'));
|
||||
const QString f = initData.formula;//need for saving fixed formula;
|
||||
initData.splineId = GetParametrUInt(domElement, VToolCutSpline::AttrSpline, NULL_ID_STR);
|
||||
|
||||
|
@ -2002,7 +2005,7 @@ void VPattern::ParseToolCutSplinePath(VMainGraphicsScene *scene, QDomElement &do
|
|||
initData.typeCreation = Source::FromFile;
|
||||
|
||||
PointsCommonAttributes(domElement, initData);
|
||||
initData.formula = GetParametrString(domElement, AttrLength, "0");
|
||||
initData.formula = GetParametrString(domElement, AttrLength, QChar('0'));
|
||||
const QString f = initData.formula;//need for saving fixed formula;
|
||||
initData.splinePathId = GetParametrUInt(domElement, VToolCutSplinePath::AttrSplinePath, NULL_ID_STR);
|
||||
|
||||
|
@ -2045,7 +2048,7 @@ void VPattern::ParseToolCutArc(VMainGraphicsScene *scene, QDomElement &domElemen
|
|||
initData.typeCreation = Source::FromFile;
|
||||
|
||||
PointsCommonAttributes(domElement, initData);
|
||||
initData.formula = GetParametrString(domElement, AttrLength, "0");
|
||||
initData.formula = GetParametrString(domElement, AttrLength, QChar('0'));
|
||||
const QString f = initData.formula;//need for saving fixed formula;
|
||||
initData.arcId = GetParametrUInt(domElement, AttrArc, NULL_ID_STR);
|
||||
|
||||
|
@ -2189,7 +2192,7 @@ void VPattern::ParseToolPointOfIntersectionArcs(VMainGraphicsScene *scene, const
|
|||
PointsCommonAttributes(domElement, initData);
|
||||
initData.firstArcId = GetParametrUInt(domElement, AttrFirstArc, NULL_ID_STR);
|
||||
initData.secondArcId = GetParametrUInt(domElement, AttrSecondArc, NULL_ID_STR);
|
||||
initData.pType = static_cast<CrossCirclesPoint>(GetParametrUInt(domElement, AttrCrossPoint, "1"));
|
||||
initData.pType = static_cast<CrossCirclesPoint>(GetParametrUInt(domElement, AttrCrossPoint, QChar('1')));
|
||||
|
||||
VToolPointOfIntersectionArcs::Create(initData);
|
||||
}
|
||||
|
@ -2224,7 +2227,7 @@ void VPattern::ParseToolPointOfIntersectionCircles(VMainGraphicsScene *scene, QD
|
|||
const QString c1R = initData.firstCircleRadius;
|
||||
initData.secondCircleRadius = GetParametrString(domElement, AttrC2Radius);
|
||||
const QString c2R = initData.secondCircleRadius;
|
||||
initData.crossPoint = static_cast<CrossCirclesPoint>(GetParametrUInt(domElement, AttrCrossPoint, "1"));
|
||||
initData.crossPoint = static_cast<CrossCirclesPoint>(GetParametrUInt(domElement, AttrCrossPoint, QChar('1')));
|
||||
|
||||
VToolPointOfIntersectionCircles::Create(initData);
|
||||
//Rewrite attribute formula. Need for situation when we have wrong formula.
|
||||
|
@ -2263,8 +2266,8 @@ void VPattern::ParseToolPointOfIntersectionCurves(VMainGraphicsScene *scene, QDo
|
|||
PointsCommonAttributes(domElement, initData);
|
||||
initData.firstCurveId = GetParametrUInt(domElement, AttrCurve1, NULL_ID_STR);
|
||||
initData.secondCurveId = GetParametrUInt(domElement, AttrCurve2, NULL_ID_STR);
|
||||
initData.vCrossPoint = static_cast<VCrossCurvesPoint>(GetParametrUInt(domElement, AttrVCrossPoint, "1"));
|
||||
initData.hCrossPoint = static_cast<HCrossCurvesPoint>(GetParametrUInt(domElement, AttrHCrossPoint, "1"));
|
||||
initData.vCrossPoint = static_cast<VCrossCurvesPoint>(GetParametrUInt(domElement, AttrVCrossPoint, QChar('1')));
|
||||
initData.hCrossPoint = static_cast<HCrossCurvesPoint>(GetParametrUInt(domElement, AttrHCrossPoint, QChar('1')));
|
||||
|
||||
VToolPointOfIntersectionCurves::Create(initData);
|
||||
}
|
||||
|
@ -2297,7 +2300,7 @@ void VPattern::ParseToolPointFromCircleAndTangent(VMainGraphicsScene *scene, QDo
|
|||
initData.tangentPointId = GetParametrUInt(domElement, AttrTangent, NULL_ID_STR);
|
||||
initData.circleRadius = GetParametrString(domElement, AttrCRadius);
|
||||
const QString cR = initData.circleRadius;
|
||||
initData.crossPoint = static_cast<CrossCirclesPoint>(GetParametrUInt(domElement, AttrCrossPoint, "1"));
|
||||
initData.crossPoint = static_cast<CrossCirclesPoint>(GetParametrUInt(domElement, AttrCrossPoint, QChar('1')));
|
||||
|
||||
VToolPointFromCircleAndTangent::Create(initData);
|
||||
//Rewrite attribute formula. Need for situation when we have wrong formula.
|
||||
|
@ -2335,7 +2338,7 @@ void VPattern::ParseToolPointFromArcAndTangent(VMainGraphicsScene *scene, const
|
|||
PointsCommonAttributes(domElement, initData);
|
||||
initData.arcId = GetParametrUInt(domElement, AttrArc, NULL_ID_STR);
|
||||
initData.tangentPointId = GetParametrUInt(domElement, AttrTangent, NULL_ID_STR);
|
||||
initData.crossPoint = static_cast<CrossCirclesPoint>(GetParametrUInt(domElement, AttrCrossPoint, "1"));
|
||||
initData.crossPoint = static_cast<CrossCirclesPoint>(GetParametrUInt(domElement, AttrCrossPoint, QChar('1')));
|
||||
|
||||
VToolPointFromArcAndTangent::Create(initData);
|
||||
}
|
||||
|
@ -2418,7 +2421,7 @@ void VPattern::ParseOldToolSpline(VMainGraphicsScene *scene, const QDomElement &
|
|||
const qreal kAsm2 = GetParametrDouble(domElement, AttrKAsm2, "1.0");
|
||||
const qreal kCurve = GetParametrDouble(domElement, AttrKCurve, "1.0");
|
||||
const QString color = GetParametrString(domElement, AttrColor, ColorBlack);
|
||||
const quint32 duplicate = GetParametrUInt(domElement, AttrDuplicate, "0");
|
||||
const quint32 duplicate = GetParametrUInt(domElement, AttrDuplicate, QChar('0'));
|
||||
|
||||
const auto p1 = data->GeometricObject<VPointF>(point1);
|
||||
const auto p4 = data->GeometricObject<VPointF>(point4);
|
||||
|
@ -2459,22 +2462,22 @@ void VPattern::ParseToolSpline(VMainGraphicsScene *scene, QDomElement &domElemen
|
|||
initData.point1 = GetParametrUInt(domElement, AttrPoint1, NULL_ID_STR);
|
||||
initData.point4 = GetParametrUInt(domElement, AttrPoint4, NULL_ID_STR);
|
||||
|
||||
initData.a1 = GetParametrString(domElement, AttrAngle1, "0");
|
||||
initData.a1 = GetParametrString(domElement, AttrAngle1, QChar('0'));
|
||||
const QString angle1 = initData.a1;//need for saving fixed formula;
|
||||
|
||||
initData.a2 = GetParametrString(domElement, AttrAngle2, "0");
|
||||
initData.a2 = GetParametrString(domElement, AttrAngle2, QChar('0'));
|
||||
const QString angle2 = initData.a2;//need for saving fixed formula;
|
||||
|
||||
initData.l1 = GetParametrString(domElement, AttrLength1, "0");
|
||||
initData.l1 = GetParametrString(domElement, AttrLength1, QChar('0'));
|
||||
const QString length1 = initData.l1;//need for saving fixed formula;
|
||||
|
||||
initData.l2 = GetParametrString(domElement, AttrLength2, "0");
|
||||
initData.l2 = GetParametrString(domElement, AttrLength2, QChar('0'));
|
||||
const QString length2 = initData.l2;//need for saving fixed formula;
|
||||
|
||||
initData.color = GetParametrString(domElement, AttrColor, ColorBlack);
|
||||
initData.penStyle = GetParametrString(domElement, AttrPenStyle, TypeLineLine);
|
||||
initData.duplicate = GetParametrUInt(domElement, AttrDuplicate, "0");
|
||||
initData.approximationScale = GetParametrDouble(domElement, AttrAScale, "0");
|
||||
initData.duplicate = GetParametrUInt(domElement, AttrDuplicate, QChar('0'));
|
||||
initData.approximationScale = GetParametrDouble(domElement, AttrAScale, QChar('0'));
|
||||
|
||||
VToolSpline *spl = VToolSpline::Create(initData);
|
||||
|
||||
|
@ -2534,8 +2537,8 @@ void VPattern::ParseToolCubicBezier(VMainGraphicsScene *scene, const QDomElement
|
|||
|
||||
const QString color = GetParametrString(domElement, AttrColor, ColorBlack);
|
||||
const QString penStyle = GetParametrString(domElement, AttrPenStyle, TypeLineLine);
|
||||
const quint32 duplicate = GetParametrUInt(domElement, AttrDuplicate, "0");
|
||||
const qreal approximationScale = GetParametrDouble(domElement, AttrAScale, "0");
|
||||
const quint32 duplicate = GetParametrUInt(domElement, AttrDuplicate, QChar('0'));
|
||||
const qreal approximationScale = GetParametrDouble(domElement, AttrAScale, QChar('0'));
|
||||
|
||||
auto p1 = data->GeometricObject<VPointF>(point1);
|
||||
auto p2 = data->GeometricObject<VPointF>(point2);
|
||||
|
@ -2580,8 +2583,8 @@ void VPattern::ParseOldToolSplinePath(VMainGraphicsScene *scene, const QDomEleme
|
|||
ToolsCommonAttributes(domElement, initData.id);
|
||||
const qreal kCurve = GetParametrDouble(domElement, AttrKCurve, "1.0");
|
||||
const QString color = GetParametrString(domElement, AttrColor, ColorBlack);
|
||||
const quint32 duplicate = GetParametrUInt(domElement, AttrDuplicate, "0");
|
||||
const qreal approximationScale = GetParametrDouble(domElement, AttrAScale, "0");
|
||||
const quint32 duplicate = GetParametrUInt(domElement, AttrDuplicate, QChar('0'));
|
||||
const qreal approximationScale = GetParametrDouble(domElement, AttrAScale, QChar('0'));
|
||||
|
||||
QVector<VFSplinePoint> points;
|
||||
|
||||
|
@ -2595,7 +2598,7 @@ void VPattern::ParseOldToolSplinePath(VMainGraphicsScene *scene, const QDomEleme
|
|||
if (element.tagName() == AttrPathPoint)
|
||||
{
|
||||
const qreal kAsm1 = GetParametrDouble(element, AttrKAsm1, "1.0");
|
||||
const qreal angle = GetParametrDouble(element, AttrAngle, "0");
|
||||
const qreal angle = GetParametrDouble(element, AttrAngle, QChar('0'));
|
||||
const qreal kAsm2 = GetParametrDouble(element, AttrKAsm2, "1.0");
|
||||
const quint32 pSpline = GetParametrUInt(element, AttrPSpline, NULL_ID_STR);
|
||||
const VPointF p = *data->GeometricObject<VPointF>(pSpline);
|
||||
|
@ -2649,8 +2652,8 @@ void VPattern::ParseToolSplinePath(VMainGraphicsScene *scene, const QDomElement
|
|||
ToolsCommonAttributes(domElement, initData.id);
|
||||
initData.color = GetParametrString(domElement, AttrColor, ColorBlack);
|
||||
initData.penStyle = GetParametrString(domElement, AttrPenStyle, TypeLineLine);
|
||||
initData.duplicate = GetParametrUInt(domElement, AttrDuplicate, "0");
|
||||
initData.approximationScale = GetParametrDouble(domElement, AttrAScale, "0");
|
||||
initData.duplicate = GetParametrUInt(domElement, AttrDuplicate, QChar('0'));
|
||||
initData.approximationScale = GetParametrDouble(domElement, AttrAScale, QChar('0'));
|
||||
|
||||
const QDomNodeList nodeList = domElement.childNodes();
|
||||
const qint32 num = nodeList.size();
|
||||
|
@ -2659,10 +2662,10 @@ void VPattern::ParseToolSplinePath(VMainGraphicsScene *scene, const QDomElement
|
|||
const QDomElement element = nodeList.at(i).toElement();
|
||||
if (not element.isNull() && element.tagName() == AttrPathPoint)
|
||||
{
|
||||
initData.a1.append(GetParametrString(element, AttrAngle1, "0"));
|
||||
initData.a2.append(GetParametrString(element, AttrAngle2, "0"));
|
||||
initData.l1.append(GetParametrString(element, AttrLength1, "0"));
|
||||
initData.l2.append(GetParametrString(element, AttrLength2, "0"));
|
||||
initData.a1.append(GetParametrString(element, AttrAngle1, QChar('0')));
|
||||
initData.a2.append(GetParametrString(element, AttrAngle2, QChar('0')));
|
||||
initData.l1.append(GetParametrString(element, AttrLength1, QChar('0')));
|
||||
initData.l2.append(GetParametrString(element, AttrLength2, QChar('0')));
|
||||
const quint32 pSpline = GetParametrUInt(element, AttrPSpline, NULL_ID_STR);
|
||||
initData.points.append(pSpline);
|
||||
|
||||
|
@ -2741,8 +2744,8 @@ void VPattern::ParseToolCubicBezierPath(VMainGraphicsScene *scene, const QDomEle
|
|||
ToolsCommonAttributes(domElement, initData.id);
|
||||
const QString color = GetParametrString(domElement, AttrColor, ColorBlack);
|
||||
const QString penStyle = GetParametrString(domElement, AttrPenStyle, TypeLineLine);
|
||||
const quint32 duplicate = GetParametrUInt(domElement, AttrDuplicate, "0");
|
||||
const qreal approximationScale = GetParametrDouble(domElement, AttrAScale, "0");
|
||||
const quint32 duplicate = GetParametrUInt(domElement, AttrDuplicate, QChar('0'));
|
||||
const qreal approximationScale = GetParametrDouble(domElement, AttrAScale, QChar('0'));
|
||||
|
||||
QVector<VPointF> points;
|
||||
|
||||
|
@ -2906,7 +2909,7 @@ void VPattern::ParseToolArc(VMainGraphicsScene *scene, QDomElement &domElement,
|
|||
const QString f2Fix = initData.f2;//need for saving fixed formula;
|
||||
initData.color = GetParametrString(domElement, AttrColor, ColorBlack);
|
||||
initData.penStyle = GetParametrString(domElement, AttrPenStyle, TypeLineLine);
|
||||
initData.approximationScale = GetParametrDouble(domElement, AttrAScale, "0");
|
||||
initData.approximationScale = GetParametrDouble(domElement, AttrAScale, QChar('0'));
|
||||
|
||||
VToolArc::Create(initData);
|
||||
//Rewrite attribute formula. Need for situation when we have wrong formula.
|
||||
|
@ -2958,11 +2961,11 @@ void VPattern::ParseToolEllipticalArc(VMainGraphicsScene *scene, QDomElement &do
|
|||
const QString f1Fix = initData.f1;//need for saving fixed formula;
|
||||
initData.f2 = GetParametrString(domElement, AttrAngle2, "270");
|
||||
const QString f2Fix = initData.f2;//need for saving fixed formula;
|
||||
initData.rotationAngle = GetParametrString(domElement, AttrRotationAngle, "0");
|
||||
initData.rotationAngle = GetParametrString(domElement, AttrRotationAngle, QChar('0'));
|
||||
const QString frotationFix = initData.rotationAngle;//need for saving fixed formula;
|
||||
initData.color = GetParametrString(domElement, AttrColor, ColorBlack);
|
||||
initData.penStyle = GetParametrString(domElement, AttrPenStyle, TypeLineLine);
|
||||
initData.approximationScale = GetParametrDouble(domElement, AttrAScale, "0");
|
||||
initData.approximationScale = GetParametrDouble(domElement, AttrAScale, QChar('0'));
|
||||
|
||||
VToolEllipticalArc::Create(initData);
|
||||
//Rewrite attribute formula. Need for situation when we have wrong formula.
|
||||
|
@ -3216,7 +3219,7 @@ void VPattern::ParseToolFlippingByAxis(VMainGraphicsScene *scene, QDomElement &d
|
|||
|
||||
ToolsCommonAttributes(domElement, initData.id);
|
||||
initData.originPointId = GetParametrUInt(domElement, AttrCenter, NULL_ID_STR);
|
||||
initData.axisType = static_cast<AxisType>(GetParametrUInt(domElement, AttrAxisType, "1"));
|
||||
initData.axisType = static_cast<AxisType>(GetParametrUInt(domElement, AttrAxisType, QChar('1')));
|
||||
initData.suffix = GetParametrString(domElement, AttrSuffix, QString());
|
||||
|
||||
VAbstractOperation::ExtractData(domElement, initData);
|
||||
|
@ -3247,11 +3250,11 @@ void VPattern::ParseToolMove(VMainGraphicsScene *scene, QDomElement &domElement,
|
|||
initData.typeCreation = Source::FromFile;
|
||||
|
||||
ToolsCommonAttributes(domElement, initData.id);
|
||||
initData.formulaAngle = GetParametrString(domElement, AttrAngle, "0");
|
||||
initData.formulaAngle = GetParametrString(domElement, AttrAngle, QChar('0'));
|
||||
const QString a = initData.formulaAngle;//need for saving fixed formula;
|
||||
initData.formulaRotationAngle = GetParametrString(domElement, AttrRotationAngle, "0");
|
||||
initData.formulaRotationAngle = GetParametrString(domElement, AttrRotationAngle, QChar('0'));
|
||||
const QString r = initData.formulaRotationAngle;//need for saving fixed formula;
|
||||
initData.formulaLength = GetParametrString(domElement, AttrLength, "0");
|
||||
initData.formulaLength = GetParametrString(domElement, AttrLength, QChar('0'));
|
||||
const QString len = initData.formulaLength;//need for saving fixed formula;
|
||||
initData.suffix = GetParametrString(domElement, AttrSuffix, QString());
|
||||
initData.rotationOrigin = GetParametrUInt(domElement, AttrCenter, NULL_ID_STR);
|
||||
|
@ -3315,8 +3318,8 @@ QDomElement VPattern::MakeEmptyIncrement(const QString &name)
|
|||
{
|
||||
QDomElement element = createElement(TagIncrement);
|
||||
SetAttribute(element, AttrName, name);
|
||||
SetAttribute(element, AttrFormula, QString("0"));
|
||||
SetAttribute(element, AttrDescription, QString(QString()));
|
||||
SetAttribute(element, AttrFormula, QChar('0'));
|
||||
SetAttribute(element, AttrDescription, QString());
|
||||
return element;
|
||||
}
|
||||
|
||||
|
@ -3644,7 +3647,7 @@ void VPattern::ParseToolsElement(VMainGraphicsScene *scene, const QDomElement &d
|
|||
VToolUnionDetailsInitData initData;
|
||||
initData.indexD1 = GetParametrUInt(domElement, VToolUnionDetails::AttrIndexD1, "-1");
|
||||
initData.indexD2 = GetParametrUInt(domElement, VToolUnionDetails::AttrIndexD2, "-1");
|
||||
initData.version = GetParametrUInt(domElement, AttrVersion, "1");
|
||||
initData.version = GetParametrUInt(domElement, AttrVersion, QChar('1'));
|
||||
initData.scene = scene;
|
||||
initData.doc = this;
|
||||
initData.data = data;
|
||||
|
@ -3732,7 +3735,7 @@ void VPattern::ParsePathElement(VMainGraphicsScene *scene, QDomElement &domEleme
|
|||
|
||||
if (initData.path.GetType() == PiecePathType::InternalPath)
|
||||
{
|
||||
initData.path.SetVisibilityTrigger(GetParametrString(domElement, AttrVisible, "1"));
|
||||
initData.path.SetVisibilityTrigger(GetParametrString(domElement, AttrVisible, QChar('1')));
|
||||
}
|
||||
|
||||
VToolPiecePath::Create(initData);
|
||||
|
@ -3766,7 +3769,7 @@ void VPattern::ParseIncrementsElement(const QDomNode &node, const Document &pars
|
|||
{
|
||||
const QString name = GetParametrString(domElement, AttrName, QString());
|
||||
const QString desc = GetParametrEmptyString(domElement, AttrDescription);
|
||||
const QString formula = GetParametrString(domElement, AttrFormula, "0");
|
||||
const QString formula = GetParametrString(domElement, AttrFormula, QChar('0'));
|
||||
bool ok = false;
|
||||
const qreal value = EvalFormula(data, formula, &ok);
|
||||
|
||||
|
@ -4077,7 +4080,7 @@ int VPattern::GetDefCustomHeight() const
|
|||
const QDomElement domElement = domNode.toElement();
|
||||
if (domElement.isNull() == false)
|
||||
{
|
||||
return static_cast<int>(GetParametrUInt(domElement, AttrDefHeight, QStringLiteral("0")));
|
||||
return static_cast<int>(GetParametrUInt(domElement, AttrDefHeight, QChar('0')));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -4136,7 +4139,7 @@ int VPattern::GetDefCustomSize() const
|
|||
const QDomElement domElement = domNode.toElement();
|
||||
if (domElement.isNull() == false)
|
||||
{
|
||||
return static_cast<int>(GetParametrUInt(domElement, AttrDefSize, QStringLiteral("0")));
|
||||
return static_cast<int>(GetParametrUInt(domElement, AttrDefSize, QChar('0')));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -47,7 +47,7 @@ extern const QString CustomIncrSign;
|
|||
static const quint32 null_id = 0;
|
||||
|
||||
#define NULL_ID null_id//use this value for initialization variables that keeps id values. 0 mean uknown id value.
|
||||
#define NULL_ID_STR "0"
|
||||
#define NULL_ID_STR QChar('0')
|
||||
|
||||
// Detect whether the compiler supports C++11 noexcept exception specifications.
|
||||
# if defined(__clang__)
|
||||
|
|
|
@ -634,7 +634,7 @@ QVector<CustomSARecord> VAbstractPattern::ParsePieceCSARecords(const QDomElement
|
|||
record.reverse = GetParametrBool(element, VAbstractPattern::AttrNodeReverse, falseStr);
|
||||
record.includeType = static_cast<PiecePathIncludeType>(GetParametrUInt(element,
|
||||
VAbstractPattern::AttrIncludeAs,
|
||||
"1"));
|
||||
QChar('1')));
|
||||
records.append(record);
|
||||
}
|
||||
}
|
||||
|
@ -685,14 +685,15 @@ QVector<quint32> VAbstractPattern::ParsePiecePointRecords(const QDomElement &dom
|
|||
VPieceNode VAbstractPattern::ParseSANode(const QDomElement &domElement)
|
||||
{
|
||||
const quint32 id = VDomDocument::GetParametrUInt(domElement, AttrIdObject, NULL_ID_STR);
|
||||
const bool reverse = VDomDocument::GetParametrUInt(domElement, VAbstractPattern::AttrNodeReverse, "0");
|
||||
const bool reverse = VDomDocument::GetParametrUInt(domElement, VAbstractPattern::AttrNodeReverse, QChar('0'));
|
||||
const bool excluded = VDomDocument::GetParametrBool(domElement, VAbstractPattern::AttrNodeExcluded, falseStr);
|
||||
const bool uniqeness = VDomDocument::GetParametrBool(domElement, VAbstractPattern::AttrCheckUniqueness, trueStr);
|
||||
const QString saBefore = VDomDocument::GetParametrString(domElement, VAbstractPattern::AttrSABefore,
|
||||
currentSeamAllowance);
|
||||
const QString saAfter = VDomDocument::GetParametrString(domElement, VAbstractPattern::AttrSAAfter,
|
||||
currentSeamAllowance);
|
||||
const PieceNodeAngle angle = static_cast<PieceNodeAngle>(VDomDocument::GetParametrUInt(domElement, AttrAngle, "0"));
|
||||
const PieceNodeAngle angle = static_cast<PieceNodeAngle>(VDomDocument::GetParametrUInt(domElement, AttrAngle,
|
||||
QChar('0')));
|
||||
|
||||
const bool passmark = VDomDocument::GetParametrBool(domElement, VAbstractPattern::AttrNodePassmark, falseStr);
|
||||
const PassmarkLineType passmarkLine = StringToPassmarkLineType(VDomDocument::GetParametrString(domElement,
|
||||
|
@ -2110,7 +2111,7 @@ QMap<int, QString> VAbstractPattern::GetMaterials(const QDomElement &element) co
|
|||
{
|
||||
if (tagMaterial.tagName() == TagMaterial)
|
||||
{
|
||||
const int number = static_cast<int>(GetParametrUInt(tagMaterial, AttrNumber, "0"));
|
||||
const int number = static_cast<int>(GetParametrUInt(tagMaterial, AttrNumber, QChar('0')));
|
||||
const QString name = GetParametrEmptyString(tagMaterial, AttrName);
|
||||
|
||||
if (number > 0 && number <= userMaterialPlaceholdersQuantity)
|
||||
|
@ -2159,7 +2160,7 @@ QVector<VFinalMeasurement> VAbstractPattern::GetFMeasurements(const QDomElement
|
|||
VFinalMeasurement m;
|
||||
|
||||
m.name = GetParametrString(tagFMeasurement, AttrName, tr("measurement"));
|
||||
m.formula = GetParametrString(tagFMeasurement, AttrFormula, "0");
|
||||
m.formula = GetParametrString(tagFMeasurement, AttrFormula, QChar('0'));
|
||||
m.description = GetParametrEmptyString(tagFMeasurement, AttrDescription);
|
||||
|
||||
measurements.append(m);
|
||||
|
@ -2352,7 +2353,7 @@ QMap<quint32, QPair<QString, bool> > VAbstractPattern::GetGroups()
|
|||
{
|
||||
if (group.tagName() == TagGroup)
|
||||
{
|
||||
const quint32 id = GetParametrUInt(group, AttrId, "0");
|
||||
const quint32 id = GetParametrUInt(group, AttrId, QChar('0'));
|
||||
const bool visible = GetParametrBool(group, AttrVisible, trueStr);
|
||||
const QString name = GetParametrString(group, AttrName, tr("New group"));
|
||||
|
||||
|
@ -2411,7 +2412,7 @@ QMap<quint32, QString> VAbstractPattern::GetGroupsContainingItem(quint32 toolId,
|
|||
bool groupHasItem = GroupHasItem(group, toolId, objectId);
|
||||
if((containItem && groupHasItem) || (not containItem && not groupHasItem))
|
||||
{
|
||||
const quint32 groupId = GetParametrUInt(group, AttrId, "0");
|
||||
const quint32 groupId = GetParametrUInt(group, AttrId, QChar('0'));
|
||||
const QString name = GetParametrString(group, AttrName, tr("New group"));
|
||||
data.insert(groupId, name);
|
||||
}
|
||||
|
@ -2448,8 +2449,8 @@ bool VAbstractPattern::GroupHasItem(const QDomElement &groupDomElement, quint32
|
|||
const QDomElement item = itemNode.toElement();
|
||||
if (item.isNull() == false)
|
||||
{
|
||||
quint32 toolIdIterate= GetParametrUInt(item, AttrTool, "0");
|
||||
quint32 objectIdIterate= GetParametrUInt(item, AttrObject, "0");
|
||||
quint32 toolIdIterate= GetParametrUInt(item, AttrTool, QChar('0'));
|
||||
quint32 objectIdIterate= GetParametrUInt(item, AttrObject, QChar('0'));
|
||||
|
||||
if(toolIdIterate == toolId && objectIdIterate == objectId)
|
||||
{
|
||||
|
@ -2538,8 +2539,8 @@ QDomElement VAbstractPattern::RemoveItemFromGroup(quint32 toolId, quint32 object
|
|||
const QDomElement item = itemNode.toElement();
|
||||
if (item.isNull() == false)
|
||||
{
|
||||
quint32 toolIdIterate= GetParametrUInt(item, AttrTool, "0");
|
||||
quint32 objectIdIterate= GetParametrUInt(item, AttrObject, "0");
|
||||
quint32 toolIdIterate= GetParametrUInt(item, AttrTool, QChar('0'));
|
||||
quint32 objectIdIterate= GetParametrUInt(item, AttrObject, QChar('0'));
|
||||
|
||||
if(toolIdIterate == toolId && objectIdIterate == objectId)
|
||||
{
|
||||
|
|
|
@ -378,8 +378,8 @@ bool VDomDocument::GetParametrBool(const QDomElement &domElement, const QString
|
|||
|
||||
const QStringList bools = QStringList() << QLatin1String("true")
|
||||
<< QLatin1String("false")
|
||||
<< QLatin1String("1")
|
||||
<< QLatin1String("0");
|
||||
<< QChar('1')
|
||||
<< QChar('0');
|
||||
switch (bools.indexOf(parametr))
|
||||
{
|
||||
case 0: // true
|
||||
|
@ -956,8 +956,8 @@ QVector<VLabelTemplateLine> VDomDocument::GetLabelTemplate(const QDomElement &el
|
|||
line.line = GetParametrString(tagLine, AttrText, tr("<empty>"));
|
||||
line.bold = GetParametrBool(tagLine, AttrBold, falseStr);
|
||||
line.italic = GetParametrBool(tagLine, AttrItalic, falseStr);
|
||||
line.alignment = static_cast<int>(GetParametrUInt(tagLine, AttrAlignment, "0"));
|
||||
line.fontSizeIncrement = static_cast<int>(GetParametrUInt(tagLine, AttrFSIncrement, "0"));
|
||||
line.alignment = static_cast<int>(GetParametrUInt(tagLine, AttrAlignment, QChar('0')));
|
||||
line.fontSizeIncrement = static_cast<int>(GetParametrUInt(tagLine, AttrFSIncrement, QChar('0')));
|
||||
lines.append(line);
|
||||
}
|
||||
tagLine = tagLine.nextSiblingElement(TagLine);
|
||||
|
|
|
@ -181,6 +181,13 @@ inline void VDomDocument::SetAttribute<QString>(QDomElement &domElement, const Q
|
|||
domElement.setAttribute(name, value);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
template <>
|
||||
inline void VDomDocument::SetAttribute<QChar>(QDomElement &domElement, const QString &name, const QChar &value) const
|
||||
{
|
||||
domElement.setAttribute(name, value);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
template <>
|
||||
inline void VDomDocument::SetAttribute<bool>(QDomElement &domElement, const QString &name, const bool &value) const
|
||||
|
@ -191,7 +198,7 @@ inline void VDomDocument::SetAttribute<bool>(QDomElement &domElement, const QStr
|
|||
//---------------------------------------------------------------------------------------------------------------------
|
||||
template <>
|
||||
inline void VDomDocument::SetAttribute<MeasurementsType>(QDomElement &domElement, const QString &name,
|
||||
const MeasurementsType &value) const
|
||||
const MeasurementsType &value) const
|
||||
{
|
||||
domElement.setAttribute(name, value == MeasurementsType::Multisize ? QStringLiteral("multisize") :
|
||||
QStringLiteral("individual"));
|
||||
|
|
|
@ -2109,10 +2109,10 @@ void VPatternConverter::TagDetailToV0_4_0()
|
|||
|
||||
if (not dom.isNull())
|
||||
{
|
||||
dom.setAttribute(*strSeamAllowance, dom.attribute(*strSupplement, "0"));
|
||||
dom.setAttribute(*strSeamAllowance, dom.attribute(*strSupplement, QChar('0')));
|
||||
dom.removeAttribute(*strSupplement);
|
||||
|
||||
dom.setAttribute(*strVersion, "1");
|
||||
dom.setAttribute(*strVersion, '1');
|
||||
|
||||
const QStringList tags = QStringList() << *strNode << *strData << *strPatternInfo << *strGrainline;
|
||||
|
||||
|
@ -2137,17 +2137,17 @@ void VPatternConverter::TagDetailToV0_4_0()
|
|||
|
||||
if (element.hasAttribute(*strReverse))
|
||||
{
|
||||
tagNode.setAttribute(*strReverse, element.attribute(*strReverse, "0"));
|
||||
tagNode.setAttribute(*strReverse, element.attribute(*strReverse, QChar('0')));
|
||||
}
|
||||
|
||||
if (element.hasAttribute(*strMx))
|
||||
{
|
||||
tagNode.setAttribute(*strMx, element.attribute(*strMx, "0"));
|
||||
tagNode.setAttribute(*strMx, element.attribute(*strMx, QChar('0')));
|
||||
}
|
||||
|
||||
if (element.hasAttribute(*strMy))
|
||||
{
|
||||
tagNode.setAttribute(*strMy, element.attribute(*strMy, "0"));
|
||||
tagNode.setAttribute(*strMy, element.attribute(*strMy, QChar('0')));
|
||||
}
|
||||
|
||||
tagNode.setAttribute(*strType, element.attribute(*strType, QString()));
|
||||
|
@ -2200,7 +2200,7 @@ QDomElement VPatternConverter::GetUnionDetailNodesV0_4_0(const QDomElement &deta
|
|||
|
||||
if (node.hasAttribute(*strReverse))
|
||||
{
|
||||
tagNode.setAttribute(*strReverse, node.attribute(*strReverse, "0"));
|
||||
tagNode.setAttribute(*strReverse, node.attribute(*strReverse, QChar('0')));
|
||||
}
|
||||
|
||||
tagNode.setAttribute(*strType, node.attribute(*strType, QString()));
|
||||
|
@ -2263,7 +2263,7 @@ void VPatternConverter::LabelTagToV0_4_4(const QString &tagName)
|
|||
{
|
||||
if (dom.hasAttribute(attribute))
|
||||
{
|
||||
QString valStr = dom.attribute(attribute, "1");
|
||||
QString valStr = dom.attribute(attribute, QChar('1'));
|
||||
bool ok = false;
|
||||
qreal val = valStr.toDouble(&ok);
|
||||
if (not ok)
|
||||
|
@ -2430,7 +2430,7 @@ void VPatternConverter::PortPieceLabelstoV0_6_0()
|
|||
|
||||
QString line;
|
||||
|
||||
const int material = static_cast<int>(GetParametrUInt(domMCP, *strMaterial, "0"));
|
||||
const int material = static_cast<int>(GetParametrUInt(domMCP, *strMaterial, QChar('0')));
|
||||
switch(material)
|
||||
{
|
||||
case 0:
|
||||
|
@ -2453,7 +2453,7 @@ void VPatternConverter::PortPieceLabelstoV0_6_0()
|
|||
|
||||
line.append(", %wCut% ");
|
||||
|
||||
const int cutNumber = static_cast<int>(GetParametrUInt(domMCP, *strCutNumber, "1"));
|
||||
const int cutNumber = static_cast<int>(GetParametrUInt(domMCP, *strCutNumber, QChar('1')));
|
||||
|
||||
if (firstLine)
|
||||
{
|
||||
|
@ -2474,7 +2474,7 @@ void VPatternConverter::PortPieceLabelstoV0_6_0()
|
|||
}
|
||||
}
|
||||
|
||||
if (GetParametrUInt(domMCP, *strPlacement, "0") == 1)
|
||||
if (GetParametrUInt(domMCP, *strPlacement, QChar('0')) == 1)
|
||||
{
|
||||
line.append(" %wOnFold%");
|
||||
}
|
||||
|
|
|
@ -194,7 +194,7 @@ void QmuParserByteCode::ConstantFolding(ECmdCode a_Oprt)
|
|||
#if defined(MUP_MATH_EXCEPTIONS)
|
||||
if (y==0)
|
||||
{
|
||||
throw qmuParserError(ecDIV_BY_ZERO, "0");
|
||||
throw qmuParserError(ecDIV_BY_ZERO, QLatin1Char('0'));
|
||||
}
|
||||
#endif
|
||||
x = x / y;
|
||||
|
|
|
@ -239,19 +239,19 @@ void dx_iface::AddAAMALayers()
|
|||
{
|
||||
DRW_Layer layer;
|
||||
|
||||
layer.name = "1";// CUT, OUTLINE
|
||||
layer.name = '1';// CUT, OUTLINE
|
||||
layer.color = DRW::black;
|
||||
cData.layers.push_back(layer);
|
||||
|
||||
layer.name = "8";// DRAW, INK
|
||||
layer.name = '8';// DRAW, INK
|
||||
layer.color = DRW::black;
|
||||
cData.layers.push_back(layer);
|
||||
|
||||
layer.name = "7";// GRAINLINE
|
||||
layer.name = '7';// GRAINLINE
|
||||
layer.color = DRW::black;
|
||||
cData.layers.push_back(layer);
|
||||
|
||||
// layer.name = "6";// MIRROR LINES
|
||||
// layer.name = '6';// MIRROR LINES
|
||||
// layer.color = DRW::black;
|
||||
// cData.layers.push_back(layer);
|
||||
|
||||
|
@ -263,7 +263,7 @@ void dx_iface::AddAAMALayers()
|
|||
// layer.color = DRW::black;
|
||||
// cData.layers.push_back(layer);
|
||||
|
||||
layer.name = "4";// NOTCH
|
||||
layer.name = '4';// NOTCH
|
||||
layer.color = DRW::black;
|
||||
cData.layers.push_back(layer);
|
||||
|
||||
|
@ -285,7 +285,7 @@ void dx_iface::AddAAMAHeaderData()
|
|||
void dx_iface::AddDefLayers()
|
||||
{
|
||||
DRW_Layer defLayer;
|
||||
defLayer.name = "0";
|
||||
defLayer.name = '0';
|
||||
defLayer.color = DRW::black; // default color
|
||||
defLayer.lWeight = DRW_LW_Conv::width03; // default width
|
||||
cData.layers.push_back(defLayer);
|
||||
|
|
|
@ -516,7 +516,7 @@ public:
|
|||
flags(0)
|
||||
{
|
||||
eType = DRW::BLOCK;
|
||||
layer = "0";
|
||||
layer = '0';
|
||||
}
|
||||
|
||||
virtual void applyExtrusion(){}
|
||||
|
|
|
@ -1481,7 +1481,7 @@ bool dxfRW::writeTables() {
|
|||
iface->writeLayers();
|
||||
if (!wlayer0 && version > DRW::AC1009) {
|
||||
DRW_Layer lay0;
|
||||
lay0.name = "0";
|
||||
lay0.name = '0';
|
||||
writeLayer(&lay0);
|
||||
}
|
||||
writer->writeString(0, "ENDTAB");
|
||||
|
@ -1766,7 +1766,7 @@ bool dxfRW::writeObjects() {
|
|||
writer->writeString(0, "IMAGEDEF");
|
||||
writer->writeString(5, toHexStr(static_cast<int>(id->handle)) );
|
||||
if (version > DRW::AC1014) {
|
||||
// writer->writeString(330, "0"); handle to DICTIONARY
|
||||
// writer->writeString(330, '0'); handle to DICTIONARY
|
||||
}
|
||||
writer->writeString(102, "{ACAD_REACTORS");
|
||||
std::map<std::string, std::string>::iterator it;
|
||||
|
|
|
@ -153,7 +153,7 @@ void VDxfEngine::drawPath(const QPainterPath &path)
|
|||
if (m_version > DRW::AC1009)
|
||||
{ // Use lwpolyline
|
||||
DRW_LWPolyline *poly = new DRW_LWPolyline();
|
||||
poly->layer = "0";
|
||||
poly->layer = '0';
|
||||
poly->color = getPenColor();
|
||||
poly->lWeight = DRW_LW_Conv::widthByLayer;
|
||||
poly->lineType = getPenStyle();
|
||||
|
@ -176,7 +176,7 @@ void VDxfEngine::drawPath(const QPainterPath &path)
|
|||
else
|
||||
{ // Use polyline
|
||||
DRW_Polyline *poly = new DRW_Polyline();
|
||||
poly->layer = "0";
|
||||
poly->layer = '0';
|
||||
poly->color = getPenColor();
|
||||
poly->lWeight = DRW_LW_Conv::widthByLayer;
|
||||
poly->lineType = getPenStyle();
|
||||
|
@ -211,7 +211,7 @@ void VDxfEngine::drawLines(const QLineF * lines, int lineCount)
|
|||
FromPixel(getSize().height() - p1.y(), varInsunits), 0);
|
||||
line->secPoint = DRW_Coord(FromPixel(p2.x(), varInsunits),
|
||||
FromPixel(getSize().height() - p2.y(), varInsunits), 0);
|
||||
line->layer = "0";
|
||||
line->layer = '0';
|
||||
line->color = getPenColor();
|
||||
line->lWeight = DRW_LW_Conv::widthByLayer;
|
||||
line->lineType = getPenStyle();
|
||||
|
@ -239,7 +239,7 @@ void VDxfEngine::drawPolygon(const QPointF *points, int pointCount, PolygonDrawM
|
|||
if (m_version > DRW::AC1009)
|
||||
{ // Use lwpolyline
|
||||
DRW_LWPolyline *poly = new DRW_LWPolyline();
|
||||
poly->layer = "0";
|
||||
poly->layer = '0';
|
||||
poly->color = getPenColor();
|
||||
poly->lWeight = DRW_LW_Conv::widthByLayer;
|
||||
poly->lineType = getPenStyle();
|
||||
|
@ -263,7 +263,7 @@ void VDxfEngine::drawPolygon(const QPointF *points, int pointCount, PolygonDrawM
|
|||
else
|
||||
{ // Use polyline
|
||||
DRW_Polyline *poly = new DRW_Polyline();
|
||||
poly->layer = "0";
|
||||
poly->layer = '0';
|
||||
poly->color = getPenColor();
|
||||
poly->lWeight = DRW_LW_Conv::widthByLayer;
|
||||
poly->lineType = getPenStyle();
|
||||
|
@ -325,7 +325,7 @@ void VDxfEngine::drawEllipse(const QRectF & rect)
|
|||
ellipse->staparam = 0;
|
||||
ellipse->endparam = 2*M_PI;
|
||||
|
||||
ellipse->layer = "0";
|
||||
ellipse->layer = '0';
|
||||
ellipse->color = getPenColor();
|
||||
ellipse->lWeight = DRW_LW_Conv::widthByLayer;
|
||||
ellipse->lineType = getPenStyle();
|
||||
|
@ -359,7 +359,7 @@ void VDxfEngine::drawTextItem(const QPointF & p, const QTextItem & textItem)
|
|||
textBuffer->style = fontStyle;
|
||||
textBuffer->angle = -rotationAngle;
|
||||
|
||||
textBuffer->layer = "0";
|
||||
textBuffer->layer = '0';
|
||||
textBuffer->color = getPenColor();
|
||||
textBuffer->lWeight = DRW_LW_Conv::widthByLayer;
|
||||
textBuffer->lineType = getPenStyle();
|
||||
|
@ -632,7 +632,7 @@ bool VDxfEngine::ExportToAAMA(const QVector<VLayoutPiece> &details)
|
|||
}
|
||||
|
||||
detailBlock->name = blockName.toStdString();
|
||||
detailBlock->layer = "1";
|
||||
detailBlock->layer = '1';
|
||||
|
||||
ExportAAMAOutline(detailBlock, detail);
|
||||
ExportAAMADraw(detailBlock, detail);
|
||||
|
@ -646,7 +646,7 @@ bool VDxfEngine::ExportToAAMA(const QVector<VLayoutPiece> &details)
|
|||
|
||||
DRW_Insert *insert = new DRW_Insert();
|
||||
insert->name = blockName.toStdString();
|
||||
insert->layer = "1";
|
||||
insert->layer = '1';
|
||||
|
||||
input->AddEntity(insert);
|
||||
}
|
||||
|
@ -667,7 +667,7 @@ void VDxfEngine::ExportAAMAOutline(dx_ifaceBlock *detailBlock, const VLayoutPiec
|
|||
outline = detail.GetContourPoints();
|
||||
}
|
||||
|
||||
DRW_Entity *e = AAMAPolygon(outline, "1", true);
|
||||
DRW_Entity *e = AAMAPolygon(outline, QChar('1'), true);
|
||||
if (e)
|
||||
{
|
||||
detailBlock->ent.push_back(e);
|
||||
|
@ -680,7 +680,7 @@ void VDxfEngine::ExportAAMADraw(dx_ifaceBlock *detailBlock, const VLayoutPiece &
|
|||
if (not detail.IsHideMainPath())
|
||||
{
|
||||
QVector<QPointF> poly = detail.GetContourPoints();
|
||||
if (DRW_Entity *e = AAMAPolygon(poly, "8", true))
|
||||
if (DRW_Entity *e = AAMAPolygon(poly, QChar('8'), true))
|
||||
{
|
||||
detailBlock->ent.push_back(e);
|
||||
}
|
||||
|
@ -689,7 +689,7 @@ void VDxfEngine::ExportAAMADraw(dx_ifaceBlock *detailBlock, const VLayoutPiece &
|
|||
const QVector<QVector<QPointF>> drawIntCut = detail.InternalPathsForCut(false);
|
||||
for(auto &intCut : drawIntCut)
|
||||
{
|
||||
if (DRW_Entity *e = AAMAPolygon(intCut, "8", false))
|
||||
if (DRW_Entity *e = AAMAPolygon(intCut, QChar('8'), false))
|
||||
{
|
||||
detailBlock->ent.push_back(e);
|
||||
}
|
||||
|
@ -702,7 +702,7 @@ void VDxfEngine::ExportAAMADraw(dx_ifaceBlock *detailBlock, const VLayoutPiece &
|
|||
{
|
||||
for(auto &p : qAsConst(label.shape))
|
||||
{
|
||||
if (DRW_Entity *e = AAMAPolygon(p, "8", false))
|
||||
if (DRW_Entity *e = AAMAPolygon(p, QChar('8'), false))
|
||||
{
|
||||
detailBlock->ent.push_back(e);
|
||||
}
|
||||
|
@ -732,7 +732,7 @@ void VDxfEngine::ExportAAMANotch(dx_ifaceBlock *detailBlock, const VLayoutPiece
|
|||
const QVector<QLineF> passmarks = detail.GetPassmarks();
|
||||
for(auto passmark : passmarks)
|
||||
{
|
||||
if (DRW_Entity *e = AAMALine(passmark, "4"))
|
||||
if (DRW_Entity *e = AAMALine(passmark, QChar('4')))
|
||||
{
|
||||
detailBlock->ent.push_back(e);
|
||||
}
|
||||
|
@ -746,7 +746,7 @@ void VDxfEngine::ExportAAMAGrainline(dx_ifaceBlock *detailBlock, const VLayoutPi
|
|||
const QVector<QPointF> grainline = detail.GetGrainline();
|
||||
if (grainline.count() > 1)
|
||||
{
|
||||
if (DRW_Entity *e = AAMALine(QLineF(grainline.first(), grainline.last()), "7"))
|
||||
if (DRW_Entity *e = AAMALine(QLineF(grainline.first(), grainline.last()), QChar('7')))
|
||||
{
|
||||
detailBlock->ent.push_back(e);
|
||||
}
|
||||
|
@ -762,7 +762,7 @@ void VDxfEngine::ExportAAMAText(dx_ifaceBlock *detailBlock, const VLayoutPiece &
|
|||
for (int i = 0; i < list.size(); ++i)
|
||||
{
|
||||
QPointF pos(startPos.x(), startPos.y() - ToPixel(AAMATextHeight, varInsunits)*(list.size() - i-1));
|
||||
detailBlock->ent.push_back(AAMAText(pos, list.at(i), "1"));
|
||||
detailBlock->ent.push_back(AAMAText(pos, list.at(i), QChar('1')));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -777,7 +777,7 @@ void VDxfEngine::ExportAAMAGlobalText(const QSharedPointer<dx_iface> &input, con
|
|||
for (int j = 0; j < strings.size(); ++j)
|
||||
{
|
||||
QPointF pos(0, getSize().height() - ToPixel(AAMATextHeight, varInsunits)*(strings.size() - j-1));
|
||||
input->AddEntity(AAMAText(pos, strings.at(j), "1"));
|
||||
input->AddEntity(AAMAText(pos, strings.at(j), QChar('1')));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -277,9 +277,9 @@ void VMeasurements::ReadMeasurements() const
|
|||
QSharedPointer<VMeasurement> tempMeash;
|
||||
if (type == MeasurementsType::Multisize)
|
||||
{
|
||||
qreal base = GetParametrDouble(dom, AttrBase, "0");
|
||||
qreal ksize = GetParametrDouble(dom, AttrSizeIncrease, "0");
|
||||
qreal kheight = GetParametrDouble(dom, AttrHeightIncrease, "0");
|
||||
qreal base = GetParametrDouble(dom, AttrBase, QChar('0'));
|
||||
qreal ksize = GetParametrDouble(dom, AttrSizeIncrease, QChar('0'));
|
||||
qreal kheight = GetParametrDouble(dom, AttrHeightIncrease, QChar('0'));
|
||||
|
||||
tempMeash = QSharedPointer<VMeasurement>(new VMeasurement(static_cast<quint32>(i), name, BaseSize(),
|
||||
BaseHeight(), base, ksize, kheight));
|
||||
|
@ -302,7 +302,7 @@ void VMeasurements::ReadMeasurements() const
|
|||
}
|
||||
else
|
||||
{
|
||||
const QString formula = GetParametrString(dom, AttrValue, "0");
|
||||
const QString formula = GetParametrString(dom, AttrValue, QChar('0'));
|
||||
bool ok = false;
|
||||
qreal value = EvalFormula(tempData.data(), formula, &ok);
|
||||
|
||||
|
@ -330,7 +330,7 @@ void VMeasurements::ClearForExport()
|
|||
{
|
||||
if (qmu::QmuTokenParser::IsSingle(domElement.attribute(AttrValue)))
|
||||
{
|
||||
SetAttribute(domElement, AttrValue, QString("0"));
|
||||
SetAttribute(domElement, AttrValue, QChar('0'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -806,13 +806,13 @@ QDomElement VMeasurements::MakeEmpty(const QString &name, const QString &formula
|
|||
|
||||
if (type == MeasurementsType::Multisize)
|
||||
{
|
||||
SetAttribute(element, AttrBase, QString("0"));
|
||||
SetAttribute(element, AttrSizeIncrease, QString("0"));
|
||||
SetAttribute(element, AttrHeightIncrease, QString("0"));
|
||||
SetAttribute(element, AttrBase, QChar('0'));
|
||||
SetAttribute(element, AttrSizeIncrease, QChar('0'));
|
||||
SetAttribute(element, AttrHeightIncrease, QChar('0'));
|
||||
}
|
||||
else
|
||||
{
|
||||
SetAttribute(element, AttrValue, formula.isEmpty() ? QString("0") : formula);
|
||||
SetAttribute(element, AttrValue, formula.isEmpty() ? QChar('0') : formula);
|
||||
}
|
||||
|
||||
return element;
|
||||
|
|
|
@ -102,7 +102,7 @@ VAbstractArcData::VAbstractArcData(const QString &formulaLength, const VPointF &
|
|||
: f1(f1),
|
||||
formulaF1(formulaF1),
|
||||
f2(0),
|
||||
formulaF2("0"),
|
||||
formulaF2('0'),
|
||||
center(center),
|
||||
isFlipped(false),
|
||||
formulaLength(formulaLength)
|
||||
|
@ -113,7 +113,7 @@ VAbstractArcData::VAbstractArcData(const VPointF ¢er, qreal f1)
|
|||
: f1(f1),
|
||||
formulaF1(QString().number(f1)),
|
||||
f2(0),
|
||||
formulaF2("0"),
|
||||
formulaF2('0'),
|
||||
center(center),
|
||||
isFlipped(false),
|
||||
formulaLength()
|
||||
|
|
|
@ -43,7 +43,7 @@ public:
|
|||
VPlaceLabelItemData()
|
||||
: width(),
|
||||
height(),
|
||||
angle("0"),
|
||||
angle('0'),
|
||||
type(PlaceLabelType::Button),
|
||||
centerPoint(0),
|
||||
wValue(0),
|
||||
|
|
|
@ -95,13 +95,13 @@ VSplineData::VSplineData()
|
|||
: p1(),
|
||||
p4(),
|
||||
angle1(0),
|
||||
angle1F("0"),
|
||||
angle1F('0'),
|
||||
angle2(0),
|
||||
angle2F("0"),
|
||||
angle2F('0'),
|
||||
c1Length(0),
|
||||
c1LengthF("0"),
|
||||
c1LengthF('0'),
|
||||
c2Length(0),
|
||||
c2LengthF("0"),
|
||||
c2LengthF('0'),
|
||||
kCurve(1)
|
||||
{}
|
||||
|
||||
|
@ -130,9 +130,9 @@ VSplineData::VSplineData(VPointF p1, VPointF p4, qreal angle1, qreal angle2, qre
|
|||
angle2(angle2),
|
||||
angle2F(QString().number(angle2)),
|
||||
c1Length(0),
|
||||
c1LengthF("0"),
|
||||
c1LengthF('0'),
|
||||
c2Length(0),
|
||||
c2LengthF("0"),
|
||||
c2LengthF('0'),
|
||||
kCurve(kCurve)
|
||||
{
|
||||
const qreal L = GetL(static_cast<QPointF>(p1), static_cast<QPointF>(p4), kCurve);
|
||||
|
@ -153,13 +153,13 @@ VSplineData::VSplineData(VPointF p1, QPointF p2, QPointF p3, VPointF p4)
|
|||
: p1(p1),
|
||||
p4(p4),
|
||||
angle1(0),
|
||||
angle1F("0"),
|
||||
angle1F('0'),
|
||||
angle2(0),
|
||||
angle2F("0"),
|
||||
angle2F('0'),
|
||||
c1Length(0),
|
||||
c1LengthF("0"),
|
||||
c1LengthF('0'),
|
||||
c2Length(0),
|
||||
c2LengthF("0"),
|
||||
c2LengthF('0'),
|
||||
kCurve(1)
|
||||
{
|
||||
QLineF p1p2(static_cast<QPointF>(p1), static_cast<QPointF>(p2));
|
||||
|
|
|
@ -107,13 +107,13 @@ public:
|
|||
VSplinePointData()
|
||||
: pSpline(),
|
||||
angle1(0),
|
||||
angle1F("0"),
|
||||
angle1F('0'),
|
||||
angle2(180),
|
||||
angle2F("180"),
|
||||
length1(0),
|
||||
length1F("0"),
|
||||
length1F('0'),
|
||||
length2(0),
|
||||
length2F("0")
|
||||
length2F('0')
|
||||
{}
|
||||
|
||||
VSplinePointData(VPointF pSpline, qreal angle1, const QString &angle1F, qreal angle2, const QString &angle2F,
|
||||
|
|
|
@ -61,7 +61,7 @@ QString LocalWidth(const QLineF &line, const QLineF &movedLine)
|
|||
}
|
||||
else
|
||||
{// different direction means value is negative
|
||||
return QString("0");
|
||||
return QChar('0');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -261,8 +261,8 @@ QVector<VPieceNode> VNodeDetail::Convert(const VContainer *data, const QVector<V
|
|||
|
||||
if (not closed && path.CountNodes() > 1)
|
||||
{
|
||||
path[0].SetFormulaSABefore("0");
|
||||
path[path.CountNodes()-1].SetFormulaSAAfter("0");
|
||||
path[0].SetFormulaSABefore(QChar('0'));
|
||||
path[path.CountNodes()-1].SetFormulaSAAfter(QChar('0'));
|
||||
}
|
||||
|
||||
return path.GetNodes();
|
||||
|
|
|
@ -600,7 +600,7 @@ void VPiece::SetFormulaSAWidth(const QString &formula, qreal value)
|
|||
{
|
||||
SetSAWidth(value);
|
||||
const qreal width = GetSAWidth();
|
||||
width >= 0 ? d->m_formulaWidth = formula : d->m_formulaWidth = QLatin1String("0");
|
||||
width >= 0 ? d->m_formulaWidth = formula : d->m_formulaWidth = QLatin1Char('0');
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -58,7 +58,7 @@ public:
|
|||
m_ppData(),
|
||||
m_piPatternInfo(),
|
||||
m_glGrainline(),
|
||||
m_formulaWidth("0")
|
||||
m_formulaWidth('0')
|
||||
{}
|
||||
|
||||
VPieceData(const VPieceData &detail)
|
||||
|
|
|
@ -48,7 +48,7 @@ public:
|
|||
m_name(),
|
||||
m_penType(Qt::SolidLine),
|
||||
m_cut(false),
|
||||
m_visibilityTrigger("1")
|
||||
m_visibilityTrigger('1')
|
||||
{}
|
||||
|
||||
explicit VPiecePathData(PiecePathType type)
|
||||
|
@ -57,7 +57,7 @@ public:
|
|||
m_name(),
|
||||
m_penType(Qt::SolidLine),
|
||||
m_cut(false),
|
||||
m_visibilityTrigger("1")
|
||||
m_visibilityTrigger('1')
|
||||
{}
|
||||
|
||||
VPiecePathData(const VPiecePathData &path)
|
||||
|
|
|
@ -1094,7 +1094,7 @@ void DialogPiecePath::SetPiecePath(const VPiecePath &path)
|
|||
}
|
||||
else
|
||||
{
|
||||
ui->plainTextEditFormulaVisible->setPlainText("1");
|
||||
ui->plainTextEditFormulaVisible->setPlainText(QChar('1'));
|
||||
}
|
||||
|
||||
ValidObjects(PathIsValid());
|
||||
|
@ -1318,7 +1318,7 @@ VPiecePath DialogPiecePath::CreatePath() const
|
|||
}
|
||||
else
|
||||
{
|
||||
path.SetVisibilityTrigger("1");
|
||||
path.SetVisibilityTrigger(QChar('1'));
|
||||
}
|
||||
|
||||
return path;
|
||||
|
|
|
@ -215,7 +215,7 @@ void VToolFlippingByAxis::SaveDialog(QDomElement &domElement, QList<quint32> &ol
|
|||
void VToolFlippingByAxis::ReadToolAttributes(const QDomElement &domElement)
|
||||
{
|
||||
m_originPointId = doc->GetParametrUInt(domElement, AttrCenter, NULL_ID_STR);
|
||||
m_axisType = static_cast<AxisType>(doc->GetParametrUInt(domElement, AttrAxisType, "1"));
|
||||
m_axisType = static_cast<AxisType>(doc->GetParametrUInt(domElement, AttrAxisType, QChar('1')));
|
||||
suffix = doc->GetParametrString(domElement, AttrSuffix);
|
||||
}
|
||||
|
||||
|
|
|
@ -480,9 +480,9 @@ void VToolMove::SaveDialog(QDomElement &domElement, QList<quint32> &oldDependenc
|
|||
void VToolMove::ReadToolAttributes(const QDomElement &domElement)
|
||||
{
|
||||
origPointId = doc->GetParametrUInt(domElement, AttrCenter, NULL_ID_STR);
|
||||
formulaAngle = doc->GetParametrString(domElement, AttrAngle, "0");
|
||||
formulaRotationAngle = doc->GetParametrString(domElement, AttrRotationAngle, "0");
|
||||
formulaLength = doc->GetParametrString(domElement, AttrLength, "0");
|
||||
formulaAngle = doc->GetParametrString(domElement, AttrAngle, QChar('0'));
|
||||
formulaRotationAngle = doc->GetParametrString(domElement, AttrRotationAngle, QChar('0'));
|
||||
formulaLength = doc->GetParametrString(domElement, AttrLength, QChar('0'));
|
||||
suffix = doc->GetParametrString(domElement, AttrSuffix);
|
||||
}
|
||||
|
||||
|
|
|
@ -351,7 +351,7 @@ void VToolRotation::SaveDialog(QDomElement &domElement, QList<quint32> &oldDepen
|
|||
void VToolRotation::ReadToolAttributes(const QDomElement &domElement)
|
||||
{
|
||||
origPointId = doc->GetParametrUInt(domElement, AttrCenter, NULL_ID_STR);
|
||||
formulaAngle = doc->GetParametrString(domElement, AttrAngle, "0");
|
||||
formulaAngle = doc->GetParametrString(domElement, AttrAngle, QChar('0'));
|
||||
suffix = doc->GetParametrString(domElement, AttrSuffix);
|
||||
}
|
||||
|
||||
|
|
|
@ -48,9 +48,9 @@ struct VToolArcInitData : VAbstractSplineInitData
|
|||
VToolArcInitData()
|
||||
: VAbstractSplineInitData(),
|
||||
center(NULL_ID),
|
||||
radius("0"),
|
||||
f1("0"),
|
||||
f2("0")
|
||||
radius('0'),
|
||||
f1('0'),
|
||||
f2('0')
|
||||
{}
|
||||
|
||||
quint32 center;
|
||||
|
|
|
@ -48,9 +48,9 @@ struct VToolArcWithLengthInitData : VAbstractSplineInitData
|
|||
VToolArcWithLengthInitData()
|
||||
: VAbstractSplineInitData(),
|
||||
center(NULL_ID),
|
||||
radius("0"),
|
||||
f1("0"),
|
||||
length("0")
|
||||
radius('0'),
|
||||
f1('0'),
|
||||
length('0')
|
||||
{}
|
||||
|
||||
quint32 center;
|
||||
|
|
|
@ -441,9 +441,9 @@ QString VToolEllipticalArc::MakeToolTip() const
|
|||
.arg(tr("Length")) // 1
|
||||
.arg(qApp->fromPixel(elArc->GetLength())) // 2
|
||||
.arg(UnitsToStr(qApp->patternUnit(), true), // 3
|
||||
tr("Radius") + QLatin1String("1")) // 4
|
||||
tr("Radius") + QLatin1Char('1')) // 4
|
||||
.arg(qApp->fromPixel(elArc->GetRadius1())) // 5
|
||||
.arg(tr("Radius") + QLatin1String("2")) // 6
|
||||
.arg(tr("Radius") + QLatin1Char('2')) // 6
|
||||
.arg(qApp->fromPixel(elArc->GetRadius2())) // 7
|
||||
.arg(tr("Start angle")) // 8
|
||||
.arg(elArc->GetStartAngle()) // 9
|
||||
|
|
|
@ -48,11 +48,11 @@ struct VToolEllipticalArcInitData : VAbstractSplineInitData
|
|||
VToolEllipticalArcInitData()
|
||||
: VAbstractSplineInitData(),
|
||||
center(NULL_ID),
|
||||
radius1("0"),
|
||||
radius2("0"),
|
||||
f1("0"),
|
||||
f2("0"),
|
||||
rotationAngle("0")
|
||||
radius1('0'),
|
||||
radius2('0'),
|
||||
f1('0'),
|
||||
f2('0'),
|
||||
rotationAngle('0')
|
||||
{}
|
||||
|
||||
quint32 center;
|
||||
|
|
|
@ -283,5 +283,5 @@ QString VToolCutArc::MakeToolTip() const
|
|||
return toolTip;
|
||||
};
|
||||
|
||||
return ArcToolTip(ArcToolTip("<table>", ar1, "1"), ar2, "2") + QLatin1String("</table>");
|
||||
return ArcToolTip(ArcToolTip("<table>", ar1, QChar('1')), ar2, QChar('2')) + QLatin1String("</table>");
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ struct VToolCurveIntersectAxisInitData : VToolLinePointInitData
|
|||
{
|
||||
VToolCurveIntersectAxisInitData()
|
||||
: VToolLinePointInitData(),
|
||||
formulaAngle("0"),
|
||||
formulaAngle('0'),
|
||||
basePointId(NULL_ID),
|
||||
curveId(NULL_ID)
|
||||
{}
|
||||
|
|
|
@ -50,7 +50,7 @@ struct VToolLineIntersectAxisInitData : VToolLinePointInitData
|
|||
{
|
||||
VToolLineIntersectAxisInitData()
|
||||
: VToolLinePointInitData(),
|
||||
formulaAngle("0"),
|
||||
formulaAngle('0'),
|
||||
basePointId(NULL_ID),
|
||||
firstPointId(NULL_ID),
|
||||
secondPointId(NULL_ID)
|
||||
|
|
|
@ -254,7 +254,7 @@ void VToolNormal::ReadToolAttributes(const QDomElement &domElement)
|
|||
formulaLength = doc->GetParametrString(domElement, AttrLength, QString());
|
||||
basePointId = doc->GetParametrUInt(domElement, AttrFirstPoint, NULL_ID_STR);
|
||||
secondPointId = doc->GetParametrUInt(domElement, AttrSecondPoint, NULL_ID_STR);
|
||||
angle = doc->GetParametrDouble(domElement, AttrAngle, "0");
|
||||
angle = doc->GetParametrDouble(domElement, AttrAngle, QChar('0'));
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -314,7 +314,7 @@ void VToolPointFromArcAndTangent::ReadToolAttributes(const QDomElement &domEleme
|
|||
{
|
||||
arcId = doc->GetParametrUInt(domElement, AttrArc, NULL_ID_STR);
|
||||
tangentPointId = doc->GetParametrUInt(domElement, AttrTangent, NULL_ID_STR);
|
||||
crossPoint = static_cast<CrossCirclesPoint>(doc->GetParametrUInt(domElement, AttrCrossPoint, "1"));
|
||||
crossPoint = static_cast<CrossCirclesPoint>(doc->GetParametrUInt(domElement, AttrCrossPoint, QChar('1')));
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -299,7 +299,7 @@ void VToolPointFromCircleAndTangent::ReadToolAttributes(const QDomElement &domEl
|
|||
circleCenterId = doc->GetParametrUInt(domElement, AttrCCenter, NULL_ID_STR);
|
||||
tangentPointId = doc->GetParametrUInt(domElement, AttrTangent, NULL_ID_STR);
|
||||
circleRadius = doc->GetParametrString(domElement, AttrCRadius);
|
||||
crossPoint = static_cast<CrossCirclesPoint>(doc->GetParametrUInt(domElement, AttrCrossPoint, "1"));
|
||||
crossPoint = static_cast<CrossCirclesPoint>(doc->GetParametrUInt(domElement, AttrCrossPoint, QChar('1')));
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -50,7 +50,7 @@ struct VToolPointFromCircleAndTangentInitData : VToolSinglePointInitData
|
|||
VToolPointFromCircleAndTangentInitData()
|
||||
: VToolSinglePointInitData(),
|
||||
circleCenterId(NULL_ID),
|
||||
circleRadius("0"),
|
||||
circleRadius('0'),
|
||||
tangentPointId(NULL_ID),
|
||||
crossPoint(CrossCirclesPoint::FirstPoint)
|
||||
{}
|
||||
|
|
|
@ -49,7 +49,7 @@ struct VToolPointOfContactInitData : VToolSinglePointInitData
|
|||
{
|
||||
VToolPointOfContactInitData()
|
||||
: VToolSinglePointInitData(),
|
||||
radius("0"),
|
||||
radius('0'),
|
||||
center(NULL_ID),
|
||||
firstPointId(NULL_ID),
|
||||
secondPointId(NULL_ID)
|
||||
|
|
|
@ -318,7 +318,7 @@ void VToolPointOfIntersectionArcs::ReadToolAttributes(const QDomElement &domElem
|
|||
{
|
||||
firstArcId = doc->GetParametrUInt(domElement, AttrFirstArc, NULL_ID_STR);
|
||||
secondArcId = doc->GetParametrUInt(domElement, AttrSecondArc, NULL_ID_STR);
|
||||
crossPoint = static_cast<CrossCirclesPoint>(doc->GetParametrUInt(domElement, AttrCrossPoint, "1"));
|
||||
crossPoint = static_cast<CrossCirclesPoint>(doc->GetParametrUInt(domElement, AttrCrossPoint, QChar('1')));
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -334,7 +334,7 @@ void VToolPointOfIntersectionCircles::ReadToolAttributes(const QDomElement &domE
|
|||
secondCircleCenterId = doc->GetParametrUInt(domElement, AttrC2Center, NULL_ID_STR);
|
||||
firstCircleRadius = doc->GetParametrString(domElement, AttrC1Radius);
|
||||
secondCircleRadius = doc->GetParametrString(domElement, AttrC2Radius);
|
||||
crossPoint = static_cast<CrossCirclesPoint>(doc->GetParametrUInt(domElement, AttrCrossPoint, "1"));
|
||||
crossPoint = static_cast<CrossCirclesPoint>(doc->GetParametrUInt(domElement, AttrCrossPoint, QChar('1')));
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -51,8 +51,8 @@ struct VToolPointOfIntersectionCirclesInitData : VToolSinglePointInitData
|
|||
: VToolSinglePointInitData(),
|
||||
firstCircleCenterId(NULL_ID),
|
||||
secondCircleCenterId(NULL_ID),
|
||||
firstCircleRadius("0"),
|
||||
secondCircleRadius("0"),
|
||||
firstCircleRadius('0'),
|
||||
secondCircleRadius('0'),
|
||||
crossPoint(CrossCirclesPoint::FirstPoint)
|
||||
{}
|
||||
|
||||
|
|
|
@ -370,8 +370,8 @@ void VToolPointOfIntersectionCurves::ReadToolAttributes(const QDomElement &domEl
|
|||
{
|
||||
firstCurveId = doc->GetParametrUInt(domElement, AttrCurve1, NULL_ID_STR);
|
||||
secondCurveId = doc->GetParametrUInt(domElement, AttrCurve2, NULL_ID_STR);
|
||||
vCrossPoint = static_cast<VCrossCurvesPoint>(doc->GetParametrUInt(domElement, AttrVCrossPoint, "1"));
|
||||
hCrossPoint = static_cast<HCrossCurvesPoint>(doc->GetParametrUInt(domElement, AttrHCrossPoint, "1"));
|
||||
vCrossPoint = static_cast<VCrossCurvesPoint>(doc->GetParametrUInt(domElement, AttrVCrossPoint, QChar('1')));
|
||||
hCrossPoint = static_cast<HCrossCurvesPoint>(doc->GetParametrUInt(domElement, AttrHCrossPoint, QChar('1')));
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -39,9 +39,9 @@ struct VToolPlaceLabelInitData : VAbstractNodeInitData
|
|||
{
|
||||
VToolPlaceLabelInitData()
|
||||
: VAbstractNodeInitData(),
|
||||
width("0"),
|
||||
height("0"),
|
||||
angle("0"),
|
||||
width('0'),
|
||||
height('0'),
|
||||
angle('0'),
|
||||
type(PlaceLabelType::Button),
|
||||
centerPoint(NULL_ID)
|
||||
{}
|
||||
|
|
|
@ -993,7 +993,7 @@ void VToolSeamAllowance::RefreshDataInFile()
|
|||
Q_STATIC_ASSERT_X(VPatternConverter::PatternMinVer < CONVERTER_VERSION_CHECK(0, 4, 0),
|
||||
"Time to refactor the code.");
|
||||
|
||||
const uint version = doc->GetParametrUInt(domElement, AttrVersion, "1");
|
||||
const uint version = doc->GetParametrUInt(domElement, AttrVersion, QChar('1'));
|
||||
if (version == 1)
|
||||
{
|
||||
const VPiece piece = VAbstractTool::data.GetPiece(m_id);
|
||||
|
|
|
@ -46,7 +46,7 @@ struct VToolSeamAllowanceInitData : VAbstractToolInitData
|
|||
VToolSeamAllowanceInitData()
|
||||
: VAbstractToolInitData(),
|
||||
detail(),
|
||||
width("0"),
|
||||
width('0'),
|
||||
drawName()
|
||||
{}
|
||||
|
||||
|
|
|
@ -583,7 +583,7 @@ quint32 AddNodeElArc(const VPieceNode &node, const VToolUnionDetailsInitData &in
|
|||
QScopedPointer<VEllipticalArc> arc1(new VEllipticalArc (*tmpCenter, arc->GetRadius1(), arc->GetRadius2(),
|
||||
arc->GetFormulaRadius1(), arc->GetFormulaRadius2(),
|
||||
l1.angle(), QString().setNum(l1.angle()), l2.angle(),
|
||||
QString().setNum(l2.angle()), 0, "0"));
|
||||
QString().setNum(l2.angle()), 0, QChar('0')));
|
||||
arc1->setMode(Draw::Modeling);
|
||||
|
||||
QScopedPointer<VEllipticalArc> arc2(new VEllipticalArc(*arc1));
|
||||
|
@ -687,13 +687,13 @@ quint32 AddNodeSplinePath(const VPieceNode &node, const VToolUnionDetailsInitDat
|
|||
const QString angle1F = QString().number(angle1);
|
||||
|
||||
path->append(VSplinePoint(*p1, angle1, angle1F, spl.GetStartAngle(), spl.GetStartAngleFormula(),
|
||||
0, "0", spline.GetC1Length(), spline.GetC1LengthFormula()));
|
||||
0, QChar('0'), spline.GetC1Length(), spline.GetC1LengthFormula()));
|
||||
}
|
||||
|
||||
const qreal angle2 = spl.GetEndAngle()+180;
|
||||
const QString angle2F = QString().number(angle2);
|
||||
qreal pL2 = 0;
|
||||
QString pL2F("0");
|
||||
QString pL2F('0');
|
||||
if (i+1 <= splinePath->CountSubSpl())
|
||||
{
|
||||
const VSpline nextSpline = splinePath->GetSpline(i+1);
|
||||
|
@ -997,7 +997,7 @@ void UpdateNodeElArc(VContainer *data, const VPieceNode &node, QVector<quint32>
|
|||
QScopedPointer<VEllipticalArc> arc1(new VEllipticalArc (*center, arc->GetRadius1(), arc->GetRadius2(),
|
||||
arc->GetFormulaRadius1(), arc->GetFormulaRadius2(),
|
||||
l1.angle(), QString().setNum(l1.angle()), l2.angle(),
|
||||
QString().setNum(l2.angle()), 0, "0"));
|
||||
QString().setNum(l2.angle()), 0, QChar('0')));
|
||||
arc1->setMode(Draw::Modeling);
|
||||
data->UpdateGObject(TakeNextId(children), arc1.take());
|
||||
}
|
||||
|
@ -1064,14 +1064,14 @@ void UpdateNodeSplinePath(VContainer *data, const VPieceNode &node, QVector<quin
|
|||
const QString angle1F = QString().number(angle1);
|
||||
|
||||
path->append(VSplinePoint(*p1, angle1, angle1F, spl.GetStartAngle(), spl.GetStartAngleFormula(),
|
||||
0, "0", spline.GetC1Length(), spline.GetC1LengthFormula()));
|
||||
0, QChar('0'), spline.GetC1Length(), spline.GetC1LengthFormula()));
|
||||
}
|
||||
|
||||
const qreal angle2 = spl.GetEndAngle()+180;
|
||||
const QString angle2F = QString().number(angle2);
|
||||
|
||||
qreal pL2 = 0;
|
||||
QString pL2F("0");
|
||||
QString pL2F('0');
|
||||
if (i+1 <= splinePath->CountSubSpl())
|
||||
{
|
||||
const VSpline nextSpline = splinePath->GetSpline(i+1);
|
||||
|
|
|
@ -79,8 +79,8 @@ void AddItemToGroup::performUndoRedo(bool isUndo)
|
|||
|
||||
// set the item visible. Because if the undo is done when unvisible and it's not in any group after the
|
||||
// undo, it stays unvisible until the entire drawing is completly rerendered.
|
||||
quint32 objectId = doc->GetParametrUInt(xml,QString("object"),NULL_ID_STR);
|
||||
quint32 toolId = doc->GetParametrUInt(xml,QString("tool"),NULL_ID_STR);
|
||||
quint32 objectId = doc->GetParametrUInt(xml, QStringLiteral("object"), NULL_ID_STR);
|
||||
quint32 toolId = doc->GetParametrUInt(xml, QStringLiteral("tool"), NULL_ID_STR);
|
||||
VDataTool* tool = doc->getTool(toolId);
|
||||
tool->GroupVisibility(objectId,true);
|
||||
}
|
||||
|
|
|
@ -88,8 +88,8 @@ void RemoveItemFromGroup::performUndoRedo(bool isUndo)
|
|||
|
||||
// set the item visible. Because if the undo is done when unvisibile and it's not in any group after the
|
||||
// undo, it stays unvisible until the entire drawing is completly rerendered.
|
||||
quint32 objectId = doc->GetParametrUInt(xml,QString("object"),NULL_ID_STR);
|
||||
quint32 toolId = doc->GetParametrUInt(xml,QString("tool"),NULL_ID_STR);
|
||||
quint32 objectId = doc->GetParametrUInt(xml, QStringLiteral("object"), NULL_ID_STR);
|
||||
quint32 toolId = doc->GetParametrUInt(xml, QStringLiteral("tool"), NULL_ID_STR);
|
||||
VDataTool* tool = doc->getTool(toolId);
|
||||
tool->GroupVisibility(objectId,true);
|
||||
}
|
||||
|
|
|
@ -256,7 +256,7 @@ void VisToolSplinePath::Creating(const QPointF &pSpl, int size)
|
|||
}
|
||||
else
|
||||
{
|
||||
path[size-1].SetLength2(0, "0");
|
||||
path[size-1].SetLength2(0, QChar('0'));
|
||||
}
|
||||
emit PathChanged(path);
|
||||
}
|
||||
|
@ -273,8 +273,8 @@ void VisToolSplinePath::Creating(const QPointF &pSpl, int size)
|
|||
}
|
||||
else
|
||||
{
|
||||
path[size-1].SetLength1(0, "0");
|
||||
path[size-1].SetLength2(0, "0");
|
||||
path[size-1].SetLength1(0, QChar('0'));
|
||||
path[size-1].SetLength2(0, QChar('0'));
|
||||
}
|
||||
emit PathChanged(path);
|
||||
}
|
||||
|
@ -293,7 +293,7 @@ void VisToolSplinePath::Creating(const QPointF &pSpl, int size)
|
|||
}
|
||||
else
|
||||
{
|
||||
path[size-1].SetLength2(0, "0");
|
||||
path[size-1].SetLength2(0, QChar('0'));
|
||||
}
|
||||
emit PathChanged(path);
|
||||
|
||||
|
|
|
@ -104,8 +104,8 @@ void TST_VPiece::ClearLoop()
|
|||
detail.GetPath().Append(VPieceNode(309, Tool::NodePoint));
|
||||
detail.GetPath().Append(VPieceNode(310, Tool::NodePoint));
|
||||
// Closed
|
||||
detail.GetPath()[0].SetFormulaSABefore("0");
|
||||
detail.GetPath()[detail.GetPath().CountNodes()-1].SetFormulaSAAfter("0");
|
||||
detail.GetPath()[0].SetFormulaSABefore(QChar('0'));
|
||||
detail.GetPath()[detail.GetPath().CountNodes()-1].SetFormulaSAAfter(QChar('0'));
|
||||
|
||||
const QVector<QPointF> pointsEkv = detail.SeamAllowancePoints(data.data());
|
||||
|
||||
|
@ -243,7 +243,7 @@ void TST_VPiece::Issue620()
|
|||
{
|
||||
const QSharedPointer<VPointF> point = data->GeometricObject<VPointF>(6);
|
||||
VSplinePoint p(*point.data(), 239.37700000000001, "239.377", 419.37700000000001, "59.3765",
|
||||
0, "0", 109.55943307086613, "2.89876");
|
||||
0, QChar('0'), 109.55943307086613, "2.89876");
|
||||
points.append(p);
|
||||
}
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ void TST_VSplinePath::TestRotation_data()
|
|||
|
||||
{
|
||||
VPointF pSpline(30, 39.999874015748034, "X", 5.0000125984251973, 9.9999874015748045);
|
||||
VSplinePoint p(pSpline, 89.208600000000004, "89.2086", 269.20859999999999, "269.209", 0, "0",
|
||||
VSplinePoint p(pSpline, 89.208600000000004, "89.2086", 269.20859999999999, "269.209", 0, QChar('0'),
|
||||
153.33618897637794, "4.05702");
|
||||
originPoints.append(p);
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ void TST_VSplinePath::TestRotation_data()
|
|||
{
|
||||
VPointF pSpline(820.42771653543309, 417.95262992125987, "X", 5.0000125984251973, 9.9999874015748045);
|
||||
VSplinePoint p(pSpline, 173.39500000000001, "173.395", 353.39499999999998, "353.395",
|
||||
381.23716535433073, "10.0869", 0, "0");
|
||||
381.23716535433073, "10.0869", 0, QChar('0'));
|
||||
originPoints.append(p);
|
||||
}
|
||||
|
||||
|
@ -75,7 +75,7 @@ void TST_VSplinePath::TestRotation_data()
|
|||
|
||||
{
|
||||
VPointF pSpline(-347.55140568256883, 400.53936590535034, "X", 5.0000125984251973, 9.9999874015748045);
|
||||
VSplinePoint p(pSpline, 176.56789999999998, "176.568", 356.56790000000001, "356.568", 0, "0",
|
||||
VSplinePoint p(pSpline, 176.56789999999998, "176.568", 356.56790000000001, "356.568", 0, QChar('0'),
|
||||
153.33618897637794, "4.05702");
|
||||
rotatedPoints.append(p);
|
||||
}
|
||||
|
@ -90,7 +90,7 @@ void TST_VSplinePath::TestRotation_data()
|
|||
{
|
||||
VPointF pSpline(66.417055567032421, -371.63572683892357, "X", 5.0000125984251973, 9.9999874015748045);
|
||||
VSplinePoint p(pSpline, 260.7543, "260.754", 80.754300000000015, "80.7543", 381.23716535433078, "10.0869", 0,
|
||||
"0");
|
||||
QChar('0'));
|
||||
rotatedPoints.append(p);
|
||||
}
|
||||
|
||||
|
@ -146,7 +146,7 @@ void TST_VSplinePath::TestFlip_data()
|
|||
|
||||
{
|
||||
VPointF pSpline(30, 39.999874015748034, "X", 5.0000125984251973, 9.9999874015748045);
|
||||
VSplinePoint p(pSpline, 89.208600000000004, "89.2086", 269.20859999999999, "269.209", 0, "0",
|
||||
VSplinePoint p(pSpline, 89.208600000000004, "89.2086", 269.20859999999999, "269.209", 0, QChar('0'),
|
||||
153.33618897637794, "4.05702");
|
||||
originPoints.append(p);
|
||||
}
|
||||
|
@ -161,7 +161,7 @@ void TST_VSplinePath::TestFlip_data()
|
|||
{
|
||||
VPointF pSpline(820.42771653543309, 417.95262992125987, "X", 5.0000125984251973, 9.9999874015748045);
|
||||
VSplinePoint p(pSpline, 173.39500000000001, "173.395", 353.39499999999998, "353.395",
|
||||
381.23716535433073, "10.0869", 0, "0");
|
||||
381.23716535433073, "10.0869", 0, QChar('0'));
|
||||
originPoints.append(p);
|
||||
}
|
||||
|
||||
|
@ -189,7 +189,7 @@ void TST_VSplinePath::TestFlip()
|
|||
const VSplinePath splPath(originPoints);
|
||||
const VSplinePath res = splPath.Flip(axis, prefix);
|
||||
|
||||
const QString errorMsg = QString("The name doesn't contain the prefix '%1'.").arg(prefix);
|
||||
const QString errorMsg = QStringLiteral("The name doesn't contain the prefix '%1'.").arg(prefix);
|
||||
QVERIFY2(res.name().endsWith(prefix), qUtf8Printable(errorMsg));
|
||||
|
||||
QCOMPARE(splPath.GetLength(), res.GetLength());
|
||||
|
|
Loading…
Reference in New Issue
Block a user