Seamly2D
Code documentation
RenameDraftBlock Class Reference

#include <rename_draftblock.h>

Inheritance diagram for RenameDraftBlock:
Collaboration diagram for RenameDraftBlock:

Public Member Functions

 RenameDraftBlock (VAbstractPattern *doc, const QString &newBlockName, QComboBox *combo, QUndoCommand *parent=nullptr)
 
virtual ~RenameDraftBlock () Q_DECL_OVERRIDE
 
virtual void undo () Q_DECL_OVERRIDE
 
virtual void redo () Q_DECL_OVERRIDE
 
virtual bool mergeWith (const QUndoCommand *command) Q_DECL_OVERRIDE
 
virtual int id () const Q_DECL_OVERRIDE
 
QString getNewName () const
 
QString getOldName () const
 
- Public Member Functions inherited from VUndoCommand
 VUndoCommand (const QDomElement &xml, VAbstractPattern *doc, QUndoCommand *parent=nullptr)
 
virtual ~VUndoCommand ()=default
 

Private Member Functions

void changeName (const QString &oldName, const QString &newName)
 

Private Attributes

QComboBox * m_combo
 
QString m_newBlockName
 
QString m_oldBlockName
 

Additional Inherited Members

- Signals inherited from VUndoCommand
void ClearScene ()
 
void NeedFullParsing ()
 
void NeedLiteParsing (const Document &parse)
 
- 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 rename_draftblock.h.

Constructor & Destructor Documentation

◆ RenameDraftBlock()

RenameDraftBlock::RenameDraftBlock ( VAbstractPattern doc,
const QString &  newBlockName,
QComboBox *  combo,
QUndoCommand *  parent = nullptr 
)

◆ ~RenameDraftBlock()

RenameDraftBlock::~RenameDraftBlock ( )
virtual

Definition at line 76 of file rename_draftblock.cpp.

Member Function Documentation

◆ changeName()

void RenameDraftBlock::changeName ( const QString &  oldName,
const QString &  newName 
)
private

Definition at line 118 of file rename_draftblock.cpp.

References VUndoCommand::doc, m_combo, and VAbstractPattern::renameDraftBlock().

Referenced by redo(), and undo().

◆ getNewName()

QString RenameDraftBlock::getNewName ( ) const
inline

Definition at line 86 of file rename_draftblock.h.

References m_newBlockName.

Referenced by mergeWith().

◆ getOldName()

QString RenameDraftBlock::getOldName ( ) const
inline

Definition at line 92 of file rename_draftblock.h.

References m_oldBlockName.

Referenced by mergeWith().

◆ id()

int RenameDraftBlock::id ( ) const
virtual

Definition at line 112 of file rename_draftblock.cpp.

References RenameDraftBlock.

◆ mergeWith()

bool RenameDraftBlock::mergeWith ( const QUndoCommand *  command)
virtual

Definition at line 96 of file rename_draftblock.cpp.

References getNewName(), getOldName(), m_newBlockName, and SCASSERT.

◆ redo()

void RenameDraftBlock::redo ( )
virtual

Definition at line 88 of file rename_draftblock.cpp.

References changeName(), m_newBlockName, and m_oldBlockName.

◆ undo()

void RenameDraftBlock::undo ( )
virtual

Definition at line 80 of file rename_draftblock.cpp.

References changeName(), m_newBlockName, and m_oldBlockName.

Member Data Documentation

◆ m_combo

QComboBox* RenameDraftBlock::m_combo
private

Definition at line 79 of file rename_draftblock.h.

Referenced by changeName(), and RenameDraftBlock().

◆ m_newBlockName

QString RenameDraftBlock::m_newBlockName
private

Definition at line 80 of file rename_draftblock.h.

Referenced by getNewName(), mergeWith(), redo(), and undo().

◆ m_oldBlockName

QString RenameDraftBlock::m_oldBlockName
private

Definition at line 81 of file rename_draftblock.h.

Referenced by getOldName(), redo(), RenameDraftBlock(), and undo().


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