Seamly2D
Code documentation
TogglePieceInLayout Class Reference

#include <togglepieceinlayout.h>

Inheritance diagram for TogglePieceInLayout:
Collaboration diagram for TogglePieceInLayout:

Signals

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

Public Member Functions

 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
 
virtual int id () const Q_DECL_OVERRIDE
 
quint32 getPieceId () const
 
bool getNewState () const
 
- Public Member Functions inherited from VUndoCommand
 VUndoCommand (const QDomElement &xml, VAbstractPattern *doc, QUndoCommand *parent=nullptr)
 
virtual ~VUndoCommand ()=default
 

Private Member Functions

void doCmd (bool state)
 

Private Attributes

quint32 m_id
 
VContainerm_data
 
bool m_oldState
 
bool m_newState
 

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 64 of file togglepieceinlayout.h.

Constructor & Destructor Documentation

◆ TogglePieceInLayout()

TogglePieceInLayout::TogglePieceInLayout ( quint32  id,
bool  state,
VContainer data,
VAbstractPattern doc,
QUndoCommand *  parent = nullptr 
)

Definition at line 71 of file togglepieceinlayout.cpp.

◆ ~TogglePieceInLayout()

TogglePieceInLayout::~TogglePieceInLayout ( )
virtual

Definition at line 83 of file togglepieceinlayout.cpp.

Member Function Documentation

◆ doCmd()

◆ getNewState()

bool TogglePieceInLayout::getNewState ( ) const

Definition at line 122 of file togglepieceinlayout.cpp.

References m_newState.

◆ getPieceId()

quint32 TogglePieceInLayout::getPieceId ( ) const

Definition at line 116 of file togglepieceinlayout.cpp.

References m_id.

◆ id()

int TogglePieceInLayout::id ( ) const
virtual

Definition at line 110 of file togglepieceinlayout.cpp.

References TogglePieceInLayout.

◆ redo()

void TogglePieceInLayout::redo ( )
virtual

Definition at line 99 of file togglepieceinlayout.cpp.

References doCmd(), m_newState, and m_oldState.

◆ undo()

void TogglePieceInLayout::undo ( )
virtual

Definition at line 88 of file togglepieceinlayout.cpp.

References doCmd(), m_newState, and m_oldState.

◆ updateList

void TogglePieceInLayout::updateList ( quint32  m_id)
signal

Member Data Documentation

◆ m_data

VContainer* TogglePieceInLayout::m_data
private

Definition at line 83 of file togglepieceinlayout.h.

Referenced by doCmd().

◆ m_id

quint32 TogglePieceInLayout::m_id
private

Definition at line 82 of file togglepieceinlayout.h.

Referenced by doCmd(), and getPieceId().

◆ m_newState

bool TogglePieceInLayout::m_newState
private

Definition at line 85 of file togglepieceinlayout.h.

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

◆ m_oldState

bool TogglePieceInLayout::m_oldState
private

Definition at line 84 of file togglepieceinlayout.h.

Referenced by redo(), and undo().


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