55 #include <QDomElement>
58 #include "../ifc/ifcdef.h"
59 #include "../ifc/xml/vabstractpattern.h"
60 #include "../ifc/xml/vdomdocument.h"
61 #include "../vmisc/logging.h"
62 #include "../vmisc/def.h"
63 #include "../tools/vdatatool.h"
65 #include "../vpatterndb/vpiecenode.h"
66 #include "../vpatterndb/vpiecepath.h"
75 setText(tr(
"delete tool"));
78 if (domElement.isElement())
80 xml = domElement.cloneNode().toElement();
82 QDomNode previousPiece = domElement.previousSibling();
83 if (previousPiece.isNull())
95 qCDebug(vUndo,
"Can't get piece by id = %u.",
nodeId);
107 qCDebug(vUndo,
"Undo.");
116 qCDebug(vUndo,
"Redo.");
119 if (domElement.isElement())
137 qCDebug(vUndo,
"Can't get piece by id = %u.",
nodeId);
virtual void redo() Q_DECL_OVERRIDE
DeletePiece(VAbstractPattern *doc, quint32 id, const VPiece &piece, QUndoCommand *parent=nullptr)
virtual void undo() Q_DECL_OVERRIDE
static VDataTool * getTool(quint32 id)
getTool return tool from tool list.
static const QString TagPiece
QDomElement elementById(quint32 id, const QString &tagName=QString())
static quint32 GetParametrUInt(const QDomElement &domElement, const QString &name, const QString &defValue)
Returns the long long value of the given attribute. RENAME: GetParameterLongLong?
static const QString AttrId
QVector< VPieceNode > GetNodes() const
QVector< CustomSARecord > GetCustomSARecords() const
QVector< quint32 > GetInternalPaths() const
QVector< quint32 > getAnchors() const
VPiecePath GetPath() const
void DecrementReferences(const QVector< quint32 > &nodes) const
void UndoDeleteAfterSibling(QDomNode &parentNode, const quint32 &siblingId) const