56 #include <QDomElement>
58 #include "../vmisc/def.h"
59 #include "../vmisc/logging.h"
60 #include "../ifc/xml/vabstractpattern.h"
67 , m_newBlockName(newBlockName)
68 , m_oldBlockName(QString())
70 setText(tr(
"rename pattern piece"));
82 qCDebug(vUndo,
"Undo.");
90 qCDebug(vUndo,
"Redo.");
101 const QString oldName = renameCommand->
getOldName();
126 qCWarning(vUndo,
"Can't change pattern piece name");
RenameDraftBlock(VAbstractPattern *doc, const QString &newBlockName, QComboBox *combo, QUndoCommand *parent=nullptr)
virtual int id() const Q_DECL_OVERRIDE
void changeName(const QString &oldName, const QString &newName)
virtual ~RenameDraftBlock() Q_DECL_OVERRIDE
QString getNewName() const
virtual bool mergeWith(const QUndoCommand *command) Q_DECL_OVERRIDE
virtual void undo() Q_DECL_OVERRIDE
virtual void redo() Q_DECL_OVERRIDE
QString getOldName() const
bool renameDraftBlock(const QString &oldName, const QString &newName)
renameDraftBlock change draft block name.
QString getActiveDraftBlockName() const
getActiveDraftBlockName return current draft block name.