55 #include <QDomElement>
57 #include <QMessageLogger>
61 #include "../ifc/ifcdef.h"
62 #include "../ifc/xml/vabstractpattern.h"
63 #include "../vmisc/vabstractapplication.h"
64 #include "../vmisc/def.h"
65 #include "../vmisc/logging.h"
66 #include "../vpatterndb/vcontainer.h"
67 #include "../vpatterndb/vpiece.h"
68 #include "../vwidgets/vabstractmainwindow.h"
79 setText(tr(
"Piece in Layout List"));
90 qCDebug(vUndo,
"TogglePieceInLayout::undo().");
101 qCDebug(vUndo,
"TogglePieceInLayout::redo().");
131 if (element.isElement())
142 window->
ShowToolTip(tr(
"Include piece in layout changed: ") + (state ? tr(
"Include") : tr(
"Exclude")));
146 qDebug(
"Can't get piece by id = %u.",
m_id);
TogglePieceInLayout(quint32 id, bool state, VContainer *data, VAbstractPattern *doc, QUndoCommand *parent=nullptr)
virtual ~TogglePieceInLayout()
virtual void undo() Q_DECL_OVERRIDE
virtual void redo() Q_DECL_OVERRIDE
quint32 getPieceId() const
virtual int id() const Q_DECL_OVERRIDE
void updateList(quint32 m_id)
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 SetInLayout(bool inLayout)
const QString AttrInLayout