Seamly2D
Code documentation
MoveSpline Class Reference

#include <movespline.h>

Inheritance diagram for MoveSpline:
Collaboration diagram for MoveSpline:

Public Member Functions

 MoveSpline (VAbstractPattern *doc, const VSpline *oldSpl, const VSpline &newSpl, const quint32 &id, QUndoCommand *parent=nullptr)
 
virtual ~MoveSpline () 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
 
quint32 getSplineId () const
 
VSpline getNewSpline () const
 
- Public Member Functions inherited from VUndoCommand
 VUndoCommand (const QDomElement &xml, VAbstractPattern *doc, QUndoCommand *parent=nullptr)
 
virtual ~VUndoCommand ()=default
 

Private Member Functions

void Do (const VSpline &spl)
 

Private Attributes

VSpline oldSpline
 
VSpline newSpline
 
QGraphicsScene * scene
 

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 66 of file movespline.h.

Constructor & Destructor Documentation

◆ MoveSpline()

MoveSpline::MoveSpline ( VAbstractPattern doc,
const VSpline oldSpl,
const VSpline newSpl,
const quint32 &  id,
QUndoCommand *  parent = nullptr 
)

Definition at line 67 of file movespline.cpp.

References id(), VUndoCommand::nodeId, SCASSERT, and scene.

◆ ~MoveSpline()

MoveSpline::~MoveSpline ( )
virtual

Definition at line 81 of file movespline.cpp.

Member Function Documentation

◆ Do()

◆ getNewSpline()

VSpline MoveSpline::getNewSpline ( ) const
inline

Definition at line 94 of file movespline.h.

References newSpline.

Referenced by mergeWith().

◆ getSplineId()

quint32 MoveSpline::getSplineId ( ) const
inline

Definition at line 88 of file movespline.h.

References VUndoCommand::nodeId.

Referenced by mergeWith().

◆ id()

int MoveSpline::id ( ) const
virtual

Definition at line 119 of file movespline.cpp.

References MoveSpline.

Referenced by MoveSpline().

◆ mergeWith()

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

Definition at line 103 of file movespline.cpp.

References getNewSpline(), getSplineId(), newSpline, VUndoCommand::nodeId, and SCASSERT.

◆ redo()

void MoveSpline::redo ( )
virtual

Definition at line 94 of file movespline.cpp.

References Do(), VMainGraphicsView::NewSceneRect(), newSpline, qApp, and scene.

◆ undo()

void MoveSpline::undo ( )
virtual

Definition at line 85 of file movespline.cpp.

References Do(), VMainGraphicsView::NewSceneRect(), oldSpline, qApp, and scene.

Member Data Documentation

◆ newSpline

VSpline MoveSpline::newSpline
private

Definition at line 82 of file movespline.h.

Referenced by getNewSpline(), mergeWith(), and redo().

◆ oldSpline

VSpline MoveSpline::oldSpline
private

Definition at line 81 of file movespline.h.

Referenced by undo().

◆ scene

QGraphicsScene* MoveSpline::scene
private

Definition at line 83 of file movespline.h.

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


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