Seamly2D
Code documentation
MoveAbstractLabel Class Referenceabstract

#include <moveabstractlabel.h>

Inheritance diagram for MoveAbstractLabel:
Collaboration diagram for MoveAbstractLabel:

Public Member Functions

 MoveAbstractLabel (VAbstractPattern *doc, quint32 pointId, const QPointF &pos, QUndoCommand *parent=nullptr)
 
virtual ~MoveAbstractLabel ()=default
 
virtual void undo () Q_DECL_OVERRIDE
 
virtual void redo () Q_DECL_OVERRIDE
 
quint32 GetPointId () const
 
QPointF GetNewPos () const
 
- Public Member Functions inherited from VUndoCommand
 VUndoCommand (const QDomElement &xml, VAbstractPattern *doc, QUndoCommand *parent=nullptr)
 
virtual ~VUndoCommand ()=default
 

Protected Member Functions

virtual void Do (const QPointF &pos)=0
 
- 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

QPointF m_oldPos
 
QPointF m_newPos
 
- Protected Attributes inherited from VUndoCommand
QDomElement xml
 
VAbstractPatterndoc
 
quint32 nodeId
 
bool redoFlag
 

Additional Inherited Members

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

Detailed Description

Definition at line 65 of file moveabstractlabel.h.

Constructor & Destructor Documentation

◆ MoveAbstractLabel()

MoveAbstractLabel::MoveAbstractLabel ( VAbstractPattern doc,
quint32  pointId,
const QPointF &  pos,
QUndoCommand *  parent = nullptr 
)

Definition at line 62 of file moveabstractlabel.cpp.

References m_newPos, and VUndoCommand::nodeId.

◆ ~MoveAbstractLabel()

virtual MoveAbstractLabel::~MoveAbstractLabel ( )
virtualdefault

Member Function Documentation

◆ Do()

virtual void MoveAbstractLabel::Do ( const QPointF &  pos)
protectedpure virtual

Implemented in MoveOperationLabel, MoveLabel, and MoveDoubleLabel.

Referenced by redo(), and undo().

◆ GetNewPos()

QPointF MoveAbstractLabel::GetNewPos ( ) const
inline

◆ GetPointId()

quint32 MoveAbstractLabel::GetPointId ( ) const
inline

◆ redo()

void MoveAbstractLabel::redo ( )
virtual

Definition at line 81 of file moveabstractlabel.cpp.

References Do(), and m_newPos.

◆ undo()

void MoveAbstractLabel::undo ( )
virtual

Definition at line 73 of file moveabstractlabel.cpp.

References Do(), and m_oldPos.

Member Data Documentation

◆ m_newPos

QPointF MoveAbstractLabel::m_newPos
protected

◆ m_oldPos

QPointF MoveAbstractLabel::m_oldPos
protected

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