Refactoring. Made strings static.

--HG--
branch : feature
This commit is contained in:
Roman Telezhynskyi 2017-01-25 15:47:55 +02:00
parent af5bbf02f6
commit 7f1de2e044

View File

@ -66,73 +66,73 @@ const QString VPatternConverter::CurrentSchema = QStringLiteral("://schema/pa
// The list of all string we use for conversion
// Better to use global variables because repeating QStringLiteral blows up code size
const QString strUnit = QStringLiteral("unit");
const QString strVersion = QStringLiteral("version");
const QString strName = QStringLiteral("name");
const QString strBase = QStringLiteral("base");
const QString strFormula = QStringLiteral("formula");
const QString strId = QStringLiteral("id");
const QString strKGrowth = QStringLiteral("kgrowth");
const QString strKSize = QStringLiteral("ksize");
const QString strPoint = QStringLiteral("point");
const QString strLength = QStringLiteral("length");
const QString strAngle = QStringLiteral("angle");
const QString strC1Radius = QStringLiteral("c1Radius");
const QString strC2Radius = QStringLiteral("c2Radius");
const QString strCRadius = QStringLiteral("cRadius");
const QString strArc = QStringLiteral("arc");
const QString strAngle1 = QStringLiteral("angle1");
const QString strAngle2 = QStringLiteral("angle2");
const QString strRadius = QStringLiteral("radius");
const QString strPathPoint = QStringLiteral("pathPoint");
const QString strKAsm1 = QStringLiteral("kAsm1");
const QString strKAsm2 = QStringLiteral("kAsm2");
const QString strPath = QStringLiteral("path");
const QString strType = QStringLiteral("type");
const QString strCutArc = QStringLiteral("cutArc");
const QString strSpline = QStringLiteral("spline");
const QString strSplinePath = QStringLiteral("splinePath");
const QString strCutSpline = QStringLiteral("cutSpline");
const QString strCutSplinePath = QStringLiteral("cutSplinePath");
const QString strColor = QStringLiteral("color");
const QString strMeasurements = QStringLiteral("measurements");
const QString strIncrement = QStringLiteral("increment");
const QString strIncrements = QStringLiteral("increments");
const QString strModeling = QStringLiteral("modeling");
const QString strTools = QStringLiteral("tools");
const QString strIdTool = QStringLiteral("idTool");
const QString strIdObject = QStringLiteral("idObject");
const QString strChildren = QStringLiteral("children");
const QString strChild = QStringLiteral("child");
const QString strPointOfIntersectionCurves = QStringLiteral("pointOfIntersectionCurves");
const QString strCurveIntersectAxis = QStringLiteral("curveIntersectAxis");
const QString strCurve = QStringLiteral("curve");
const QString strCurve1 = QStringLiteral("curve1");
const QString strCurve2 = QStringLiteral("curve2");
const QString strModelingPath = QStringLiteral("modelingPath");
const QString strModelingSpline = QStringLiteral("modelingSpline");
const QString strPointFromArcAndTangent = QStringLiteral("pointFromArcAndTangent");
const QString strPointOfIntersectionArcs = QStringLiteral("pointOfIntersectionArcs");
const QString strFirstArc = QStringLiteral("firstArc");
const QString strSecondArc = QStringLiteral("secondArc");
const QString strDetail = QStringLiteral("detail");
const QString strSupplement = QStringLiteral("supplement");
const QString strClosed = QStringLiteral("closed");
const QString strWidth = QStringLiteral("width");
const QString strNode = QStringLiteral("node");
const QString strNodes = QStringLiteral("nodes");
const QString strData = QStringLiteral("data");
const QString strPatternInfo = QStringLiteral("patternInfo");
const QString strGrainline = QStringLiteral("grainline");
const QString strReverse = QStringLiteral("reverse");
const QString strMx = QStringLiteral("mx");
const QString strMy = QStringLiteral("my");
const QString strForbidFlipping = QStringLiteral("forbidFlipping");
const QString strInLayout = QStringLiteral("inLayout");
const QString strSeamAllowance = QStringLiteral("seamAllowance");
const QString strNodeType = QStringLiteral("nodeType");
const QString strDet = QStringLiteral("det");
const QString strTypeObject = QStringLiteral("typeObject");
static const QString strUnit = QStringLiteral("unit");
static const QString strVersion = QStringLiteral("version");
static const QString strName = QStringLiteral("name");
static const QString strBase = QStringLiteral("base");
static const QString strFormula = QStringLiteral("formula");
static const QString strId = QStringLiteral("id");
static const QString strKGrowth = QStringLiteral("kgrowth");
static const QString strKSize = QStringLiteral("ksize");
static const QString strPoint = QStringLiteral("point");
static const QString strLength = QStringLiteral("length");
static const QString strAngle = QStringLiteral("angle");
static const QString strC1Radius = QStringLiteral("c1Radius");
static const QString strC2Radius = QStringLiteral("c2Radius");
static const QString strCRadius = QStringLiteral("cRadius");
static const QString strArc = QStringLiteral("arc");
static const QString strAngle1 = QStringLiteral("angle1");
static const QString strAngle2 = QStringLiteral("angle2");
static const QString strRadius = QStringLiteral("radius");
static const QString strPathPoint = QStringLiteral("pathPoint");
static const QString strKAsm1 = QStringLiteral("kAsm1");
static const QString strKAsm2 = QStringLiteral("kAsm2");
static const QString strPath = QStringLiteral("path");
static const QString strType = QStringLiteral("type");
static const QString strCutArc = QStringLiteral("cutArc");
static const QString strSpline = QStringLiteral("spline");
static const QString strSplinePath = QStringLiteral("splinePath");
static const QString strCutSpline = QStringLiteral("cutSpline");
static const QString strCutSplinePath = QStringLiteral("cutSplinePath");
static const QString strColor = QStringLiteral("color");
static const QString strMeasurements = QStringLiteral("measurements");
static const QString strIncrement = QStringLiteral("increment");
static const QString strIncrements = QStringLiteral("increments");
static const QString strModeling = QStringLiteral("modeling");
static const QString strTools = QStringLiteral("tools");
static const QString strIdTool = QStringLiteral("idTool");
static const QString strIdObject = QStringLiteral("idObject");
static const QString strChildren = QStringLiteral("children");
static const QString strChild = QStringLiteral("child");
static const QString strPointOfIntersectionCurves = QStringLiteral("pointOfIntersectionCurves");
static const QString strCurveIntersectAxis = QStringLiteral("curveIntersectAxis");
static const QString strCurve = QStringLiteral("curve");
static const QString strCurve1 = QStringLiteral("curve1");
static const QString strCurve2 = QStringLiteral("curve2");
static const QString strModelingPath = QStringLiteral("modelingPath");
static const QString strModelingSpline = QStringLiteral("modelingSpline");
static const QString strPointFromArcAndTangent = QStringLiteral("pointFromArcAndTangent");
static const QString strPointOfIntersectionArcs = QStringLiteral("pointOfIntersectionArcs");
static const QString strFirstArc = QStringLiteral("firstArc");
static const QString strSecondArc = QStringLiteral("secondArc");
static const QString strDetail = QStringLiteral("detail");
static const QString strSupplement = QStringLiteral("supplement");
static const QString strClosed = QStringLiteral("closed");
static const QString strWidth = QStringLiteral("width");
static const QString strNode = QStringLiteral("node");
static const QString strNodes = QStringLiteral("nodes");
static const QString strData = QStringLiteral("data");
static const QString strPatternInfo = QStringLiteral("patternInfo");
static const QString strGrainline = QStringLiteral("grainline");
static const QString strReverse = QStringLiteral("reverse");
static const QString strMx = QStringLiteral("mx");
static const QString strMy = QStringLiteral("my");
static const QString strForbidFlipping = QStringLiteral("forbidFlipping");
static const QString strInLayout = QStringLiteral("inLayout");
static const QString strSeamAllowance = QStringLiteral("seamAllowance");
static const QString strNodeType = QStringLiteral("nodeType");
static const QString strDet = QStringLiteral("det");
static const QString strTypeObject = QStringLiteral("typeObject");
//---------------------------------------------------------------------------------------------------------------------
VPatternConverter::VPatternConverter(const QString &fileName)