Seamly2D
Code documentation
VDomDocument Class Reference

The VDomDocument class represents a Seamly2D document (.val file). More...

#include <vdomdocument.h>

Inheritance diagram for VDomDocument:
Collaboration diagram for VDomDocument:

Public Member Functions

 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
 
virtual void setXMLContent (const QString &fileName)
 
virtual bool SaveDocument (const QString &fileName, QString &error)
 
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 Member Functions

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 Public Attributes

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

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

bool find (const QDomElement &node, quint32 id)
 Find element by id. More...
 
bool SaveCanonicalXML (QIODevice *file, int indent, QString &error) const
 

Private Attributes

QHash< quint32, QDomElement > map
 Map used for finding element by id. More...
 

Detailed Description

The VDomDocument class represents a Seamly2D document (.val file).

A Seamly2D document describes the construction of a sewing pattern. The information is stored in XML format. By parsing a VDomDocument, the contained pattern is rendered to a Seamly2D graphics scene (VMainGraphicsScene).

A sewing pattern consists of zero or more increments and one or more pattern pieces.

An increment is an auxiliary variable that is calculated from regular measurement variables (that belong to the multisize measurements table). Increments are used to create a graduation schema for the sewing pattern.

A pattern piece contains 1) auxiliary pattern construction elements (calculation), 2) pattern construction elements (modeling), and 3) special markers, e.g. seam allowances (details). Of these, 2) and 3) are visible in the final pattern (draw mode 'Modeling'), 1) is only displayed when editing (draw mode 'Calculation') the pattern.

Definition at line 104 of file vdomdocument.h.

Constructor & Destructor Documentation

◆ VDomDocument()

VDomDocument::VDomDocument ( )

Definition at line 216 of file vdomdocument.cpp.

◆ ~VDomDocument()

virtual VDomDocument::~VDomDocument ( )
virtual

Member Function Documentation

◆ CloneNodeById()

QDomElement VDomDocument::CloneNodeById ( const quint32 &  nodeId)

Definition at line 863 of file vdomdocument.cpp.

References NodeById().

Referenced by DelGroup::DelGroup(), and DelTool::DelTool().

◆ CollectId()

void VDomDocument::CollectId ( const QDomElement &  node,
QVector< quint32 > &  vector 
) const
protected

Definition at line 613 of file vdomdocument.cpp.

References AttrId, and getParameterId().

Referenced by TestUniqueId().

◆ elementById()

QDomElement VDomDocument::elementById ( quint32  id,
const QString &  tagName = QString() 
)

Definition at line 222 of file vdomdocument.cpp.

References AttrId, find(), GetParametrUInt(), map, and NULL_ID_STR.

Referenced by VAbstractPattern::addGroupItem(), VAbstractNode::decrementReferens(), VToolInternalPath::decrementReferens(), UnionTool::decrementReferens(), DeletePiece::DeletePiece(), MoveDoubleLabel::Do(), MoveLabel::Do(), MoveSpline::Do(), MoveSplinePath::Do(), MoveSPoint::Do(), TogglePieceLock::doCmd(), TogglePieceInLayout::doCmd(), SetPieceColor::doCmd(), QT_WARNING_POP::getBlockName(), QT_WARNING_POP::GetChildren(), VAbstractPattern::getDartItems(), VUndoCommand::getDestinationObject(), VAbstractPattern::getGroupColor(), VAbstractPattern::getGroupLineType(), VAbstractPattern::getGroupLineWeight(), VAbstractPattern::getGroupLock(), VAbstractPattern::getGroupName(), VAbstractPattern::getGroupVisibility(), VAbstractPattern::getOpItems(), QT_WARNING_POP::GetPiece2Anchors(), QT_WARNING_POP::GetPiece2CSAPaths(), QT_WARNING_POP::GetPiece2InternalPaths(), QT_WARNING_POP::GetPiecePath(), UnionTool::GetReferenceObjects(), QT_WARNING_POP::GetTagChildren(), VAbstractNode::incrementReferens(), VToolInternalPath::incrementReferens(), UnionTool::incrementReferens(), VAbstractPattern::isGroupEmpty(), GroupsWidget::itemDoubleClicked(), MoveDoubleLabel::MoveDoubleLabel(), MoveLabel::MoveLabel(), MovePiece::MovePiece(), MoveSPoint::MoveSPoint(), NodeById(), VDrawTool::ReadAttributes(), AddGroupItem::redo(), AddToCalc::redo(), DeletePiece::redo(), DelGroup::redo(), MoveGroupItem::redo(), MovePiece::redo(), RemoveGroupItem::redo(), SavePieceOptions::redo(), SavePiecePathOptions::redo(), SaveToolOptions::redo(), PatternPieceTool::RefreshDataInFile(), VAbstractPattern::removeGroupItem(), VPatternConverter::SaveChildrenToolUnionToV0_2_4(), VDrawTool::SaveDialogChange(), VDrawTool::SaveOption(), VAbstractPattern::setGroupColor(), VAbstractPattern::setGroupLineType(), VAbstractPattern::setGroupLineWeight(), VAbstractPattern::setGroupLock(), VAbstractPattern::setGroupName(), VAbstractPattern::setGroupVisibility(), ShowDoublePointName::setVisibility(), ShowPointName::setVisibility(), ShowDoublePointName::ShowDoublePointName(), ShowPointName::ShowPointName(), AddGroupItem::undo(), AddDetNode::undo(), AddGroup::undo(), AddPiece::undo(), AddToCalc::undo(), MoveGroupItem::undo(), MovePiece::undo(), RemoveGroupItem::undo(), SavePieceOptions::undo(), SavePiecePathOptions::undo(), and SaveToolOptions::undo().

◆ find()

bool VDomDocument::find ( const QDomElement &  node,
quint32  id 
)
private

Find element by id.

Parameters
nodenode
idid value
Returns
true if found

Definition at line 282 of file vdomdocument.cpp.

References AttrId, GetParametrUInt(), map, and NULL_ID_STR.

Referenced by elementById().

◆ GetLabelTemplate()

◆ getParameterBool()

◆ getParameterId()

quint32 VDomDocument::getParameterId ( const QDomElement &  domElement)
static

◆ GetParametrDouble()

◆ GetParametrEmptyString()

QString VDomDocument::GetParametrEmptyString ( const QDomElement &  domElement,
const QString &  name 
)
static

◆ GetParametrString()

QString VDomDocument::GetParametrString ( const QDomElement &  domElement,
const QString &  name,
const QString &  defValue = QString() 
)
static

Returns the string value of the given attribute. RENAME: see above.

if attribute empty return default value. If default value empty too throw exception.

Returns
attribute value
Exceptions
VExceptionEmptyParameterwhen attribute is empty

Definition at line 459 of file vdomdocument.cpp.

Referenced by VPatternConverter::ConvertArcExpressionsToV0_2_0(), VVITConverter::ConvertMeasurementsToV0_3_3(), VVSTConverter::ConvertMeasurementsToV0_4_2(), VPatternConverter::ConvertPathPointExpressionsToV0_2_0(), VPatternConverter::ConvertPointExpressionsToV0_2_0(), DeleteDraftBlock::DeleteDraftBlock(), VAbstractPattern::draftBlockNameExists(), VAbstractOperation::ExtractData(), VPatternConverter::FixArcExpressionsToV0_2_0(), VPatternConverter::FixIncrementsToV0_2_0(), VPatternConverter::FixPathPointExpressionsToV0_2_0(), VPatternConverter::FixPointExpressionsToV0_2_0(), VAbstractPattern::getGroupByName(), VAbstractPattern::getGroupColor(), VAbstractPattern::getGroupIdByName(), VAbstractPattern::getGroupLineType(), VAbstractPattern::getGroupLineWeight(), VAbstractPattern::getGroupName(), VAbstractPattern::getGroups(), VAbstractPattern::getGroupsContainingItem(), VAbstractPattern::GetLabelDateFormat(), GetLabelTemplate(), VAbstractPattern::GetLabelTimeFormat(), getParameterBool(), GetParametrDouble(), GetParametrEmptyString(), GetParametrUInt(), VAbstractPattern::groupListByName(), VAbstractPattern::ListIncrements(), VPatternConverter::MUnitV0_1_4(), VPattern::Parse(), VPattern::ParseIncrementsElement(), VPattern::ParseLineElement(), VPattern::ParseOldToolSpline(), VPattern::ParseOldToolSplinePath(), VPattern::ParsePathElement(), VPattern::ParsePieceDataTag(), VPattern::parsePieceElement(), VPattern::ParsePieceGrainline(), VPattern::parsePieceNode(), VPattern::ParsePiecePatternInfo(), VAbstractPattern::ParseSANode(), VPattern::ParseToolAlongLine(), VPattern::ParseToolArc(), VPattern::ParseToolArcWithLength(), VPattern::ParseToolBisector(), VPattern::ParseToolCubicBezier(), VPattern::ParseToolCubicBezierPath(), VPattern::ParseToolCurveIntersectAxis(), VPattern::ParseToolCutArc(), VPattern::ParseToolCutSpline(), VPattern::ParseToolCutSplinePath(), VPattern::ParseToolEllipticalArc(), VPattern::ParseToolEndLine(), VPattern::ParseToolLineIntersectAxis(), VPattern::ParseToolMirrorByAxis(), VPattern::ParseToolMirrorByLine(), VPattern::ParseToolMove(), VPattern::ParseToolNormal(), VPattern::ParseToolPointFromCircleAndTangent(), VPattern::ParseToolPointOfContact(), VPattern::ParseToolPointOfIntersectionCircles(), VPattern::ParseToolRotation(), VPattern::ParseToolShoulderPoint(), VPattern::ParseToolSpline(), VPattern::ParseToolSplinePath(), VPattern::ParseToolTrueDarts(), VPattern::PointsCommonAttributes(), VPatternConverter::PortPieceLabelstoV0_6_0(), anonymous_namespace{vabstractpattern.cpp}::ReadExpressionAttribute(), VMeasurements::ReadMeasurements(), VToolMirrorByAxis::ReadToolAttributes(), VToolMirrorByLine::ReadToolAttributes(), VAbstractOperation::ReadToolAttributes(), VToolMove::ReadToolAttributes(), VToolRotation::ReadToolAttributes(), IntersectCirclesTool::ReadToolAttributes(), IntersectCircleTangentTool::ReadToolAttributes(), PointIntersectXYTool::ReadToolAttributes(), VToolCutArc::ReadToolAttributes(), VToolCutSpline::ReadToolAttributes(), VToolCutSplinePath::ReadToolAttributes(), VToolAlongLine::ReadToolAttributes(), VToolBisector::ReadToolAttributes(), VToolCurveIntersectAxis::ReadToolAttributes(), VToolEndLine::ReadToolAttributes(), VToolHeight::ReadToolAttributes(), VToolLineIntersectAxis::ReadToolAttributes(), VToolNormal::ReadToolAttributes(), VToolShoulderPoint::ReadToolAttributes(), VToolPointOfContact::ReadToolAttributes(), VToolLine::ReadToolAttributes(), and VPatternConverter::TagMeasurementsToV0_2_0().

◆ GetParametrUInt()

quint32 VDomDocument::GetParametrUInt ( const QDomElement &  domElement,
const QString &  name,
const QString &  defValue 
)
static

Returns the long long value of the given attribute. RENAME: GetParameterLongLong?

Parameters
domElementtag in xml tree
nameattribute name
Returns
long long value

Definition at line 354 of file vdomdocument.cpp.

References VException::AddMoreInformation(), VExceptionEmptyParameter::ErrorMessage(), and GetParametrString().

Referenced by GroupsWidget::attrUInt(), HistoryDialog::attrUInt(), DeletePiece::DeletePiece(), elementById(), VAbstractOperation::ExtractData(), find(), VAbstractPattern::getDartItems(), VPattern::GetDefCustomHeight(), VPattern::GetDefCustomSize(), VUndoCommand::getDestinationObject(), VAbstractPattern::getGroupIdByName(), VAbstractPattern::getGroups(), VAbstractPattern::getGroupsContainingItem(), GetLabelTemplate(), VAbstractPattern::getOpItems(), getParameterId(), VAbstractPattern::hasGroupItem(), VPattern::ParseAnchorPoint(), VAbstractPattern::parseGroups(), VPattern::parseIntersectXYTool(), VAbstractPattern::parseItemElement(), VPattern::ParseLineElement(), VPattern::ParseNodeArc(), VPattern::ParseNodeEllipticalArc(), VPattern::ParseNodePoint(), VPattern::ParseOldToolSpline(), VPattern::ParseOldToolSplinePath(), VPattern::ParsePathElement(), VAbstractPattern::ParsePieceCSARecords(), VPattern::ParsePieceDataTag(), VPattern::parsePieceElement(), VPattern::ParsePieceGrainline(), VAbstractPattern::ParsePieceInternalPaths(), VPattern::parsePieceNode(), VPattern::ParsePiecePatternInfo(), VAbstractPattern::ParseSANode(), VPattern::ParseToolAlongLine(), VPattern::ParseToolArc(), VPattern::ParseToolArcWithLength(), VPattern::ParseToolBisector(), VPattern::ParseToolCubicBezier(), VPattern::ParseToolCubicBezierPath(), VPattern::ParseToolCurveIntersectAxis(), VPattern::ParseToolCutArc(), VPattern::ParseToolCutSpline(), VPattern::ParseToolCutSplinePath(), VPattern::ParseToolEllipticalArc(), VPattern::ParseToolEndLine(), VPattern::ParseToolHeight(), VPattern::ParseToolLineIntersect(), VPattern::ParseToolLineIntersectAxis(), VPattern::ParseToolMirrorByAxis(), VPattern::ParseToolMirrorByLine(), VPattern::ParseToolMove(), VPattern::ParseToolNormal(), VPattern::ParseToolPointFromArcAndTangent(), VPattern::ParseToolPointFromCircleAndTangent(), VPattern::ParseToolPointOfContact(), VPattern::ParseToolPointOfIntersectionArcs(), VPattern::ParseToolPointOfIntersectionCircles(), VPattern::ParseToolPointOfIntersectionCurves(), VPattern::ParseToolRotation(), VPattern::ParseToolsElement(), VPattern::ParseToolShoulderPoint(), VPattern::ParseToolSpline(), VPattern::ParseToolSplinePath(), VPattern::ParseToolTriangle(), VPattern::ParseToolTrueDarts(), VPatternConverter::PortPieceLabelstoV0_6_0(), VToolMirrorByAxis::ReadToolAttributes(), VToolMirrorByLine::ReadToolAttributes(), VToolMove::ReadToolAttributes(), VToolRotation::ReadToolAttributes(), VToolTrueDarts::ReadToolAttributes(), IntersectCirclesTool::ReadToolAttributes(), IntersectCircleTangentTool::ReadToolAttributes(), PointIntersectXYTool::ReadToolAttributes(), VToolCutArc::ReadToolAttributes(), VToolCutSpline::ReadToolAttributes(), VToolCutSplinePath::ReadToolAttributes(), VToolAlongLine::ReadToolAttributes(), VToolBisector::ReadToolAttributes(), VToolCurveIntersectAxis::ReadToolAttributes(), VToolEndLine::ReadToolAttributes(), VToolHeight::ReadToolAttributes(), VToolLineIntersectAxis::ReadToolAttributes(), VToolNormal::ReadToolAttributes(), VToolShoulderPoint::ReadToolAttributes(), VToolLineIntersect::ReadToolAttributes(), VToolPointFromArcAndTangent::ReadToolAttributes(), VToolPointOfContact::ReadToolAttributes(), VToolPointOfIntersectionArcs::ReadToolAttributes(), VToolPointOfIntersectionCurves::ReadToolAttributes(), VToolTriangle::ReadToolAttributes(), VToolLine::ReadToolAttributes(), RemoveGroupItem::redo(), UnionTool::ReferenceObjects(), PatternPieceTool::RefreshDataInFile(), VAbstractPattern::removeGroupItem(), VPattern::SplinesCommonAttributes(), and AddGroupItem::undo().

◆ GetParametrUsage()

NodeUsage VDomDocument::GetParametrUsage ( const QDomElement &  domElement,
const QString &  name 
)
static

Definition at line 425 of file vdomdocument.cpp.

References getParameterBool(), InUse, NotInUse, and trueStr.

Referenced by VPattern::GarbageCollector().

◆ Major()

QString VDomDocument::Major ( ) const

Definition at line 777 of file vdomdocument.cpp.

References TagVersion, and UniqueTagText().

◆ Minor()

QString VDomDocument::Minor ( ) const

Definition at line 786 of file vdomdocument.cpp.

References TagVersion, and UniqueTagText().

◆ MUnit()

◆ NodeById()

QDomElement VDomDocument::NodeById ( const quint32 &  nodeId)

◆ ParentNodeById()

QDomNode VDomDocument::ParentNodeById ( const quint32 &  nodeId)

Definition at line 856 of file vdomdocument.cpp.

References NodeById().

Referenced by DelTool::DelTool().

◆ Patch()

QString VDomDocument::Patch ( ) const

Definition at line 795 of file vdomdocument.cpp.

References TagVersion, and UniqueTagText().

◆ RemoveAllChildren()

◆ SafeCopy()

bool VDomDocument::SafeCopy ( const QString &  source,
const QString &  destination,
QString &  error 
)
static

◆ SaveCanonicalXML()

bool VDomDocument::SaveCanonicalXML ( QIODevice *  file,
int  indent,
QString &  error 
) const
private

◆ SaveDocument()

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

◆ SetAttribute() [1/4]

template<>
void VDomDocument::SetAttribute ( QDomElement &  domElement,
const QString &  name,
const bool &  value 
) const
inline

Definition at line 202 of file vdomdocument.h.

References falseStr, and trueStr.

◆ SetAttribute() [2/4]

template<>
void VDomDocument::SetAttribute ( QDomElement &  domElement,
const QString &  name,
const MeasurementsType value 
) const
inline

Definition at line 209 of file vdomdocument.h.

References Multisize.

◆ SetAttribute() [3/4]

template<>
void VDomDocument::SetAttribute ( QDomElement &  domElement,
const QString &  name,
const QString &  value 
) const
inline

Definition at line 194 of file vdomdocument.h.

◆ SetAttribute() [4/4]

template<typename T >
void VDomDocument::SetAttribute ( QDomElement &  domElement,
const QString &  name,
const T &  value 
) const
inline

SetAttribute set attribute in pattern file. Replace "," by ".".

Parameters
domElementelement in xml tree.
namename of attribute.
valuevalue of attribute.

Definition at line 185 of file vdomdocument.h.

Referenced by PatternPieceTool::AddAttributes(), VToolInternalPath::AddAttributes(), PatternPieceTool::AddCSARecord(), PatternPieceTool::AddGrainline(), PatternPieceTool::AddInternalPaths(), VPatternConverter::AddLabelTemplateLineV0_6_0(), VVITConverter::AddMV0_3_0(), VVSTConverter::AddMV0_4_0(), VToolCubicBezierPath::AddPathPoint(), VToolSplinePath::AddPathPoint(), PatternPieceTool::AddPatternInfo(), PatternPieceTool::AddPatternPieceData(), VAbstractTool::AddSANode(), VToolBasePoint::AddToFile(), AnchorPointTool::AddToFile(), VNodeArc::AddToFile(), VNodeEllipticalArc::AddToFile(), VNodePoint::AddToFile(), VNodeSpline::AddToFile(), VNodeSplinePath::AddToFile(), VToolInternalPath::AddToFile(), UnionTool::AddToFile(), VMeasurements::ClearForExport(), VVITConverter::ConvertMeasurementsToV0_3_3(), VVSTConverter::ConvertMeasurementsToV0_4_2(), VMeasurements::CreateEmptyMultisizeFile(), VAbstractPattern::createGroup(), ShowOperationPointName::Do(), MoveDoubleLabel::Do(), MoveLabel::Do(), MoveOperationLabel::Do(), MoveSpline::Do(), MoveSPoint::Do(), TogglePieceLock::doCmd(), TogglePieceInLayout::doCmd(), SetPieceColor::doCmd(), VMeasurements::MakeEmpty(), VPattern::MakeEmptyIncrement(), VPattern::parsePieceElement(), VPattern::ParseToolAlongLine(), VPattern::ParseToolArc(), VPattern::ParseToolArcWithLength(), VPattern::ParseToolBisector(), VPattern::ParseToolCurveIntersectAxis(), VPattern::ParseToolCutArc(), VPattern::ParseToolCutSpline(), VPattern::ParseToolCutSplinePath(), VPattern::ParseToolEllipticalArc(), VPattern::ParseToolEndLine(), VPattern::ParseToolLineIntersectAxis(), VPattern::ParseToolMove(), VPattern::ParseToolNormal(), VPattern::ParseToolPointFromCircleAndTangent(), VPattern::ParseToolPointOfContact(), VPattern::ParseToolPointOfIntersectionCircles(), VPattern::ParseToolRotation(), VPattern::ParseToolShoulderPoint(), VPattern::ParseToolSpline(), VPattern::ParseToolSplinePath(), PatternPieceTool::RefreshDataInFile(), MovePiece::SaveCoordinates(), VToolMirrorByAxis::SaveDialog(), VToolMirrorByLine::SaveDialog(), VToolMove::SaveDialog(), VToolRotation::SaveDialog(), VToolArc::SaveDialog(), VToolArcWithLength::SaveDialog(), VToolCubicBezier::SaveDialog(), VToolCubicBezierPath::SaveDialog(), VToolEllipticalArc::SaveDialog(), VToolSpline::SaveDialog(), VToolSplinePath::SaveDialog(), VToolTrueDarts::SaveDialog(), IntersectCirclesTool::SaveDialog(), IntersectCircleTangentTool::SaveDialog(), PointIntersectXYTool::SaveDialog(), VToolCutArc::SaveDialog(), VToolCutSpline::SaveDialog(), VToolCutSplinePath::SaveDialog(), VToolAlongLine::SaveDialog(), VToolBisector::SaveDialog(), VToolCurveIntersectAxis::SaveDialog(), VToolEndLine::SaveDialog(), VToolHeight::SaveDialog(), VToolLineIntersectAxis::SaveDialog(), VToolNormal::SaveDialog(), VToolShoulderPoint::SaveDialog(), VToolBasePoint::SaveDialog(), VToolLineIntersect::SaveDialog(), VToolPointFromArcAndTangent::SaveDialog(), VToolPointOfContact::SaveDialog(), VToolPointOfIntersectionArcs::SaveDialog(), VToolPointOfIntersectionCurves::SaveDialog(), VToolTriangle::SaveDialog(), VToolLine::SaveDialog(), VDrawTool::SaveOptions(), VToolMirrorByAxis::SaveOptions(), VToolMirrorByLine::SaveOptions(), VAbstractOperation::SaveOptions(), VToolMove::SaveOptions(), VToolRotation::SaveOptions(), VAbstractSpline::SaveOptions(), VToolArc::SaveOptions(), VToolArcWithLength::SaveOptions(), VToolEllipticalArc::SaveOptions(), VToolDoublePoint::SaveOptions(), VToolTrueDarts::SaveOptions(), IntersectCirclesTool::SaveOptions(), IntersectCircleTangentTool::SaveOptions(), PointIntersectXYTool::SaveOptions(), VToolCutArc::SaveOptions(), VToolCutSpline::SaveOptions(), VToolCutSplinePath::SaveOptions(), DoubleLinePointTool::SaveOptions(), VToolAlongLine::SaveOptions(), VToolBisector::SaveOptions(), VToolCurveIntersectAxis::SaveOptions(), VToolEndLine::SaveOptions(), VToolHeight::SaveOptions(), VToolLineIntersectAxis::SaveOptions(), VToolLinePoint::SaveOptions(), VToolNormal::SaveOptions(), VToolShoulderPoint::SaveOptions(), VToolBasePoint::SaveOptions(), VToolLineIntersect::SaveOptions(), VToolPointFromArcAndTangent::SaveOptions(), VToolPointOfContact::SaveOptions(), VToolPointOfIntersectionArcs::SaveOptions(), VToolPointOfIntersectionCurves::SaveOptions(), VToolSinglePoint::SaveOptions(), VToolTriangle::SaveOptions(), VToolLine::SaveOptions(), VAbstractOperation::SaveSourceDestination(), VPattern::SetDefCustom(), VPattern::SetDefCustomHeight(), VPattern::SetDefCustomSize(), VAbstractPattern::SetGradationHeights(), VAbstractPattern::SetGradationSizes(), VAbstractPattern::setGroupColor(), VAbstractPattern::setGroupLineType(), VAbstractPattern::setGroupLineWeight(), VAbstractPattern::setGroupLock(), VAbstractPattern::setGroupVisibility(), VPattern::setIncrementDescription(), VPattern::SetIncrementFormula(), VPattern::setIncrementName(), VAbstractPattern::SetLabelDateFormat(), SetLabelTemplate(), VAbstractPattern::SetLabelTimeFormat(), VMeasurements::SetMBaseValue(), VMeasurements::SetMDescription(), VMeasurements::SetMFullName(), VMeasurements::SetMHeightIncrease(), VMeasurements::SetMName(), VMeasurements::SetMSizeIncrease(), VMeasurements::SetMValue(), VPattern::SetReadOnly(), VToolCubicBezier::SetSplineAttributes(), VToolSpline::SetSplineAttributes(), VToolCubicBezierPath::SetSplinePathAttributes(), VToolSplinePath::SetSplinePathAttributes(), ShowDoublePointName::setVisibility(), and ShowPointName::setVisibility().

◆ SetLabelTemplate()

void VDomDocument::SetLabelTemplate ( QDomElement &  element,
const QVector< VLabelTemplateLine > &  lines 
)

◆ SetParametrUsage()

void VDomDocument::SetParametrUsage ( QDomElement &  domElement,
const QString &  name,
const NodeUsage value 
)
static

◆ setTagText() [1/2]

bool VDomDocument::setTagText ( const QDomElement &  domElement,
const QString &  text 
)
protected

Definition at line 823 of file vdomdocument.cpp.

◆ setTagText() [2/2]

◆ setXMLContent()

◆ TestUniqueId()

void VDomDocument::TestUniqueId ( ) const
protected

TestUniqueId test exist unique id in pattern file. Each id must be unique.

Definition at line 606 of file vdomdocument.cpp.

References CollectId().

Referenced by VPattern::PrepareForParse(), VAbstractConverter::Save(), and VPattern::SaveDocument().

◆ UniqueTagText()

◆ UnitsHelpString()

QString VDomDocument::UnitsHelpString ( )
static

Definition at line 726 of file vdomdocument.cpp.

References LAST_UNIT_DO_NOT_USE, Mm, and UnitsToStr().

Referenced by VCommandLine::InitOptions().

◆ ValidateXML()

void VDomDocument::ValidateXML ( const QString &  schema,
const QString &  fileName 
)
static

ValidateXML validate xml file by xsd schema.

Parameters
schemapath to schema file.
fileNamename of xml file.

Definition at line 641 of file vdomdocument.cpp.

References VException::AddMoreInformation(), MessageHandler::column(), MessageHandler::line(), and MessageHandler::statusMessage().

Referenced by VPatternConverter::ApplyPatches(), VVITConverter::ApplyPatches(), VVSTConverter::ApplyPatches(), and VAbstractConverter::ValidateInputFile().

Member Data Documentation

◆ AttrAlignment

const QString VDomDocument::AttrAlignment = QStringLiteral("alignment")
static

Definition at line 112 of file vdomdocument.h.

Referenced by GetLabelTemplate(), and SetLabelTemplate().

◆ AttrBold

const QString VDomDocument::AttrBold = QStringLiteral("bold")
static

Definition at line 110 of file vdomdocument.h.

Referenced by GetLabelTemplate(), and SetLabelTemplate().

◆ AttrFSIncrement

const QString VDomDocument::AttrFSIncrement = QStringLiteral("sfIncrement")
static

Definition at line 113 of file vdomdocument.h.

Referenced by GetLabelTemplate(), and SetLabelTemplate().

◆ AttrId

◆ AttrItalic

const QString VDomDocument::AttrItalic = QStringLiteral("italic")
static

Definition at line 111 of file vdomdocument.h.

Referenced by GetLabelTemplate(), and SetLabelTemplate().

◆ AttrText

const QString VDomDocument::AttrText = QStringLiteral("text")
static

Definition at line 109 of file vdomdocument.h.

Referenced by GetLabelTemplate(), and SetLabelTemplate().

◆ map

QHash<quint32, QDomElement> VDomDocument::map
private

◆ TagLine

const QString VDomDocument::TagLine = QStringLiteral("line")
static

Definition at line 117 of file vdomdocument.h.

Referenced by GetLabelTemplate(), and SetLabelTemplate().

◆ TagUnit

const QString VDomDocument::TagUnit = QStringLiteral("unit")
static

◆ TagVersion


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