27 #include <QDomElement>
29 #include <QMessageLogger>
33 #include "../ifc/ifcdef.h"
34 #include "../ifc/xml/vabstractpattern.h"
35 #include "../vmisc/vabstractapplication.h"
36 #include "../vmisc/def.h"
37 #include "../vmisc/logging.h"
38 #include "../vpatterndb/vcontainer.h"
39 #include "../vpatterndb/vpiece.h"
40 #include "../vwidgets/vabstractmainwindow.h"
50 setText(tr(
"Pattern piece lock"));
98 if (element.isElement())
110 window->
ShowToolTip(tr(
"Piece lock changed: ") + (lock ? tr(
"Locked") : tr(
"Unlocked")));
TogglePieceLock(quint32 id, bool lock, VContainer *data, VAbstractPattern *doc, QUndoCommand *parent=nullptr)
virtual int id() const Q_DECL_OVERRIDE
virtual void undo() Q_DECL_OVERRIDE
quint32 getpieceId() const
void updateList(quint32 m_id)
virtual void redo() Q_DECL_OVERRIDE
virtual ~TogglePieceLock()
virtual void ShowToolTip(const QString &toolTip)=0
static const QString TagPiece
The VContainer class container of all variables.
const QHash< quint32, VPiece > * DataPieces() const
void UpdatePiece(quint32 id, const VPiece &piece)
QDomElement elementById(quint32 id, const QString &tagName=QString())
void SetAttribute(QDomElement &domElement, const QString &name, const T &value) const
SetAttribute set attribute in pattern file. Replace "," by ".".
void setIsLocked(bool isLocked)
const QString AttrPieceLocked