57 #include "../vmisc/logging.h"
58 #include "../ifc/xml/vabstractpattern.h"
65 setText(QObject::tr(
"add node"));
76 qCDebug(vUndo,
"Undo.");
79 if (not modeling.isNull())
82 if (domElement.isElement())
84 if (modeling.removeChild(domElement).isNull())
86 qCDebug(vUndo,
"Can't delete node.");
92 qCDebug(vUndo,
"Can't get node by id = %u.",
nodeId);
106 qCDebug(vUndo,
"Redo.");
109 if (not modeling.isNull())
111 modeling.appendChild(
xml);
123 QDomElement modeling;
virtual void redo() Q_DECL_OVERRIDE
AddDetNode(const QDomElement &xml, VAbstractPattern *doc, const QString &blockName, QUndoCommand *parent=nullptr)
virtual ~AddDetNode() Q_DECL_OVERRIDE
QDomElement GetModelingSection() const
virtual void undo() Q_DECL_OVERRIDE
static const QString TagModeling
QDomElement getDraftBlockElement(const QString &name)
bool getActiveNodeElement(const QString &name, QDomElement &element) const
getActiveNodeElement find element in current draft block by name.
QDomElement elementById(quint32 id, const QString &tagName=QString())
static quint32 getParameterId(const QDomElement &domElement)
getParameterId return value id attribute.