55 #include <QDomNodeList>
57 #include "../ifc/xml/vabstractpattern.h"
58 #include "../ifc/ifcdef.h"
59 #include "../vmisc/logging.h"
60 #include "../vmisc/vabstractapplication.h"
61 #include "../vmisc/def.h"
62 #include "../vtools/tools/drawTools/vdrawtool.h"
63 #include "../vundocommand.h"
71 , m_scene(
qApp->getCurrentScene())
73 setText(tr(
"move point label"));
75 qCDebug(vUndo,
"Tool id %u",
m_idTool);
78 if (element.isElement())
83 qCDebug(vUndo,
"Label old Mx %f",
m_oldPos.x());
84 qCDebug(vUndo,
"Label old My %f",
m_oldPos.y());
88 qCDebug(vUndo,
"Can't find point with id = %u.",
nodeId);
104 qCDebug(vUndo,
"Merge with undo.");
106 qCDebug(vUndo,
"Label new Mx %f",
m_newPos.x());
107 qCDebug(vUndo,
"Label new My %f",
m_newPos.y());
120 qCDebug(vUndo,
"New mx %f", pos.x());
121 qCDebug(vUndo,
"New my %f", pos.y());
124 if (not domElement.isNull() && domElement.isElement())
131 tool->setPointNamePosition(
nodeId, pos);
136 qCDebug(vUndo,
"Can't find point with id = %u.",
nodeId);
QPointF GetNewPos() const
quint32 GetPointId() const
virtual void Do(const QPointF &pos) Q_DECL_OVERRIDE
quint32 GetToolId() const
virtual bool mergeWith(const QUndoCommand *command) Q_DECL_OVERRIDE
virtual int id() const Q_DECL_OVERRIDE
MoveOperationLabel(quint32 idTool, VAbstractPattern *doc, const QPointF &pos, quint32 idPoint, QUndoCommand *parent=nullptr)
static VDataTool * getTool(quint32 id)
getTool return tool from tool list.
static qreal GetParametrDouble(const QDomElement &domElement, const QString &name, const QString &defValue)
Returns the double value of the given attribute.
void SetAttribute(QDomElement &domElement, const QString &name, const T &value) const
SetAttribute set attribute in pattern file. Replace "," by ".".
QDomElement getDestinationObject(quint32 idTool, quint32 idPoint) const