Seamly2D
Code documentation
SetPieceColor Class Reference

#include <set_piece_color.h>

Inheritance diagram for SetPieceColor:
Collaboration diagram for SetPieceColor:

Signals

void updateList (quint32 m_id)
 
- Signals inherited from VUndoCommand
void ClearScene ()
 
void NeedFullParsing ()
 
void NeedLiteParsing (const Document &parse)
 

Public Member Functions

 SetPieceColor (quint32 id, QString color, VContainer *data, VAbstractPattern *doc, QUndoCommand *parent=nullptr)
 
virtual ~SetPieceColor ()
 
virtual void undo () Q_DECL_OVERRIDE
 
virtual void redo () Q_DECL_OVERRIDE
 
virtual int id () const Q_DECL_OVERRIDE
 
quint32 getpieceId () const
 
QString getColor () const
 
- Public Member Functions inherited from VUndoCommand
 VUndoCommand (const QDomElement &xml, VAbstractPattern *doc, QUndoCommand *parent=nullptr)
 
virtual ~VUndoCommand ()=default
 

Private Member Functions

void doCmd (QString color)
 

Private Attributes

quint32 m_id
 
VContainerm_data
 
QString m_oldColor
 
QString m_newColor
 

Additional Inherited Members

- Protected Member Functions inherited from VUndoCommand
virtual void RedoFullParsing ()
 
void UndoDeleteAfterSibling (QDomNode &parentNode, const quint32 &siblingId) const
 
void IncrementReferences (const QVector< quint32 > &nodes) const
 
void DecrementReferences (const QVector< quint32 > &nodes) const
 
void IncrementReferences (const QVector< CustomSARecord > &nodes) const
 
void DecrementReferences (const QVector< CustomSARecord > &nodes) const
 
void IncrementReferences (const QVector< VPieceNode > &nodes) const
 
void DecrementReferences (const QVector< VPieceNode > &nodes) const
 
QDomElement getDestinationObject (quint32 idTool, quint32 idPoint) const
 
- Protected Attributes inherited from VUndoCommand
QDomElement xml
 
VAbstractPatterndoc
 
quint32 nodeId
 
bool redoFlag
 

Detailed Description

Definition at line 36 of file set_piece_color.h.

Constructor & Destructor Documentation

◆ SetPieceColor()

SetPieceColor::SetPieceColor ( quint32  id,
QString  color,
VContainer data,
VAbstractPattern doc,
QUndoCommand *  parent = nullptr 
)

Definition at line 43 of file set_piece_color.cpp.

◆ ~SetPieceColor()

SetPieceColor::~SetPieceColor ( )
virtual

Definition at line 54 of file set_piece_color.cpp.

Member Function Documentation

◆ doCmd()

◆ getColor()

QString SetPieceColor::getColor ( ) const

Definition at line 89 of file set_piece_color.cpp.

References m_newColor.

◆ getpieceId()

quint32 SetPieceColor::getpieceId ( ) const

Definition at line 83 of file set_piece_color.cpp.

References m_id.

◆ id()

int SetPieceColor::id ( ) const
virtual

Definition at line 77 of file set_piece_color.cpp.

References SetPieceColor.

◆ redo()

void SetPieceColor::redo ( )
virtual

Definition at line 68 of file set_piece_color.cpp.

References doCmd(), m_newColor, and m_oldColor.

◆ undo()

void SetPieceColor::undo ( )
virtual

Definition at line 59 of file set_piece_color.cpp.

References doCmd(), m_newColor, and m_oldColor.

◆ updateList

void SetPieceColor::updateList ( quint32  m_id)
signal

Member Data Documentation

◆ m_data

VContainer* SetPieceColor::m_data
private

Definition at line 55 of file set_piece_color.h.

Referenced by doCmd().

◆ m_id

quint32 SetPieceColor::m_id
private

Definition at line 54 of file set_piece_color.h.

Referenced by doCmd(), and getpieceId().

◆ m_newColor

QString SetPieceColor::m_newColor
private

Definition at line 57 of file set_piece_color.h.

Referenced by getColor(), redo(), and undo().

◆ m_oldColor

QString SetPieceColor::m_oldColor
private

Definition at line 56 of file set_piece_color.h.

Referenced by redo(), and undo().


The documentation for this class was generated from the following files: