55 #include <QApplication>
57 #include "../ifc/ifcdef.h"
58 #include "../vmisc/def.h"
59 #include "../vmisc/customevents.h"
60 #include "../vpatterndb/vnodedetail.h"
61 #include "../vpatterndb/vpiecenode.h"
62 #include "../tools/drawTools/operation/vabstractoperation.h"
64 Q_LOGGING_CATEGORY(vUndo,
"v.undo")
69 , QUndoCommand(parent)
96 parentNode.appendChild(
xml);
100 const QDomElement refElement =
doc->
NodeById(siblingId);
101 parentNode.insertAfter(
xml, refElement);
108 for (qint32 i = 0; i < nodes.size(); ++i)
117 for (qint32 i = 0; i < nodes.size(); ++i)
128 for (qint32 i = 0; i < nodes.size(); ++i)
130 n.append(nodes.at(i).path);
141 for (qint32 i = 0; i < nodes.size(); ++i)
143 n.append(nodes.at(i).path);
154 for (qint32 i = 0; i < nodes.size(); ++i)
156 n.append(nodes.at(i).GetId());
167 for (qint32 i = 0; i < nodes.size(); ++i)
169 n.append(nodes.at(i).GetId());
179 if (tool.isElement())
181 QDomElement correctDest;
182 const QDomNodeList nodeList = tool.childNodes();
183 for (qint32 i = 0; i < nodeList.size(); ++i)
185 const QDomElement dest = nodeList.at(i).toElement();
193 if (not correctDest.isNull())
195 const QDomNodeList destObjects = correctDest.childNodes();
196 for (qint32 i = 0; i < destObjects.size(); ++i)
198 const QDomElement obj = destObjects.at(i).toElement();
199 if (not obj.isNull() && obj.isElement())
211 return QDomElement();
static const QString TagDestination
virtual void IncrementReferens(quint32 id) const =0
static const QString TagOperation
virtual void DecrementReferens(quint32 id) const =0
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?
QDomElement NodeById(const quint32 &nodeId)
virtual void RedoFullParsing()
void DecrementReferences(const QVector< quint32 > &nodes) const
void IncrementReferences(const QVector< quint32 > &nodes) const
void UndoDeleteAfterSibling(QDomNode &parentNode, const quint32 &siblingId) const
QDomElement getDestinationObject(quint32 idTool, quint32 idPoint) const
const QString AttrIdObject