54 #include "../vpatterndb/vpiecenode.h"
55 #include "../vpatterndb/vpiecepath.h"
62 , m_blockName(blockName)
64 setText(tr(
"add piece"));
75 qCDebug(vUndo,
"Undo.");
78 if (not pieces.isNull())
81 if (domElement.isElement())
83 if (pieces.removeChild(domElement).isNull())
85 qCDebug(vUndo,
"Can't delete node");
96 qCDebug(vUndo,
"Can't get node by id = %u.",
nodeId);
111 qCDebug(vUndo,
"Redo.");
114 if (not pieces.isNull())
116 pieces.appendChild(
xml);
virtual void undo() Q_DECL_OVERRIDE
QDomElement getPiecesElement() const
virtual void redo() Q_DECL_OVERRIDE
AddPiece(const QDomElement &xml, VAbstractPattern *doc, const VPiece &piece, const QString &blockName=QString(), QUndoCommand *parent=nullptr)
static const QString TagPieces
QDomElement getDraftBlockElement(const QString &name)
bool getActiveNodeElement(const QString &name, QDomElement &element) const
getActiveNodeElement find element in current draft block by name.
static const QString TagPiece
QDomElement elementById(quint32 id, const QString &tagName=QString())
static quint32 getParameterId(const QDomElement &domElement)
getParameterId return value id attribute.
QVector< VPieceNode > GetNodes() const
QVector< CustomSARecord > GetCustomSARecords() const
QVector< quint32 > GetInternalPaths() const
QVector< quint32 > getAnchors() const
VPiecePath GetPath() const
virtual void RedoFullParsing()
void DecrementReferences(const QVector< quint32 > &nodes) const