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"
47 , m_oldColor(m_data->DataPieces()->value(m_id).getColor())
50 setText(tr(
"Change piece color"));
98 if (element.isElement())
110 window->
ShowToolTip(tr(
"Piece color changed: ") + color);
virtual int id() const Q_DECL_OVERRIDE
void updateList(quint32 m_id)
virtual void undo() Q_DECL_OVERRIDE
quint32 getpieceId() const
virtual void redo() Q_DECL_OVERRIDE
SetPieceColor(quint32 id, QString color, VContainer *data, VAbstractPattern *doc, QUndoCommand *parent=nullptr)
void doCmd(QString color)
virtual void ShowToolTip(const QString &toolTip)=0
static const QString TagPiece
void setColor(const QString &value)
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 ".".