56 #include "../ifc/xml/vabstractpattern.h"
57 #include "../ifc/xml/vtoolrecord.h"
58 #include "../vpatterndb/vcontainer.h"
59 #include "../ifc/xml/vpatternconverter.h"
72 QObject *parent =
nullptr);
88 virtual void setXMLContent(
const QString &fileName) Q_DECL_OVERRIDE;
89 virtual bool SaveDocument(
const QString &fileName, QString &error) Q_DECL_OVERRIDE;
105 virtual QString
GenerateLabel(
const LabelType &type,
const QString &reservedName = QString())
const Q_DECL_OVERRIDE;
106 virtual QString
GenerateSuffix(
const QString &type)
const Q_DECL_OVERRIDE;
128 virtual void customEvent(QEvent * event) Q_DECL_OVERRIDE;
150 const
Document &parse, const QString &type);
154 const
Document &parse, const QString &type);
156 const
Document &parse, const QString &type);
158 const QString &type);
160 const
Document &parse, const QString &type);
162 const QString &type);
170 qreal &my,
bool &labelVisible, QString &lineType,
171 QString &lineWeight, QString &lineColor);
173 qreal &my,
bool &labelVisible);
177 template <typename T>
212 "Time to refactor the code.");
220 "Time to refactor the code.");
The VContainer class container of all variables.
The VMainGraphicsScene class main scene.
The VNodeDetail class keep information about detail node.
The VPattern class working with pattern file.
void SetDefCustomSize(int value)
virtual void customEvent(QEvent *event) Q_DECL_OVERRIDE
VMainGraphicsScene * draftScene
mode current draw mode.
void ParseToolEndLine(VMainGraphicsScene *scene, QDomElement &domElement, const Document &parse)
int GetDefCustomSize() const
void MoveDownIncrement(const QString &name)
void ParsePieceDataTag(const QDomElement &domElement, VPiece &piece) const
void ParseNodeArc(const QDomElement &domElement, const Document &parse)
void ParseOperationElement(VMainGraphicsScene *scene, QDomElement &domElement, const Document &parse, const QString &type)
void ParsePiecePatternInfo(const QDomElement &domElement, VPiece &piece) const
QVector< quint32 > getActivePatternPieces() const
QString GetLabelBase(quint32 index) const
VMainGraphicsScene * pieceScene
void replaceNameInFormula(QVector< VFormulaField > &expressions, const QString &name, const QString &newName)
void ParseToolPointOfIntersectionCircles(VMainGraphicsScene *scene, QDomElement &domElement, const Document &parse)
void ParsePathElement(VMainGraphicsScene *scene, QDomElement &domElement, const Document &parse)
quint32 getActiveBasePoint()
getActiveBasePoint return id base point current draft block.
static const QString AttrReadOnly
void setIncrementDescription(const QString &name, const QString &text)
void ParseIncrementsElement(const QDomNode &node)
ParseIncrementsElement parse increments tag.
Draw * mode
data container with data.
void ParseToolTrueDarts(VMainGraphicsScene *scene, const QDomElement &domElement, const Document &parse)
VPattern(VContainer *data, Draw *mode, VMainGraphicsScene *draftScene, VMainGraphicsScene *pieceScene, QObject *parent=nullptr)
void ParseToolPointOfIntersectionCurves(VMainGraphicsScene *scene, QDomElement &domElement, const Document &parse)
void ParseToolPointFromArcAndTangent(VMainGraphicsScene *scene, const QDomElement &domElement, const Document &parse)
QRectF ActiveDrawBoundingRect() const
void ParseAnchorPoint(const QDomElement &domElement, const Document &parse)
void ParseToolHeight(VMainGraphicsScene *scene, const QDomElement &domElement, const Document &parse)
void ParseToolBisector(VMainGraphicsScene *scene, QDomElement &domElement, const Document &parse)
void ParseToolCutSplinePath(VMainGraphicsScene *scene, QDomElement &domElement, const Document &parse)
void ToolsCommonAttributes(const QDomElement &domElement, quint32 &id)
int GetDefCustomHeight() const
void ParseNodeSplinePath(const QDomElement &domElement, const Document &parse)
void PrepareForParse(const Document &parse)
Q_STATIC_ASSERT_X(VPatternConverter::PatternMinVer< CONVERTER_VERSION_CHECK(0, 2, 7), "Time to refactor the code.")
void ParseNodeEllipticalArc(const QDomElement &domElement, const Document &parse)
void ParseToolLineIntersectAxis(VMainGraphicsScene *scene, QDomElement &domElement, const Document &parse)
virtual QString GenerateSuffix(const QString &type) const Q_DECL_OVERRIDE
void parseCurrentDraftBlock()
void ParseToolArcWithLength(VMainGraphicsScene *scene, QDomElement &domElement, const Document &parse)
QRectF ToolBoundingRect(const QRectF &rec, const quint32 &id) const
void ParseToolLineIntersect(VMainGraphicsScene *scene, const QDomElement &domElement, const Document &parse)
void ParseToolAlongLine(VMainGraphicsScene *scene, QDomElement &domElement, const Document &parse)
void parsePieceElement(QDomElement &domElement, const Document &parse)
parsePieceElement parse piece tag.
void ParseToolCurveIntersectAxis(VMainGraphicsScene *scene, QDomElement &domElement, const Document &parse)
void ParseNodePoint(const QDomElement &domElement, const Document &parse)
void LiteParseIncrements()
QDomElement FindIncrement(const QString &name) const
void addEmptyCustomVariable(const QString &name)
void ParseToolCubicBezier(VMainGraphicsScene *scene, const QDomElement &domElement, const Document &parse)
void ParseArcElement(VMainGraphicsScene *scene, QDomElement &domElement, const Document &parse, const QString &type)
ParseArcElement parse arc tag.
virtual void DecrementReferens(quint32 id) const Q_DECL_OVERRIDE
DecrementReferens decrement reference parent objects.
void parsePatternPieces(const QDomElement &domElement, const Document &parse)
parsePatternPieces parse pieces tag.
void ParseToolPointOfContact(VMainGraphicsScene *scene, QDomElement &domElement, const Document &parse)
void ParseToolPointFromCircleAndTangent(VMainGraphicsScene *scene, QDomElement &domElement, const Document &parse)
virtual void CreateEmptyFile() Q_DECL_OVERRIDE
CreateEmptyFile create minimal empty file.
void ParseOldToolSplinePath(VMainGraphicsScene *scene, const QDomElement &domElement, const Document &parse)
void PointsCommonAttributes(const QDomElement &domElement, quint32 &id, QString &name, qreal &mx, qreal &my, bool &labelVisible, QString &lineType, QString &lineWeight, QString &lineColor)
QDomElement MakeEmptyIncrement(const QString &name)
void ParseNodeSpline(const QDomElement &domElement, const Document &parse)
void ParsePieceGrainline(const QDomElement &domElement, VPiece &piece) const
void SetIncrementFormula(const QString &name, const QString &text)
void ParseToolSplinePath(VMainGraphicsScene *scene, const QDomElement &domElement, const Document &parse)
void ParseToolArc(VMainGraphicsScene *scene, QDomElement &domElement, const Document &parse)
void ParseToolShoulderPoint(VMainGraphicsScene *scene, QDomElement &domElement, const Document &parse)
virtual QString GenerateLabel(const LabelType &type, const QString &reservedName=QString()) const Q_DECL_OVERRIDE
GenerateLabel create name for draft block basepoint.
void ParseToolMirrorByLine(VMainGraphicsScene *scene, QDomElement &domElement, const Document &parse)
void SetReadOnly(bool rOnly)
void ParsePointElement(VMainGraphicsScene *scene, QDomElement &domElement, const Document &parse, const QString &type)
ParsePointElement parse point tag.
void MoveUpIncrement(const QString &name)
void ParseToolsElement(VMainGraphicsScene *scene, const QDomElement &domElement, const Document &parse, const QString &type)
ParseToolsElement parse tools tag.
void ParseToolEllipticalArc(VMainGraphicsScene *scene, QDomElement &domElement, const Document &parse)
void ParseToolRotation(VMainGraphicsScene *scene, QDomElement &domElement, const Document &parse)
VNodeDetail parsePieceNode(const QDomElement &domElement) const
void setIncrementName(const QString &name, const QString &text)
void SplinesCommonAttributes(const QDomElement &domElement, quint32 &id, quint32 &idObject, quint32 &idTool)
void ParseToolBasePoint(VMainGraphicsScene *scene, const QDomElement &domElement, const Document &parse)
void removeCustomVariable(const QString &name)
void ParseToolCutSpline(VMainGraphicsScene *scene, QDomElement &domElement, const Document &parse)
virtual void setXMLContent(const QString &fileName) Q_DECL_OVERRIDE
virtual void UpdateToolData(const quint32 &id, VContainer *data) Q_DECL_OVERRIDE
UpdateToolData update tool in list tools.
void parseIntersectXYTool(VMainGraphicsScene *scene, const QDomElement &domElement, const Document &parse)
void ParseToolCutArc(VMainGraphicsScene *scene, QDomElement &domElement, const Document &parse)
virtual bool SaveDocument(const QString &fileName, QString &error) Q_DECL_OVERRIDE
void ParseToolCubicBezierPath(VMainGraphicsScene *scene, const QDomElement &domElement, const Document &parse)
virtual void IncrementReferens(quint32 id) const Q_DECL_OVERRIDE
IncrementReferens increment reference parent objects.
void ParseToolNormal(VMainGraphicsScene *scene, QDomElement &domElement, const Document &parse)
void ParseEllipticalArcElement(VMainGraphicsScene *scene, QDomElement &domElement, const Document &parse, const QString &type)
ParseEllipticalArcElement parse elliptical arc tag.
void ParseSplineElement(VMainGraphicsScene *scene, QDomElement &domElement, const Document &parse, const QString &type)
ParseSplineElement parse spline tag.
void parseDraftBlockElement(const QDomNode &node, const Document &parse)
parseDraftBlockElement parse draw tag.
virtual void LiteParseTree(const Document &parse) Q_DECL_OVERRIDE
LiteParseTree lite parse file.
void ParseToolSpline(VMainGraphicsScene *scene, QDomElement &domElement, const Document &parse)
void ParseToolMove(VMainGraphicsScene *scene, QDomElement &domElement, const Document &parse)
void ParseLineElement(VMainGraphicsScene *scene, const QDomElement &domElement, const Document &parse)
ParseLineElement parse line tag.
void ParseToolTriangle(VMainGraphicsScene *scene, const QDomElement &domElement, const Document &parse)
void SetDefCustom(bool value)
void SetDefCustomHeight(int value)
void addEmptyCustomVariableAfter(const QString &after, const QString &name)
void ParseOldToolSpline(VMainGraphicsScene *scene, const QDomElement &domElement, const Document &parse)
void Parse(const Document &parse)
Parse parse file.
void setCurrentData()
setCurrentData set current data set.
qreal EvalFormula(VContainer *data, const QString &formula, bool *ok) const
void ParseDrawMode(const QDomNode &node, const Document &parse, const Draw &mode)
ParseDrawMode parse draw tag with draw mode.
void ParseToolPointOfIntersectionArcs(VMainGraphicsScene *scene, const QDomElement &domElement, const Document &parse)
void parsePieceNodes(const QDomElement &domElement, VPiece &piece, qreal width, bool closed) const
void ParseToolMirrorByAxis(VMainGraphicsScene *scene, QDomElement &domElement, const Document &parse)
#define CONVERTER_VERSION_CHECK(major, minor, patch)