Seamly2D
Code documentation
VPattern Class Reference

The VPattern class working with pattern file. More...

#include <vpattern.h>

Inheritance diagram for VPattern:
Collaboration diagram for VPattern:

Public Slots

virtual void LiteParseTree (const Document &parse) Q_DECL_OVERRIDE
 LiteParseTree lite parse file. More...
 
- Public Slots inherited from VAbstractPattern
virtual void LiteParseTree (const Document &parse)=0
 
void haveLiteChange ()
 haveLiteChange we have unsaved change. More...
 
void NeedFullParsing ()
 
void ClearScene ()
 
void updatePieceList (quint32 id)
 
void selectedPiece (quint32 id)
 

Public Member Functions

 VPattern (VContainer *data, Draw *mode, VMainGraphicsScene *draftScene, VMainGraphicsScene *pieceScene, QObject *parent=nullptr)
 
virtual void CreateEmptyFile () Q_DECL_OVERRIDE
 CreateEmptyFile create minimal empty file. More...
 
void Parse (const Document &parse)
 Parse parse file. More...
 
void setCurrentData ()
 setCurrentData set current data set. More...
 
virtual void UpdateToolData (const quint32 &id, VContainer *data) Q_DECL_OVERRIDE
 UpdateToolData update tool in list tools. More...
 
virtual void IncrementReferens (quint32 id) const Q_DECL_OVERRIDE
 IncrementReferens increment reference parent objects. More...
 
virtual void DecrementReferens (quint32 id) const Q_DECL_OVERRIDE
 DecrementReferens decrement reference parent objects. More...
 
quint32 getActiveBasePoint ()
 getActiveBasePoint return id base point current draft block. More...
 
QVector< quint32 > getActivePatternPieces () const
 
virtual void setXMLContent (const QString &fileName) Q_DECL_OVERRIDE
 
virtual bool SaveDocument (const QString &fileName, QString &error) Q_DECL_OVERRIDE
 
QRectF ActiveDrawBoundingRect () const
 
void addEmptyCustomVariable (const QString &name)
 
void addEmptyCustomVariableAfter (const QString &after, const QString &name)
 
void removeCustomVariable (const QString &name)
 
void MoveUpIncrement (const QString &name)
 
void MoveDownIncrement (const QString &name)
 
void setIncrementName (const QString &name, const QString &text)
 
void SetIncrementFormula (const QString &name, const QString &text)
 
void setIncrementDescription (const QString &name, const QString &text)
 
void replaceNameInFormula (QVector< VFormulaField > &expressions, const QString &name, const QString &newName)
 
virtual QString GenerateLabel (const LabelType &type, const QString &reservedName=QString()) const Q_DECL_OVERRIDE
 GenerateLabel create name for draft block basepoint. More...
 
virtual QString GenerateSuffix (const QString &type) const Q_DECL_OVERRIDE
 
bool IsDefCustom () const
 
void SetDefCustom (bool value)
 
int GetDefCustomHeight () const
 
void SetDefCustomHeight (int value)
 
int GetDefCustomSize () const
 
void SetDefCustomSize (int value)
 
bool IsReadOnly () const
 
void SetReadOnly (bool rOnly)
 
void LiteParseIncrements ()
 
template<typename T >
QT_WARNING_POP QRectF ToolBoundingRect (const QRectF &rect, const quint32 &id) const
 
- Public Member Functions inherited from VAbstractPattern
 VAbstractPattern (QObject *parent=nullptr)
 
virtual ~VAbstractPattern () Q_DECL_EQ_DEFAULT
 
QStringList ListMeasurements () const
 
QVector< VFormulaFieldListExpressions () const
 
QVector< VFormulaFieldListIncrementExpressions () const
 
void changeActiveDraftBlock (const QString &name, const Document &parse=Document::FullParse)
 changeActiveDraftBlock set new active draft block name. More...
 
QString getActiveDraftBlockName () const
 getActiveDraftBlockName return current draft block name. More...
 
bool draftBlockNameExists (const QString &name) const
 draftBlockNameExists check if draft block with this name exists. More...
 
int draftBlockCount () const
 
QDomElement getDraftBlockElement (const QString &name)
 
bool renameDraftBlock (const QString &oldName, const QString &newName)
 renameDraftBlock change draft block name. More...
 
bool appendDraftBlock (const QString &name)
 appendDraftBlock add new draft block. More...
 
bool getActiveNodeElement (const QString &name, QDomElement &element) const
 getActiveNodeElement find element in current draft block by name. More...
 
quint32 getCursor () const
 
void setCursor (const quint32 &value)
 
void setDefaultPen (Pen pen)
 
QString getDefaultLineColor () const
 
qreal getDefaultLineWeight () const
 
QString getDefaultLineType () const
 
void AddToolOnRemove (VDataTool *tool)
 
QVector< VToolRecord > * getHistory ()
 getHistory return list with list of history records. More...
 
QVector< VToolRecordgetBlockHistory () const
 
QMap< quint32, ToolgetGroupObjHistory () const
 
QString MPath () const
 
void SetMPath (const QString &path)
 
quint32 SiblingNodeId (const quint32 &nodeId) const
 
QStringList getPatternPieces () const
 
QMap< GHeights, bool > GetGradationHeights () const
 
void SetGradationHeights (const QMap< GHeights, bool > &options)
 
QMap< GSizes, bool > GetGradationSizes () const
 
void SetGradationSizes (const QMap< GSizes, bool > &options)
 
QString GetDescription () const
 
void SetDescription (const QString &text)
 
QString GetNotes () const
 
void SetNotes (const QString &text)
 
QString GetPatternName () const
 
void SetPatternName (const QString &qsName)
 
QString GetCompanyName () const
 
void SetCompanyName (const QString &qsName)
 
QString GetPatternNumber () const
 
void SetPatternNumber (const QString &qsNum)
 
QString GetCustomerName () const
 
void SetCustomerName (const QString &qsName)
 
QString GetLabelDateFormat () const
 
void SetLabelDateFormat (const QString &format)
 
QString GetLabelTimeFormat () const
 
void SetLabelTimeFormat (const QString &format)
 
void setPatternLabelTemplate (const QVector< VLabelTemplateLine > &lines)
 
QVector< VLabelTemplateLinegetPatternLabelTemplate () const
 
void SetPatternWasChanged (bool changed)
 
bool GetPatternWasChanged () const
 
QString GetImage () const
 
QString GetImageExtension () const
 
void SetImage (const QString &text, const QString &extension)
 
void DeleteImage ()
 
QString GetVersion () const
 
void SetVersion ()
 
QVector< quint32 > getOpItems (const quint32 &toolId, const QString &itemType)
 getOpItems get vector of operation tool obects. More...
 
QVector< quint32 > getDartItems (const quint32 &toolId)
 
bool IsModified () const
 
void SetModified (bool modified)
 
QDomElement getDraw (const QString &name) const
 
void parseGroups (const QDomElement &domElement)
 
QDomElement createGroups ()
 
QDomElement createGroup (quint32 id, const QString &name, const QString &color, const QString &type, const QString &weight, const QMap< quint32, quint32 > &groupData)
 
QDomElement addGroupItems (const QString &name, const QMap< quint32, quint32 > &groupData)
 
QString getGroupName (quint32 id)
 
void setGroupName (quint32 id, const QString &name)
 
QMap< quint32, GroupAttributesgetGroups ()
 
QStringList groupListByName ()
 
QDomElement getGroupByName (const QString &name)
 
quint32 getGroupIdByName (const QString &name)
 
QMap< quint32, QString > getGroupsContainingItem (quint32 toolId, quint32 objectId, bool containsItem)
 Returns the groups that contain or do not contain the item identified by the toolid and the objectid. More...
 
void deleteToolFromGroup (quint32 toolId)
 Deletes an item from the group containing the toolId. More...
 
void addToolToGroup (quint32 toolId, quint32 objectId, const QString &groupName)
 Adds an item to the given group with the given toolId and objectId. More...
 
QDomElement addGroupItem (quint32 toolId, quint32 objectId, quint32 groupId)
 Adds an item to the given group with the given toolId and objectId. More...
 
QDomElement removeGroupItem (quint32 toolId, quint32 objectId, quint32 groupId)
 Removes the item of given toolId and objectId from the group of given groupId. More...
 
bool isGroupEmpty (quint32 id)
 Returns true if the given group is empty. More...
 
bool getGroupVisibility (quint32 id)
 
void setGroupVisibility (quint32 id, bool visible)
 
bool getGroupLock (quint32 id)
 
void setGroupLock (quint32 id, bool locked)
 
QString getGroupColor (quint32 id)
 
void setGroupColor (quint32 id, QString color)
 
QString getGroupLineType (quint32 id)
 
void setGroupLineType (quint32 id, QString type)
 
QString getGroupLineWeight (quint32 id)
 
void setGroupLineWeight (quint32 id, QString weight)
 
bool groupNameExists (const QString &groupName)
 
QString useGroupColor (quint32 toolId, QString color)
 
QString useGroupLineType (quint32 toolId, QString type)
 
QString useGroupLineWeight (quint32 toolId, QString weight)
 
QPair< bool, QMap< quint32, quint32 > > parseItemElement (const QDomElement &domElement)
 
- Public Member Functions inherited from VDomDocument
 VDomDocument ()
 
virtual ~VDomDocument () Q_DECL_EQ_DEFAULT
 
QDomElement elementById (quint32 id, const QString &tagName=QString())
 
template<typename T >
void SetAttribute (QDomElement &domElement, const QString &name, const T &value) const
 SetAttribute set attribute in pattern file. Replace "," by ".". More...
 
Unit MUnit () const
 
QString Major () const
 
QString Minor () const
 
QString Patch () const
 
QDomNode ParentNodeById (const quint32 &nodeId)
 
QDomElement CloneNodeById (const quint32 &nodeId)
 
QDomElement NodeById (const quint32 &nodeId)
 
QVector< VLabelTemplateLineGetLabelTemplate (const QDomElement &element) const
 
void SetLabelTemplate (QDomElement &element, const QVector< VLabelTemplateLine > &lines)
 
template<>
void SetAttribute (QDomElement &domElement, const QString &name, const QString &value) const
 
template<>
void SetAttribute (QDomElement &domElement, const QString &name, const bool &value) const
 
template<>
void SetAttribute (QDomElement &domElement, const QString &name, const MeasurementsType &value) const
 

Static Public Attributes

static const QString AttrReadOnly = QStringLiteral("readOnly")
 
- Static Public Attributes inherited from VAbstractPattern
static const QString TagPattern = QStringLiteral("pattern")
 
static const QString TagCalculation = QStringLiteral("calculation")
 
static const QString TagModeling = QStringLiteral("modeling")
 
static const QString TagPieces = QStringLiteral("pieces")
 
static const QString TagPiece = QStringLiteral("piece")
 
static const QString TagDescription = QStringLiteral("description")
 
static const QString TagImage = QStringLiteral("image")
 
static const QString TagNotes = QStringLiteral("notes")
 
static const QString TagMeasurements = QStringLiteral("measurements")
 
static const QString TagIncrements = QStringLiteral("increments")
 
static const QString TagIncrement = QStringLiteral("increment")
 
static const QString TagDraftBlock = QStringLiteral("draftBlock")
 
static const QString TagGroups = QStringLiteral("groups")
 
static const QString TagGroup = QStringLiteral("group")
 
static const QString TagGroupItem = QStringLiteral("item")
 
static const QString TagPoint = QStringLiteral("point")
 
static const QString TagSpline = QStringLiteral("spline")
 
static const QString TagArc = QStringLiteral("arc")
 
static const QString TagElArc = QStringLiteral("elArc")
 
static const QString TagTools = QStringLiteral("tools")
 
static const QString TagOperation = QStringLiteral("operation")
 
static const QString TagGradation = QStringLiteral("gradation")
 
static const QString TagHeights = QStringLiteral("heights")
 
static const QString TagSizes = QStringLiteral("sizes")
 
static const QString TagData = QStringLiteral("data")
 
static const QString TagPatternInfo = QStringLiteral("patternInfo")
 
static const QString TagPatternName = QStringLiteral("patternName")
 
static const QString TagPatternNum = QStringLiteral("patternNumber")
 
static const QString TagCompanyName = QStringLiteral("company")
 
static const QString TagCustomerName = QStringLiteral("customer")
 
static const QString TagPatternLabel = QStringLiteral("patternLabel")
 
static const QString TagGrainline = QStringLiteral("grainline")
 
static const QString TagPath = QStringLiteral("path")
 
static const QString TagNodes = QStringLiteral("nodes")
 
static const QString TagNode = QStringLiteral("node")
 
static const QString TagLine = QStringLiteral("line")
 
static const QString AttrName = QStringLiteral("name")
 
static const QString AttrVisible = QStringLiteral("visible")
 
static const QString AttrGroupLocked = QStringLiteral("locked")
 
static const QString AttrGroupColor = QStringLiteral("groupColor")
 
static const QString AttrObject = QStringLiteral("object")
 
static const QString AttrTool = QStringLiteral("tool")
 
static const QString AttrType = QStringLiteral("type")
 
static const QString AttrLetter = QStringLiteral("letter")
 
static const QString AttrAnnotation = QStringLiteral("annotation")
 
static const QString AttrOrientation = QStringLiteral("orientation")
 
static const QString AttrRotationWay = QStringLiteral("rotationWay")
 
static const QString AttrTilt = QStringLiteral("tilt")
 
static const QString AttrFoldPosition = QStringLiteral("foldPosition")
 
static const QString AttrQuantity = QStringLiteral("quantity")
 
static const QString AttrOnFold = QStringLiteral("onFold")
 
static const QString AttrDateFormat = QStringLiteral("dateFormat")
 
static const QString AttrTimeFormat = QStringLiteral("timeFormat")
 
static const QString AttrArrows = QStringLiteral("arrows")
 
static const QString AttrNodeReverse = QStringLiteral("reverse")
 
static const QString AttrNodeExcluded = QStringLiteral("excluded")
 
static const QString AttrNodeIsNotch = QStringLiteral("notch")
 
static const QString AttrNodeNotchType = QStringLiteral("notchType")
 
static const QString AttrNodeNotchSubType = QStringLiteral("notchSubtype")
 
static const QString AttrNodeShowNotch = QStringLiteral("showNotch")
 
static const QString AttrNodeShowSecondNotch = QStringLiteral("showSecondNotch")
 
static const QString AttrNodeNotchLength = QStringLiteral("notchLength")
 
static const QString AttrNodeNotchWidth = QStringLiteral("notchWidth")
 
static const QString AttrNodeNotchAngle = QStringLiteral("notchAngle")
 
static const QString AttrNodeNotchCount = QStringLiteral("notchCount")
 
static const QString AttrSABefore = QStringLiteral("before")
 
static const QString AttrSAAfter = QStringLiteral("after")
 
static const QString AttrStart = QStringLiteral("start")
 
static const QString AttrPath = QStringLiteral("path")
 
static const QString AttrEnd = QStringLiteral("end")
 
static const QString AttrIncludeAs = QStringLiteral("includeAs")
 
static const QString AttrWidth = QStringLiteral("width")
 
static const QString AttrRotation = QStringLiteral("rotation")
 
static const QString AttrAll = QStringLiteral("all")
 
static const QString AttrH50 = QStringLiteral("h50")
 
static const QString AttrH56 = QStringLiteral("h56")
 
static const QString AttrH62 = QStringLiteral("h62")
 
static const QString AttrH68 = QStringLiteral("h68")
 
static const QString AttrH74 = QStringLiteral("h74")
 
static const QString AttrH80 = QStringLiteral("h80")
 
static const QString AttrH86 = QStringLiteral("h86")
 
static const QString AttrH92 = QStringLiteral("h92")
 
static const QString AttrH98 = QStringLiteral("h98")
 
static const QString AttrH104 = QStringLiteral("h104")
 
static const QString AttrH110 = QStringLiteral("h110")
 
static const QString AttrH116 = QStringLiteral("h116")
 
static const QString AttrH122 = QStringLiteral("h122")
 
static const QString AttrH128 = QStringLiteral("h128")
 
static const QString AttrH134 = QStringLiteral("h134")
 
static const QString AttrH140 = QStringLiteral("h140")
 
static const QString AttrH146 = QStringLiteral("h146")
 
static const QString AttrH152 = QStringLiteral("h152")
 
static const QString AttrH158 = QStringLiteral("h158")
 
static const QString AttrH164 = QStringLiteral("h164")
 
static const QString AttrH170 = QStringLiteral("h170")
 
static const QString AttrH176 = QStringLiteral("h176")
 
static const QString AttrH182 = QStringLiteral("h182")
 
static const QString AttrH188 = QStringLiteral("h188")
 
static const QString AttrH194 = QStringLiteral("h194")
 
static const QString AttrH200 = QStringLiteral("h200")
 
static const QString AttrS22 = QStringLiteral("s22")
 
static const QString AttrS24 = QStringLiteral("s24")
 
static const QString AttrS26 = QStringLiteral("s26")
 
static const QString AttrS28 = QStringLiteral("s28")
 
static const QString AttrS30 = QStringLiteral("s30")
 
static const QString AttrS32 = QStringLiteral("s32")
 
static const QString AttrS34 = QStringLiteral("s34")
 
static const QString AttrS36 = QStringLiteral("s36")
 
static const QString AttrS38 = QStringLiteral("s38")
 
static const QString AttrS40 = QStringLiteral("s40")
 
static const QString AttrS42 = QStringLiteral("s42")
 
static const QString AttrS44 = QStringLiteral("s44")
 
static const QString AttrS46 = QStringLiteral("s46")
 
static const QString AttrS48 = QStringLiteral("s48")
 
static const QString AttrS50 = QStringLiteral("s50")
 
static const QString AttrS52 = QStringLiteral("s52")
 
static const QString AttrS54 = QStringLiteral("s54")
 
static const QString AttrS56 = QStringLiteral("s56")
 
static const QString AttrS58 = QStringLiteral("s58")
 
static const QString AttrS60 = QStringLiteral("s60")
 
static const QString AttrS62 = QStringLiteral("s62")
 
static const QString AttrS64 = QStringLiteral("s64")
 
static const QString AttrS66 = QStringLiteral("s66")
 
static const QString AttrS68 = QStringLiteral("s68")
 
static const QString AttrS70 = QStringLiteral("s70")
 
static const QString AttrS72 = QStringLiteral("s72")
 
static const QString AttrCustom = QStringLiteral("custom")
 
static const QString AttrDefHeight = QStringLiteral("defHeight")
 
static const QString AttrDefSize = QStringLiteral("defSize")
 
static const QString AttrExtension = QStringLiteral("extension")
 
static const QString IncrementName = QStringLiteral("name")
 
static const QString IncrementFormula = QStringLiteral("formula")
 
static const QString IncrementDescription = QStringLiteral("description")
 
static const QString NodeArc = QStringLiteral("NodeArc")
 
static const QString NodeElArc = QStringLiteral("NodeElArc")
 
static const QString NodePoint = QStringLiteral("NodePoint")
 
static const QString NodeSpline = QStringLiteral("NodeSpline")
 
static const QString NodeSplinePath = QStringLiteral("NodeSplinePath")
 
- Static Public Attributes inherited from VDomDocument
static const QString AttrId = QStringLiteral("id")
 
static const QString AttrText = QStringLiteral("text")
 
static const QString AttrBold = QStringLiteral("bold")
 
static const QString AttrItalic = QStringLiteral("italic")
 
static const QString AttrAlignment = QStringLiteral("alignment")
 
static const QString AttrFSIncrement = QStringLiteral("sfIncrement")
 
static const QString TagVersion = QStringLiteral("version")
 
static const QString TagUnit = QStringLiteral("unit")
 
static const QString TagLine = QStringLiteral("line")
 

Protected Member Functions

virtual void customEvent (QEvent *event) Q_DECL_OVERRIDE
 
- Protected Member Functions inherited from VAbstractPattern
void setActiveDraftBlock (const QString &name)
 setActiveDraftBlock set current draft block. More...
 
QDomElement CheckTagExists (const QString &tag)
 
void InsertTag (const QStringList &tags, const QDomElement &element)
 
void SetChildTag (const QString &qsParent, const QString &qsChild, const QString &qsValue)
 
int getActiveDraftBlockIndex () const
 
bool getActiveDraftElement (QDomElement &element) const
 getActiveDraftElement return draftBlock element for current draft block. More...
 
bool hasGroupItem (const QDomElement &domElement, quint32 toolId, quint32 objectId)
 Checks if the given group has the item with the given toolId and objectId. More...
 
- Protected Member Functions inherited from VDomDocument
bool setTagText (const QString &tag, const QString &text)
 
bool setTagText (const QDomElement &domElement, const QString &text)
 
QString UniqueTagText (const QString &tagName, const QString &defVal=QString()) const
 
void TestUniqueId () const
 TestUniqueId test exist unique id in pattern file. Each id must be unique. More...
 
void CollectId (const QDomElement &node, QVector< quint32 > &vector) const
 

Private Member Functions

VNodeDetail parsePieceNode (const QDomElement &domElement) const
 
void parseDraftBlockElement (const QDomNode &node, const Document &parse)
 parseDraftBlockElement parse draw tag. More...
 
void ParseDrawMode (const QDomNode &node, const Document &parse, const Draw &mode)
 ParseDrawMode parse draw tag with draw mode. More...
 
void parsePieceElement (QDomElement &domElement, const Document &parse)
 parsePieceElement parse piece tag. More...
 
void parsePieceNodes (const QDomElement &domElement, VPiece &piece, qreal width, bool closed) const
 
void ParsePieceDataTag (const QDomElement &domElement, VPiece &piece) const
 
void ParsePiecePatternInfo (const QDomElement &domElement, VPiece &piece) const
 
void ParsePieceGrainline (const QDomElement &domElement, VPiece &piece) const
 
void parsePatternPieces (const QDomElement &domElement, const Document &parse)
 parsePatternPieces parse pieces tag. More...
 
void ParsePointElement (VMainGraphicsScene *scene, QDomElement &domElement, const Document &parse, const QString &type)
 ParsePointElement parse point tag. More...
 
void ParseLineElement (VMainGraphicsScene *scene, const QDomElement &domElement, const Document &parse)
 ParseLineElement parse line tag. More...
 
void ParseSplineElement (VMainGraphicsScene *scene, QDomElement &domElement, const Document &parse, const QString &type)
 ParseSplineElement parse spline tag. More...
 
void ParseArcElement (VMainGraphicsScene *scene, QDomElement &domElement, const Document &parse, const QString &type)
 ParseArcElement parse arc tag. More...
 
void ParseEllipticalArcElement (VMainGraphicsScene *scene, QDomElement &domElement, const Document &parse, const QString &type)
 ParseEllipticalArcElement parse elliptical arc tag. More...
 
void ParseToolsElement (VMainGraphicsScene *scene, const QDomElement &domElement, const Document &parse, const QString &type)
 ParseToolsElement parse tools tag. More...
 
void ParseOperationElement (VMainGraphicsScene *scene, QDomElement &domElement, const Document &parse, const QString &type)
 
void ParsePathElement (VMainGraphicsScene *scene, QDomElement &domElement, const Document &parse)
 
void ParseIncrementsElement (const QDomNode &node)
 ParseIncrementsElement parse increments tag. More...
 
void PrepareForParse (const Document &parse)
 
void ToolsCommonAttributes (const QDomElement &domElement, quint32 &id)
 
void PointsCommonAttributes (const QDomElement &domElement, quint32 &id, QString &name, qreal &mx, qreal &my, bool &labelVisible, QString &lineType, QString &lineWeight, QString &lineColor)
 
void PointsCommonAttributes (const QDomElement &domElement, quint32 &id, QString &name, qreal &mx, qreal &my, bool &labelVisible)
 
void PointsCommonAttributes (const QDomElement &domElement, quint32 &id, qreal &mx, qreal &my)
 
void SplinesCommonAttributes (const QDomElement &domElement, quint32 &id, quint32 &idObject, quint32 &idTool)
 
template<typename T >
QRectF ToolBoundingRect (const QRectF &rec, const quint32 &id) const
 
void parseCurrentDraftBlock ()
 
QString GetLabelBase (quint32 index) const
 
void ParseToolBasePoint (VMainGraphicsScene *scene, const QDomElement &domElement, const Document &parse)
 
void ParseToolEndLine (VMainGraphicsScene *scene, QDomElement &domElement, const Document &parse)
 
void ParseToolAlongLine (VMainGraphicsScene *scene, QDomElement &domElement, const Document &parse)
 
void ParseToolShoulderPoint (VMainGraphicsScene *scene, QDomElement &domElement, const Document &parse)
 
void ParseToolNormal (VMainGraphicsScene *scene, QDomElement &domElement, const Document &parse)
 
void ParseToolBisector (VMainGraphicsScene *scene, QDomElement &domElement, const Document &parse)
 
void ParseToolLineIntersect (VMainGraphicsScene *scene, const QDomElement &domElement, const Document &parse)
 
void ParseToolPointOfContact (VMainGraphicsScene *scene, QDomElement &domElement, const Document &parse)
 
void ParseNodePoint (const QDomElement &domElement, const Document &parse)
 
void ParseAnchorPoint (const QDomElement &domElement, const Document &parse)
 
void ParseToolHeight (VMainGraphicsScene *scene, const QDomElement &domElement, const Document &parse)
 
void ParseToolTriangle (VMainGraphicsScene *scene, const QDomElement &domElement, const Document &parse)
 
void parseIntersectXYTool (VMainGraphicsScene *scene, const QDomElement &domElement, const Document &parse)
 
void ParseToolCutSpline (VMainGraphicsScene *scene, QDomElement &domElement, const Document &parse)
 
void ParseToolCutSplinePath (VMainGraphicsScene *scene, QDomElement &domElement, const Document &parse)
 
void ParseToolCutArc (VMainGraphicsScene *scene, QDomElement &domElement, const Document &parse)
 
void ParseToolLineIntersectAxis (VMainGraphicsScene *scene, QDomElement &domElement, const Document &parse)
 
void ParseToolCurveIntersectAxis (VMainGraphicsScene *scene, QDomElement &domElement, const Document &parse)
 
void ParseToolPointOfIntersectionArcs (VMainGraphicsScene *scene, const QDomElement &domElement, const Document &parse)
 
void ParseToolPointOfIntersectionCircles (VMainGraphicsScene *scene, QDomElement &domElement, const Document &parse)
 
void ParseToolPointOfIntersectionCurves (VMainGraphicsScene *scene, QDomElement &domElement, const Document &parse)
 
void ParseToolPointFromCircleAndTangent (VMainGraphicsScene *scene, QDomElement &domElement, const Document &parse)
 
void ParseToolPointFromArcAndTangent (VMainGraphicsScene *scene, const QDomElement &domElement, const Document &parse)
 
void ParseToolTrueDarts (VMainGraphicsScene *scene, const QDomElement &domElement, const Document &parse)
 
 Q_STATIC_ASSERT_X (VPatternConverter::PatternMinVer< CONVERTER_VERSION_CHECK(0, 2, 7), "Time to refactor the code.")
 
void ParseOldToolSpline (VMainGraphicsScene *scene, const QDomElement &domElement, const Document &parse)
 
void ParseToolSpline (VMainGraphicsScene *scene, QDomElement &domElement, const Document &parse)
 
void ParseToolCubicBezier (VMainGraphicsScene *scene, const QDomElement &domElement, const Document &parse)
 
 Q_STATIC_ASSERT_X (VPatternConverter::PatternMinVer< CONVERTER_VERSION_CHECK(0, 2, 7), "Time to refactor the code.")
 
void ParseOldToolSplinePath (VMainGraphicsScene *scene, const QDomElement &domElement, const Document &parse)
 
void ParseToolSplinePath (VMainGraphicsScene *scene, const QDomElement &domElement, const Document &parse)
 
void ParseToolCubicBezierPath (VMainGraphicsScene *scene, const QDomElement &domElement, const Document &parse)
 
void ParseNodeSpline (const QDomElement &domElement, const Document &parse)
 
void ParseNodeSplinePath (const QDomElement &domElement, const Document &parse)
 
void ParseToolArc (VMainGraphicsScene *scene, QDomElement &domElement, const Document &parse)
 
void ParseNodeArc (const QDomElement &domElement, const Document &parse)
 
void ParseToolArcWithLength (VMainGraphicsScene *scene, QDomElement &domElement, const Document &parse)
 
void ParseToolEllipticalArc (VMainGraphicsScene *scene, QDomElement &domElement, const Document &parse)
 
void ParseNodeEllipticalArc (const QDomElement &domElement, const Document &parse)
 
void ParseToolRotation (VMainGraphicsScene *scene, QDomElement &domElement, const Document &parse)
 
void ParseToolMirrorByLine (VMainGraphicsScene *scene, QDomElement &domElement, const Document &parse)
 
void ParseToolMirrorByAxis (VMainGraphicsScene *scene, QDomElement &domElement, const Document &parse)
 
void ParseToolMove (VMainGraphicsScene *scene, QDomElement &domElement, const Document &parse)
 
qreal EvalFormula (VContainer *data, const QString &formula, bool *ok) const
 
QDomElement MakeEmptyIncrement (const QString &name)
 
QDomElement FindIncrement (const QString &name) const
 
void GarbageCollector ()
 

Private Attributes

VContainerdata
 
Drawmode
 data container with data. More...
 
VMainGraphicsScenedraftScene
 mode current draw mode. More...
 
VMainGraphicsScenepieceScene
 

Additional Inherited Members

- Signals inherited from VAbstractPattern
void activeDraftBlockChanged (const QString &newName)
 activeDraftBlockChanged change active draft block. More...
 
void ChangedCursor (quint32 id)
 ChangedCursor change cursor position. More...
 
void draftBlockNameChanged (const QString &oldName, const QString &newName)
 draftBlockNameChanged save new name draft block. More...
 
void FullUpdateFromFile ()
 FullUpdateFromFile update tool data form file. More...
 
void patternChanged (bool saved)
 patternChanged emit if we have unsaved change. More...
 
void UpdatePatternLabel ()
 
void ShowTool (quint32 id, bool enable)
 ShowTool highlight tool. More...
 
void ClearMainWindow ()
 
void UndoCommand ()
 
void SetEnabledGUI (bool enabled)
 
void CheckLayout ()
 
void UpdateInLayoutList (quint32 id)
 
void showPiece (quint32 id)
 
void setCurrentDraftBlock (const QString &patterPiece)
 
void patternHasGroups (bool value)
 
void updateGroups ()
 
- Static Public Member Functions inherited from VAbstractPattern
static VDataToolgetTool (quint32 id)
 getTool return tool from tool list. More...
 
static void AddTool (quint32 id, VDataTool *tool)
 AddTool add tool to list tools. More...
 
static void RemoveTool (quint32 id)
 
static VPiecePath ParsePieceNodes (const QDomElement &domElement)
 
static QVector< CustomSARecordParsePieceCSARecords (const QDomElement &domElement)
 
static QVector< quint32 > ParsePieceInternalPaths (const QDomElement &domElement)
 
static QVector< quint32 > ParsePieceAnchors (const QDomElement &domElement)
 
- Static Public Member Functions inherited from VDomDocument
static quint32 GetParametrUInt (const QDomElement &domElement, const QString &name, const QString &defValue)
 Returns the long long value of the given attribute. RENAME: GetParameterLongLong? More...
 
static bool getParameterBool (const QDomElement &domElement, const QString &name, const QString &defValue)
 
static NodeUsage GetParametrUsage (const QDomElement &domElement, const QString &name)
 
static void SetParametrUsage (QDomElement &domElement, const QString &name, const NodeUsage &value)
 
static QString GetParametrString (const QDomElement &domElement, const QString &name, const QString &defValue=QString())
 Returns the string value of the given attribute. RENAME: see above. More...
 
static QString GetParametrEmptyString (const QDomElement &domElement, const QString &name)
 
static qreal GetParametrDouble (const QDomElement &domElement, const QString &name, const QString &defValue)
 Returns the double value of the given attribute. More...
 
static quint32 getParameterId (const QDomElement &domElement)
 getParameterId return value id attribute. More...
 
static void ValidateXML (const QString &schema, const QString &fileName)
 ValidateXML validate xml file by xsd schema. More...
 
static QString UnitsHelpString ()
 
static void RemoveAllChildren (QDomElement &domElement)
 RemoveAllChildren remove all children from file. More...
 
static bool SafeCopy (const QString &source, const QString &destination, QString &error)
 
- Static Protected Member Functions inherited from VAbstractPattern
static void ToolExists (const quint32 &id)
 
static VPiecePath ParsePathNodes (const QDomElement &domElement)
 
static VPieceNode ParseSANode (const QDomElement &domElement)
 
- Protected Attributes inherited from VAbstractPattern
QString activeDraftBlock
 activeBlockName name current pattern peace. More...
 
QString m_DefaultLineColor
 
qreal m_DefaultLineWeight
 
QString m_DefaultLineType
 
QString lastSavedExportFormat
 
quint32 cursor
 cursor cursor keep id tool after which we will add new tool in file. More...
 
QVector< VDataTool * > toolsOnRemove
 
QVector< VToolRecordhistory
 history history records. More...
 
QStringList patternPieces
 patternPieces list of patern pieces names for combobox More...
 
bool modified
 modified keep state of the document for cases that do not cover QUndoStack More...
 
- Static Protected Attributes inherited from VAbstractPattern
static QHash< quint32, VDataTool * > tools = QHash<quint32, VDataTool*>()
 tools list with pointer on tools. More...
 
static QVector< VLabelTemplateLinepatternLabelLines = QVector<VLabelTemplateLine>()
 patternLabelLines list to speed up reading a template by many pieces. More...
 
static bool patternLabelWasChanged = false
 

Detailed Description

The VPattern class working with pattern file.

Definition at line 67 of file vpattern.h.

Constructor & Destructor Documentation

◆ VPattern()

VPattern::VPattern ( VContainer data,
Draw mode,
VMainGraphicsScene draftScene,
VMainGraphicsScene pieceScene,
QObject *  parent = nullptr 
)

Definition at line 105 of file vpattern.cpp.

References draftScene, pieceScene, and SCASSERT.

Member Function Documentation

◆ ActiveDrawBoundingRect()

◆ addEmptyCustomVariable()

void VPattern::addEmptyCustomVariable ( const QString &  name)

◆ addEmptyCustomVariableAfter()

void VPattern::addEmptyCustomVariableAfter ( const QString &  after,
const QString &  name 
)

◆ CreateEmptyFile()

◆ customEvent()

void VPattern::customEvent ( QEvent *  event)
protectedvirtual

Definition at line 625 of file vpattern.cpp.

References LITE_PARSE_EVENT, LiteParse, LiteParseTree(), qApp, and UNDO_EVENT.

◆ DecrementReferens()

void VPattern::DecrementReferens ( quint32  id) const
virtual

DecrementReferens decrement reference parent objects.

Parameters
idparent object id.

Implements VAbstractPattern.

Definition at line 4094 of file vpattern.cpp.

References VDataTool::decrementReferens(), SCASSERT, VAbstractPattern::ToolExists(), and VAbstractPattern::tools.

◆ EvalFormula()

qreal VPattern::EvalFormula ( VContainer data,
const QString &  formula,
bool *  ok 
) const
private

Definition at line 3072 of file vpattern.cpp.

References data, and VContainer::DataVariables().

Referenced by ParseIncrementsElement().

◆ FindIncrement()

QDomElement VPattern::FindIncrement ( const QString &  name) const
private

◆ GarbageCollector()

void VPattern::GarbageCollector ( )
private

◆ GenerateLabel()

QString VPattern::GenerateLabel ( const LabelType type,
const QString &  reservedName = QString() 
) const
virtual

GenerateLabel create name for draft block basepoint.

Parameters
typetype of the label.
reservedNamereversed point name. Use when need reserve name, but point is not in data base yet.
Returns
unique name for current draft block.

Implements VAbstractPattern.

Definition at line 3630 of file vpattern.cpp.

References data, VAbstractPattern::getActiveDraftBlockIndex(), GetLabelBase(), VContainer::IsUnique(), NewLabel, NewPatternPiece, and VAbstractPattern::TagDraftBlock.

Referenced by MainWindow::addDraftBlock().

◆ GenerateSuffix()

QString VPattern::GenerateSuffix ( const QString &  type) const
virtual

◆ getActiveBasePoint()

quint32 VPattern::getActiveBasePoint ( )

getActiveBasePoint return id base point current draft block.

Returns
id base point.

Definition at line 363 of file vpattern.cpp.

References VAbstractPattern::AttrType, VAbstractPattern::getActiveNodeElement(), VDomDocument::getParameterId(), VAbstractPattern::TagCalculation, VAbstractPattern::TagPoint, and VToolBasePoint::ToolType.

◆ getActivePatternPieces()

◆ GetDefCustomHeight()

◆ GetDefCustomSize()

◆ GetLabelBase()

QString VPattern::GetLabelBase ( quint32  index) const
private

Definition at line 1203 of file vpattern.cpp.

References VApplication::LabelLanguages(), and qApp.

Referenced by GenerateLabel(), and GenerateSuffix().

◆ IncrementReferens()

void VPattern::IncrementReferens ( quint32  id) const
virtual

IncrementReferens increment reference parent objects.

Parameters
idparent object id.

Implements VAbstractPattern.

Definition at line 4080 of file vpattern.cpp.

References VDataTool::incrementReferens(), SCASSERT, VAbstractPattern::ToolExists(), and VAbstractPattern::tools.

Referenced by ParseOldToolSplinePath(), ParseToolCubicBezierPath(), and ParseToolSplinePath().

◆ IsDefCustom()

◆ IsReadOnly()

bool VPattern::IsReadOnly ( ) const

◆ LiteParseIncrements()

◆ LiteParseTree

◆ MakeEmptyIncrement()

◆ MoveDownIncrement()

void VPattern::MoveDownIncrement ( const QString &  name)

◆ MoveUpIncrement()

void VPattern::MoveUpIncrement ( const QString &  name)

◆ Parse()

◆ ParseAnchorPoint()

void VPattern::ParseAnchorPoint ( const QDomElement &  domElement,
const Document parse 
)
private

◆ ParseArcElement()

void VPattern::ParseArcElement ( VMainGraphicsScene scene,
QDomElement &  domElement,
const Document parse,
const QString &  type 
)
private

ParseArcElement parse arc tag.

Parameters
scenescene.
domElementtag in xml tree.
parseparser file mode.
typetype of spline.

Definition at line 3241 of file vpattern.cpp.

References ParseNodeArc(), ParseToolArc(), ParseToolArcWithLength(), SCASSERT, VToolArc::ToolType, VToolArcWithLength::ToolType, and VNodeArc::ToolType.

Referenced by ParseDrawMode().

◆ parseCurrentDraftBlock()

void VPattern::parseCurrentDraftBlock ( )
private

◆ parseDraftBlockElement()

void VPattern::parseDraftBlockElement ( const QDomNode &  node,
const Document parse 
)
private

◆ ParseDrawMode()

◆ ParseEllipticalArcElement()

void VPattern::ParseEllipticalArcElement ( VMainGraphicsScene scene,
QDomElement &  domElement,
const Document parse,
const QString &  type 
)
private

ParseEllipticalArcElement parse elliptical arc tag.

Parameters
scenescene.
domElementtag in xml tree.
parseparser file mode.
typetype of spline.

Definition at line 3277 of file vpattern.cpp.

References ParseNodeEllipticalArc(), ParseToolEllipticalArc(), SCASSERT, VToolEllipticalArc::ToolType, and VNodeEllipticalArc::ToolType.

Referenced by ParseDrawMode().

◆ ParseIncrementsElement()

void VPattern::ParseIncrementsElement ( const QDomNode &  node)
private

◆ parseIntersectXYTool()

void VPattern::parseIntersectXYTool ( VMainGraphicsScene scene,
const QDomElement &  domElement,
const Document parse 
)
private

◆ ParseLineElement()

void VPattern::ParseLineElement ( VMainGraphicsScene scene,
const QDomElement &  domElement,
const Document parse 
)
private

◆ ParseNodeArc()

◆ ParseNodeEllipticalArc()

◆ ParseNodePoint()

◆ ParseNodeSpline()

◆ ParseNodeSplinePath()

◆ ParseOldToolSpline()

◆ ParseOldToolSplinePath()

◆ ParseOperationElement()

void VPattern::ParseOperationElement ( VMainGraphicsScene scene,
QDomElement &  domElement,
const Document parse,
const QString &  type 
)
private

◆ ParsePathElement()

◆ parsePatternPieces()

void VPattern::parsePatternPieces ( const QDomElement &  domElement,
const Document parse 
)
private

parsePatternPieces parse pieces tag.

Parameters
domElementtag in xml tree.
parseparser file mode.

Definition at line 983 of file vpattern.cpp.

References parsePieceElement(), and VAbstractPattern::TagPiece.

Referenced by parseDraftBlockElement().

◆ ParsePieceDataTag()

void VPattern::ParsePieceDataTag ( const QDomElement &  domElement,
VPiece piece 
) const
private

Definition at line 925 of file vpattern.cpp.

References VAbstractPattern::AttrAnnotation, PatternPieceTool::AttrBottomRightAnchor, PatternPieceTool::AttrCenterAnchor, VAbstractPattern::AttrFoldPosition, PatternPieceTool::AttrFont, PatternPieceTool::AttrHeight, VAbstractPattern::AttrLetter, AttrMx, AttrMy, VAbstractPattern::AttrOnFold, VAbstractPattern::AttrOrientation, VAbstractPattern::AttrQuantity, VAbstractPattern::AttrRotation, VAbstractPattern::AttrRotationWay, VAbstractPattern::AttrTilt, PatternPieceTool::AttrTopLeftAnchor, VAbstractPattern::AttrVisible, VAbstractPattern::AttrWidth, falseStr, VDomDocument::GetLabelTemplate(), VDomDocument::getParameterBool(), VDomDocument::GetParametrDouble(), VDomDocument::GetParametrEmptyString(), VDomDocument::GetParametrString(), VDomDocument::GetParametrUInt(), VPiece::GetPatternPieceData(), NULL_ID_STR, VPieceLabelData::SetAnnotation(), VPatternLabelData::setBottomRightAnchorPoint(), VPatternLabelData::setCenterAnchorPoint(), VPieceLabelData::SetFoldPosition(), VPatternLabelData::SetFontSize(), VPatternLabelData::SetLabelHeight(), VPieceLabelData::SetLabelTemplate(), VPatternLabelData::SetLabelWidth(), VPieceLabelData::SetLetter(), VPieceLabelData::SetOnFold(), VPieceLabelData::SetOrientation(), VAbstractFloatItemData::SetPos(), VPieceLabelData::SetQuantity(), VPatternLabelData::SetRotation(), VPieceLabelData::SetRotationWay(), VPieceLabelData::SetTilt(), VPatternLabelData::setTopLeftAnchorPoint(), VAbstractFloatItemData::SetVisible(), and trueStr.

Referenced by parsePieceElement().

◆ parsePieceElement()

void VPattern::parsePieceElement ( QDomElement &  domElement,
const Document parse 
)
private

parsePieceElement parse piece tag.

Parameters
domElementtag in xml tree.
parseparser file mode.

Definition at line 807 of file vpattern.cpp.

References VException::AddMoreInformation(), AttrClosed, PatternPieceTool::AttrForbidFlipping, PatternPieceTool::AttrHideSeamLine, AttrInLayout, AttrMx, AttrMy, VAbstractPattern::AttrName, PatternPieceTool::AttrPieceColor, PatternPieceTool::AttrPieceFill, AttrPieceLocked, PatternPieceTool::AttrSeamAllowance, PatternPieceTool::AttrSeamAllowanceBuiltIn, PatternPieceTool::AttrUnited, PatternPieceTool::AttrVersion, VAbstractPattern::AttrWidth, CONVERTER_VERSION_CHECK, PatternPieceTool::Create(), data, VExceptionBadId::ErrorMessage(), falseStr, FromFile, VDomDocument::getParameterBool(), VDomDocument::getParameterId(), VDomDocument::GetParametrDouble(), VDomDocument::GetParametrString(), VDomDocument::GetParametrUInt(), VAbstractPattern::haveLiteChange(), VAbstractPattern::modified, VAbstractPattern::ParsePieceAnchors(), VAbstractPattern::ParsePieceCSARecords(), ParsePieceDataTag(), ParsePieceGrainline(), VAbstractPattern::ParsePieceInternalPaths(), VAbstractPattern::ParsePieceNodes(), parsePieceNodes(), ParsePiecePatternInfo(), VPatternConverter::PatternMinVer, pieceScene, Q_STATIC_ASSERT_X(), qApp, VPiece::setAnchors(), VDomDocument::SetAttribute(), VAbstractPiece::setColor(), VPiece::SetCustomSARecords(), VAbstractPiece::setFill(), VAbstractPiece::SetForbidFlipping(), VAbstractPiece::setHideSeamLine(), VPiece::SetInLayout(), VPiece::SetInternalPaths(), VPiece::setIsLocked(), VAbstractPiece::SetMx(), VAbstractPiece::SetMy(), VAbstractPiece::SetName(), VPiece::SetPath(), VAbstractPiece::SetSeamAllowance(), VAbstractPiece::SetSeamAllowanceBuiltIn(), VPiece::SetUnited(), PatternPieceTool::TagAnchors, PatternPieceTool::TagCSA, VAbstractPattern::TagData, VAbstractPattern::TagGrainline, PatternPieceTool::TagIPaths, VAbstractPattern::TagNodes, VAbstractPattern::TagPatternInfo, and trueStr.

Referenced by parsePatternPieces().

◆ ParsePieceGrainline()

◆ parsePieceNode()

◆ parsePieceNodes()

void VPattern::parsePieceNodes ( const QDomElement &  domElement,
VPiece piece,
qreal  width,
bool  closed 
) const
private

◆ ParsePiecePatternInfo()

◆ ParsePointElement()

void VPattern::ParsePointElement ( VMainGraphicsScene scene,
QDomElement &  domElement,
const Document parse,
const QString &  type 
)
private

ParsePointElement parse point tag.

Parameters
scenescene.
domElementtag in xml tree.
parseparser file mode.
typetype of point.

Definition at line 1040 of file vpattern.cpp.

References ParseAnchorPoint(), parseIntersectXYTool(), ParseNodePoint(), ParseToolAlongLine(), ParseToolBasePoint(), ParseToolBisector(), ParseToolCurveIntersectAxis(), ParseToolCutArc(), ParseToolCutSpline(), ParseToolCutSplinePath(), ParseToolEndLine(), ParseToolHeight(), ParseToolLineIntersect(), ParseToolLineIntersectAxis(), ParseToolNormal(), ParseToolPointFromArcAndTangent(), ParseToolPointFromCircleAndTangent(), ParseToolPointOfContact(), ParseToolPointOfIntersectionArcs(), ParseToolPointOfIntersectionCircles(), ParseToolPointOfIntersectionCurves(), ParseToolShoulderPoint(), ParseToolTriangle(), ParseToolTrueDarts(), SCASSERT, VToolTrueDarts::ToolType, IntersectCirclesTool::ToolType, IntersectCircleTangentTool::ToolType, PointIntersectXYTool::ToolType, VToolCutArc::ToolType, VToolCutSpline::ToolType, VToolCutSplinePath::ToolType, VToolAlongLine::ToolType, VToolBisector::ToolType, VToolCurveIntersectAxis::ToolType, VToolEndLine::ToolType, VToolHeight::ToolType, VToolLineIntersectAxis::ToolType, VToolNormal::ToolType, VToolShoulderPoint::ToolType, VToolBasePoint::ToolType, VToolLineIntersect::ToolType, VToolPointFromArcAndTangent::ToolType, VToolPointOfContact::ToolType, VToolPointOfIntersectionArcs::ToolType, VToolPointOfIntersectionCurves::ToolType, VToolTriangle::ToolType, AnchorPointTool::ToolType, and VNodePoint::ToolType.

Referenced by ParseDrawMode().

◆ ParseSplineElement()

void VPattern::ParseSplineElement ( VMainGraphicsScene scene,
QDomElement &  domElement,
const Document parse,
const QString &  type 
)
private

◆ ParseToolAlongLine()

◆ ParseToolArc()

◆ ParseToolArcWithLength()

◆ ParseToolBasePoint()

◆ ParseToolBisector()

◆ ParseToolCubicBezier()

◆ ParseToolCubicBezierPath()

◆ ParseToolCurveIntersectAxis()

◆ ParseToolCutArc()

◆ ParseToolCutSpline()

◆ ParseToolCutSplinePath()

◆ ParseToolEllipticalArc()

◆ ParseToolEndLine()

◆ ParseToolHeight()

void VPattern::ParseToolHeight ( VMainGraphicsScene scene,
const QDomElement &  domElement,
const Document parse 
)
private

◆ ParseToolLineIntersect()

void VPattern::ParseToolLineIntersect ( VMainGraphicsScene scene,
const QDomElement &  domElement,
const Document parse 
)
private

◆ ParseToolLineIntersectAxis()

◆ ParseToolMirrorByAxis()

◆ ParseToolMirrorByLine()

◆ ParseToolMove()

◆ ParseToolNormal()

◆ ParseToolPointFromArcAndTangent()

void VPattern::ParseToolPointFromArcAndTangent ( VMainGraphicsScene scene,
const QDomElement &  domElement,
const Document parse 
)
private

◆ ParseToolPointFromCircleAndTangent()

◆ ParseToolPointOfContact()

◆ ParseToolPointOfIntersectionArcs()

void VPattern::ParseToolPointOfIntersectionArcs ( VMainGraphicsScene scene,
const QDomElement &  domElement,
const Document parse 
)
private

◆ ParseToolPointOfIntersectionCircles()

◆ ParseToolPointOfIntersectionCurves()

void VPattern::ParseToolPointOfIntersectionCurves ( VMainGraphicsScene scene,
QDomElement &  domElement,
const Document parse 
)
private

◆ ParseToolRotation()

◆ ParseToolsElement()

void VPattern::ParseToolsElement ( VMainGraphicsScene scene,
const QDomElement &  domElement,
const Document parse,
const QString &  type 
)
private

◆ ParseToolShoulderPoint()

◆ ParseToolSpline()

◆ ParseToolSplinePath()

◆ ParseToolTriangle()

void VPattern::ParseToolTriangle ( VMainGraphicsScene scene,
const QDomElement &  domElement,
const Document parse 
)
private

◆ ParseToolTrueDarts()

◆ PointsCommonAttributes() [1/3]

void VPattern::PointsCommonAttributes ( const QDomElement &  domElement,
quint32 &  id,
qreal &  mx,
qreal &  my 
)
private

◆ PointsCommonAttributes() [2/3]

void VPattern::PointsCommonAttributes ( const QDomElement &  domElement,
quint32 &  id,
QString &  name,
qreal &  mx,
qreal &  my,
bool &  labelVisible 
)
private

◆ PointsCommonAttributes() [3/3]

◆ PrepareForParse()

◆ Q_STATIC_ASSERT_X() [1/2]

VPattern::Q_STATIC_ASSERT_X ( )
private

Referenced by parsePieceElement().

◆ Q_STATIC_ASSERT_X() [2/2]

VPattern::Q_STATIC_ASSERT_X ( )
private

◆ removeCustomVariable()

void VPattern::removeCustomVariable ( const QString &  name)

◆ replaceNameInFormula()

void VPattern::replaceNameInFormula ( QVector< VFormulaField > &  expressions,
const QString &  name,
const QString &  newName 
)

◆ SaveDocument()

bool VPattern::SaveDocument ( const QString &  fileName,
QString &  error 
)
virtual

◆ setCurrentData()

void VPattern::setCurrentData ( )

setCurrentData set current data set.

Each time after parsing need set correct data set for current draft block. After parsing it is always last. Current data set for draft block it is data set for last object in draft block (point, arc, spline, spline path so on).

Definition at line 274 of file vpattern.cpp.

References VAbstractPattern::activeDraftBlock, Calculation, currentLength, currentSeamAllowance, data, VAbstractPattern::draftBlockCount(), VDataTool::getData(), VToolRecord::getDraftBlockName(), VToolRecord::getId(), VAbstractPattern::history, mode, NULL_ID, VContainer::RemoveVariable(), VAbstractPattern::ToolExists(), and VAbstractPattern::tools.

Referenced by MainWindow::changeDraftBlock(), and LiteParseTree().

◆ SetDefCustom()

◆ SetDefCustomHeight()

◆ SetDefCustomSize()

◆ setIncrementDescription()

void VPattern::setIncrementDescription ( const QString &  name,
const QString &  text 
)

◆ SetIncrementFormula()

void VPattern::SetIncrementFormula ( const QString &  name,
const QString &  text 
)

◆ setIncrementName()

void VPattern::setIncrementName ( const QString &  name,
const QString &  text 
)

◆ SetReadOnly()

void VPattern::SetReadOnly ( bool  rOnly)

◆ setXMLContent()

void VPattern::setXMLContent ( const QString &  fileName)
virtual

Reimplemented from VDomDocument.

Definition at line 149 of file vpattern.cpp.

References GarbageCollector(), and VDomDocument::setXMLContent().

Referenced by MainWindow::LoadPattern().

◆ SplinesCommonAttributes()

void VPattern::SplinesCommonAttributes ( const QDomElement &  domElement,
quint32 &  id,
quint32 &  idObject,
quint32 &  idTool 
)
private

◆ ToolBoundingRect() [1/2]

template<typename T >
QRectF VPattern::ToolBoundingRect ( const QRectF &  rec,
const quint32 &  id 
) const
private

◆ ToolBoundingRect() [2/2]

template<typename T >
QT_WARNING_POP QRectF VPattern::ToolBoundingRect ( const QRectF &  rect,
const quint32 &  id 
) const

Definition at line 4053 of file vpattern.cpp.

References SCASSERT, and VAbstractPattern::tools.

◆ ToolsCommonAttributes()

◆ UpdateToolData()

void VPattern::UpdateToolData ( const quint32 &  id,
VContainer data 
)
virtual

UpdateToolData update tool in list tools.

Parameters
idtool id.
datacontainer with variables.

Implements VAbstractPattern.

Definition at line 347 of file vpattern.cpp.

References data, SCASSERT, VAbstractPattern::ToolExists(), and VAbstractPattern::tools.

Member Data Documentation

◆ AttrReadOnly

const QString VPattern::AttrReadOnly = QStringLiteral("readOnly")
static

Definition at line 122 of file vpattern.h.

Referenced by IsReadOnly(), and SetReadOnly().

◆ data

◆ draftScene

VMainGraphicsScene* VPattern::draftScene
private

mode current draw mode.

Definition at line 135 of file vpattern.h.

Referenced by LiteParseTree(), Parse(), ParseDrawMode(), PrepareForParse(), and VPattern().

◆ mode

Draw* VPattern::mode
private

data container with data.

Definition at line 134 of file vpattern.h.

Referenced by ParseDrawMode(), and setCurrentData().

◆ pieceScene

VMainGraphicsScene* VPattern::pieceScene
private

The documentation for this class was generated from the following files: