Seamly2D
Code documentation
MoveSplinePath Class Reference

#include <movesplinepath.h>

Inheritance diagram for MoveSplinePath:
Collaboration diagram for MoveSplinePath:

Public Member Functions

 MoveSplinePath (VAbstractPattern *doc, const VSplinePath &oldSplPath, const VSplinePath &newSplPath, const quint32 &id, QUndoCommand *parent=nullptr)
 
virtual ~MoveSplinePath () 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 getSplinePathId () const
 
VSplinePath getNewSplinePath () 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 VSplinePath &splPath)
 

Private Attributes

VSplinePath oldSplinePath
 
VSplinePath newSplinePath
 
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 movesplinepath.h.

Constructor & Destructor Documentation

◆ MoveSplinePath()

MoveSplinePath::MoveSplinePath ( VAbstractPattern doc,
const VSplinePath oldSplPath,
const VSplinePath newSplPath,
const quint32 &  id,
QUndoCommand *  parent = nullptr 
)

Definition at line 66 of file movesplinepath.cpp.

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

◆ ~MoveSplinePath()

MoveSplinePath::~MoveSplinePath ( )
virtual

Definition at line 80 of file movesplinepath.cpp.

Member Function Documentation

◆ Do()

◆ getNewSplinePath()

VSplinePath MoveSplinePath::getNewSplinePath ( ) const
inline

Definition at line 94 of file movesplinepath.h.

References newSplinePath.

Referenced by mergeWith().

◆ getSplinePathId()

quint32 MoveSplinePath::getSplinePathId ( ) const
inline

Definition at line 88 of file movesplinepath.h.

References VUndoCommand::nodeId.

Referenced by mergeWith().

◆ id()

int MoveSplinePath::id ( ) const
virtual

Definition at line 118 of file movesplinepath.cpp.

References MoveSplinePath.

Referenced by MoveSplinePath().

◆ mergeWith()

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

◆ redo()

void MoveSplinePath::redo ( )
virtual

Definition at line 93 of file movesplinepath.cpp.

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

◆ undo()

void MoveSplinePath::undo ( )
virtual

Definition at line 84 of file movesplinepath.cpp.

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

Member Data Documentation

◆ newSplinePath

VSplinePath MoveSplinePath::newSplinePath
private

Definition at line 82 of file movesplinepath.h.

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

◆ oldSplinePath

VSplinePath MoveSplinePath::oldSplinePath
private

Definition at line 81 of file movesplinepath.h.

Referenced by undo().

◆ scene

QGraphicsScene* MoveSplinePath::scene
private

Definition at line 83 of file movesplinepath.h.

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


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