The VDomDocument class represents a Seamly2D document (.val file). More...
#include <vdomdocument.h>
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< VLabelTemplateLine > | GetLabelTemplate (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... | |
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.
VDomDocument::VDomDocument | ( | ) |
Definition at line 216 of file vdomdocument.cpp.
|
virtual |
QDomElement VDomDocument::CloneNodeById | ( | const quint32 & | nodeId | ) |
Definition at line 863 of file vdomdocument.cpp.
References NodeById().
Referenced by DelGroup::DelGroup(), and DelTool::DelTool().
|
protected |
Definition at line 613 of file vdomdocument.cpp.
References AttrId, and getParameterId().
Referenced by TestUniqueId().
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().
|
private |
Find element by id.
node | node |
id | id value |
Definition at line 282 of file vdomdocument.cpp.
References AttrId, GetParametrUInt(), map, and NULL_ID_STR.
Referenced by elementById().
QVector< VLabelTemplateLine > VDomDocument::GetLabelTemplate | ( | const QDomElement & | element | ) | const |
Definition at line 949 of file vdomdocument.cpp.
References VLabelTemplateLine::alignment, AttrAlignment, AttrBold, AttrFSIncrement, AttrItalic, AttrText, VLabelTemplateLine::bold, falseStr, VLabelTemplateLine::fontSizeIncrement, getParameterBool(), GetParametrString(), GetParametrUInt(), VLabelTemplateLine::italic, VLabelTemplateLine::line, and TagLine.
Referenced by VAbstractPattern::getPatternLabelTemplate(), VPattern::ParsePieceDataTag(), and VLabelTemplate::ReadLines().
|
static |
Definition at line 383 of file vdomdocument.cpp.
References VException::AddMoreInformation(), VExceptionEmptyParameter::ErrorMessage(), and GetParametrString().
Referenced by VAbstractPattern::addGroupItems(), VAbstractOperation::ExtractData(), VPattern::getActivePatternPieces(), VAbstractPattern::GetGradationHeights(), VAbstractPattern::GetGradationSizes(), VAbstractPattern::getGroupLock(), VAbstractPattern::getGroups(), VAbstractPattern::getGroupVisibility(), GetLabelTemplate(), GetParametrUsage(), VPattern::IsDefCustom(), VPattern::IsReadOnly(), VPatternConverter::IsReadOnly(), VAbstractPattern::parseItemElement(), VPattern::ParseNodePoint(), VPattern::ParsePathElement(), VAbstractPattern::ParsePieceCSARecords(), VPattern::ParsePieceDataTag(), VPattern::parsePieceElement(), VPattern::ParsePieceGrainline(), VPattern::ParsePiecePatternInfo(), VAbstractPattern::ParseSANode(), VPattern::ParseToolTrueDarts(), VPattern::PointsCommonAttributes(), ShowDoublePointName::ShowDoublePointName(), ShowOperationPointName::ShowOperationPointName(), and ShowPointName::ShowPointName().
|
static |
getParameterId return value id attribute.
domElement | tag in xml tree. |
Definition at line 534 of file vdomdocument.cpp.
References VException::AddMoreInformation(), AttrId, VExceptionConversionError::ErrorMessage(), GetParametrUInt(), NULL_ID, and NULL_ID_STR.
Referenced by AddDetNode::AddDetNode(), AddGroup::AddGroup(), AddPiece::AddPiece(), AddToCalc::AddToCalc(), CollectId(), VPattern::getActiveBasePoint(), VPattern::getActivePatternPieces(), VPattern::parsePieceElement(), and VPattern::ToolsCommonAttributes().
|
static |
Returns the double value of the given attribute.
domElement | tag in xml tree |
name | attribute name |
Definition at line 501 of file vdomdocument.cpp.
References VException::AddMoreInformation(), VExceptionEmptyParameter::ErrorMessage(), and GetParametrString().
Referenced by VVITConverter::ConvertMeasurementsToV0_3_0(), VVSTConverter::ConvertMeasurementsToV0_4_0(), VAbstractOperation::ExtractData(), MoveDoubleLabel::MoveDoubleLabel(), MoveLabel::MoveLabel(), MoveOperationLabel::MoveOperationLabel(), MovePiece::MovePiece(), MoveSPoint::MoveSPoint(), VPattern::ParseOldToolSpline(), VPattern::ParseOldToolSplinePath(), VPattern::ParsePieceDataTag(), VPattern::parsePieceElement(), VPattern::ParsePieceGrainline(), VPattern::parsePieceNode(), VPattern::ParsePiecePatternInfo(), VAbstractPattern::ParseSANode(), VPattern::ParseToolBasePoint(), VPattern::ParseToolNormal(), VPattern::ParseToolTrueDarts(), VPattern::PointsCommonAttributes(), VMeasurements::ReadMeasurements(), VToolNormal::ReadToolAttributes(), and VMeasurements::UniqueTagAttr().
|
static |
Definition at line 480 of file vdomdocument.cpp.
References GetParametrString().
Referenced by VAbstractOperation::ExtractData(), and VPattern::ParsePieceDataTag().
|
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.
VExceptionEmptyParameter | when 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().
|
static |
Returns the long long value of the given attribute. RENAME: GetParameterLongLong?
domElement | tag in xml tree |
name | attribute name |
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().
|
static |
Definition at line 425 of file vdomdocument.cpp.
References getParameterBool(), InUse, NotInUse, and trueStr.
Referenced by VPattern::GarbageCollector().
QString VDomDocument::Major | ( | ) | const |
Definition at line 777 of file vdomdocument.cpp.
References TagVersion, and UniqueTagText().
QString VDomDocument::Minor | ( | ) | const |
Definition at line 786 of file vdomdocument.cpp.
References TagVersion, and UniqueTagText().
Unit VDomDocument::MUnit | ( | ) | const |
Definition at line 559 of file vdomdocument.cpp.
References Cm, Px, StrToUnits(), TagUnit, UniqueTagText(), and unitCM.
Referenced by TMainWindow::changeEvent(), TMainWindow::InitWindow(), TMainWindow::LoadFile(), TMainWindow::LoadFromExistingFile(), MainWindow::LoadPattern(), VMeasurements::ReadMeasurements(), ShowInfoDialog::ShowInfoDialog(), MainWindow::ShowMeasurements(), and VMeasurements::UniqueTagAttr().
QDomElement VDomDocument::NodeById | ( | const quint32 & | nodeId | ) |
Definition at line 870 of file vdomdocument.cpp.
References elementById().
Referenced by CloneNodeById(), ParentNodeById(), DelTool::redo(), and VUndoCommand::UndoDeleteAfterSibling().
QDomNode VDomDocument::ParentNodeById | ( | const quint32 & | nodeId | ) |
Definition at line 856 of file vdomdocument.cpp.
References NodeById().
Referenced by DelTool::DelTool().
QString VDomDocument::Patch | ( | ) | const |
Definition at line 795 of file vdomdocument.cpp.
References TagVersion, and UniqueTagText().
|
static |
RemoveAllChildren remove all children from file.
domElement | tag in xml tree. |
Definition at line 844 of file vdomdocument.cpp.
Referenced by SavePieceOptions::redo(), SavePiecePathOptions::redo(), PatternPieceTool::RefreshDataInFile(), VAbstractOperation::SaveSourceDestination(), VAbstractPattern::setPatternLabelTemplate(), VPatternConverter::TagDetailToV0_4_0(), VPatternConverter::TagUnionDetailsToV0_4_0(), SavePieceOptions::undo(), SavePiecePathOptions::undo(), VToolCubicBezierPath::UpdatePathPoints(), and VToolSplinePath::UpdatePathPoints().
|
static |
Definition at line 881 of file vdomdocument.cpp.
Referenced by MainWindow::ReopenFilesAfterCrash(), and VAbstractConverter::ReserveFile().
|
private |
Definition at line 317 of file vdomdocument.cpp.
References anonymous_namespace{vdomdocument.cpp}::SaveNodeCanonically(), and SCASSERT.
Referenced by SaveDocument().
|
virtual |
Reimplemented in VMeasurements, and VPattern.
Definition at line 741 of file vdomdocument.cpp.
References SaveCanonicalXML().
Referenced by EditLabelTemplateDialog::ExportTemplate(), VPattern::SaveDocument(), and VMeasurements::SaveDocument().
|
inline |
Definition at line 202 of file vdomdocument.h.
|
inline |
Definition at line 209 of file vdomdocument.h.
References Multisize.
|
inline |
Definition at line 194 of file vdomdocument.h.
|
inline |
SetAttribute set attribute in pattern file. Replace "," by ".".
domElement | element in xml tree. |
name | name of attribute. |
value | value 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().
void VDomDocument::SetLabelTemplate | ( | QDomElement & | element, |
const QVector< VLabelTemplateLine > & | lines | ||
) |
Definition at line 981 of file vdomdocument.cpp.
References AttrAlignment, AttrBold, AttrFSIncrement, AttrItalic, AttrText, SetAttribute(), and TagLine.
Referenced by VLabelTemplate::AddLines(), PatternPieceTool::AddPatternPieceData(), and VAbstractPattern::setPatternLabelTemplate().
|
static |
Definition at line 439 of file vdomdocument.cpp.
References falseStr, InUse, and trueStr.
Referenced by VAbstractNode::decrementReferens(), VToolInternalPath::decrementReferens(), UnionTool::decrementReferens(), VPattern::GarbageCollector(), VAbstractNode::incrementReferens(), VToolInternalPath::incrementReferens(), and UnionTool::incrementReferens().
|
protected |
Definition at line 823 of file vdomdocument.cpp.
|
protected |
Definition at line 803 of file vdomdocument.cpp.
Referenced by VMeasurements::SetBirthDate(), VAbstractPattern::SetCompanyName(), VAbstractPattern::SetCustomerName(), VAbstractPattern::SetDescription(), VMeasurements::SetEmail(), VMeasurements::SetFamilyName(), VMeasurements::SetGender(), VMeasurements::SetGivenName(), VAbstractPattern::SetImage(), VAbstractPattern::SetMPath(), VAbstractPattern::SetNotes(), VMeasurements::SetNotes(), VAbstractPattern::SetPatternName(), VAbstractPattern::SetPatternNumber(), VMeasurements::SetPMSystem(), VMeasurements::SetReadOnly(), VAbstractPattern::SetVersion(), and VAbstractConverter::SetVersion().
|
virtual |
Reimplemented in VMeasurements, and VPattern.
Definition at line 702 of file vdomdocument.cpp.
References VException::AddMoreInformation().
Referenced by QT_WARNING_POP::createUnion(), EditLabelTemplateDialog::ImportTemplate(), PatternPieceDialog::initializeLabelsTab(), VPattern::setXMLContent(), VMeasurements::setXMLContent(), and VAbstractConverter::VAbstractConverter().
|
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().
|
protected |
Definition at line 572 of file vdomdocument.cpp.
Referenced by VVSTConverter::AddNewTagsForV0_4_0(), VMeasurements::BirthDate(), VMeasurements::Email(), VMeasurements::FamilyName(), VMeasurements::Gender(), VAbstractPattern::GetCompanyName(), VAbstractPattern::GetCustomerName(), VAbstractPattern::GetDescription(), VAbstractPattern::GetImage(), VAbstractPattern::GetNotes(), VAbstractPattern::GetPatternName(), VAbstractPattern::GetPatternNumber(), VAbstractPattern::GetVersion(), VMeasurements::GivenName(), VMeasurements::IsReadOnly(), VVITConverter::IsReadOnly(), VVSTConverter::IsReadOnly(), VPatternConverter::LabelTagToV0_4_4(), Major(), Minor(), VAbstractPattern::MPath(), MUnit(), VVITConverter::MUnitV0_2_0(), VMeasurements::Notes(), Patch(), VMeasurements::PMSystem(), and VPatternConverter::PortPatternLabeltoV0_6_0().
|
static |
Definition at line 726 of file vdomdocument.cpp.
References LAST_UNIT_DO_NOT_USE, Mm, and UnitsToStr().
Referenced by VCommandLine::InitOptions().
|
static |
ValidateXML validate xml file by xsd schema.
schema | path to schema file. |
fileName | name 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().
|
static |
Definition at line 112 of file vdomdocument.h.
Referenced by GetLabelTemplate(), and SetLabelTemplate().
|
static |
Definition at line 110 of file vdomdocument.h.
Referenced by GetLabelTemplate(), and SetLabelTemplate().
|
static |
Definition at line 113 of file vdomdocument.h.
Referenced by GetLabelTemplate(), and SetLabelTemplate().
|
static |
Definition at line 108 of file vdomdocument.h.
Referenced by PatternPieceTool::AddAttributes(), VToolInternalPath::AddAttributes(), AnchorPointTool::AddToFile(), VNodeArc::AddToFile(), VNodeEllipticalArc::AddToFile(), VNodePoint::AddToFile(), VNodeSpline::AddToFile(), VNodeSplinePath::AddToFile(), UnionTool::AddToFile(), CollectId(), VAbstractPattern::createGroup(), DeletePiece::DeletePiece(), elementById(), find(), VAbstractPattern::getGroupIdByName(), VAbstractPattern::getGroups(), VAbstractPattern::getGroupsContainingItem(), getParameterId(), VAbstractPattern::parseGroups(), and VDrawTool::SaveOptions().
|
static |
Definition at line 111 of file vdomdocument.h.
Referenced by GetLabelTemplate(), and SetLabelTemplate().
|
static |
Definition at line 109 of file vdomdocument.h.
Referenced by GetLabelTemplate(), and SetLabelTemplate().
|
private |
Map used for finding element by id.
Definition at line 170 of file vdomdocument.h.
Referenced by elementById(), find(), VAbstractPattern::GetGradationHeights(), VAbstractPattern::GetGradationSizes(), and VPatternConverter::toVersion0_6_1().
|
static |
Definition at line 117 of file vdomdocument.h.
Referenced by GetLabelTemplate(), and SetLabelTemplate().
|
static |
Definition at line 116 of file vdomdocument.h.
Referenced by VAbstractPattern::CheckTagExists(), VPattern::CreateEmptyFile(), VMeasurements::CreateEmptyIndividualFile(), VMeasurements::CreateEmptyMultisizeFile(), MUnit(), and VPattern::Parse().
|
static |
Definition at line 115 of file vdomdocument.h.
Referenced by VPattern::CreateEmptyFile(), VMeasurements::CreateEmptyIndividualFile(), VMeasurements::CreateEmptyMultisizeFile(), VLabelTemplate::CreateEmptyTemplate(), VAbstractPattern::GetVersion(), VAbstractConverter::GetVersionStr(), Major(), Minor(), VPattern::Parse(), Patch(), VAbstractPattern::SetVersion(), and VAbstractConverter::SetVersion().