Seamly2D
Code documentation
MoveSPoint Class Reference

#include <movespoint.h>

Inheritance diagram for MoveSPoint:
Collaboration diagram for MoveSPoint:

Public Member Functions

 MoveSPoint (VAbstractPattern *doc, const double &x, const double &y, const quint32 &id, QGraphicsScene *scene, QUndoCommand *parent=nullptr)
 
virtual ~MoveSPoint () 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 getSPointId () const
 
double getNewX () const
 
double getNewY () const
 
void Do (double x, double y)
 
- Public Member Functions inherited from VUndoCommand
 VUndoCommand (const QDomElement &xml, VAbstractPattern *doc, QUndoCommand *parent=nullptr)
 
virtual ~VUndoCommand ()=default
 

Private Attributes

double oldX
 
double oldY
 
double newX
 
double newY
 
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 65 of file movespoint.h.

Constructor & Destructor Documentation

◆ MoveSPoint()

MoveSPoint::MoveSPoint ( VAbstractPattern doc,
const double &  x,
const double &  y,
const quint32 &  id,
QGraphicsScene *  scene,
QUndoCommand *  parent = nullptr 
)

◆ ~MoveSPoint()

MoveSPoint::~MoveSPoint ( )
virtual

Definition at line 93 of file movespoint.cpp.

Member Function Documentation

◆ Do()

◆ getNewX()

double MoveSPoint::getNewX ( ) const
inline

Definition at line 96 of file movespoint.h.

References newX.

Referenced by mergeWith().

◆ getNewY()

double MoveSPoint::getNewY ( ) const
inline

Definition at line 102 of file movespoint.h.

References newY.

Referenced by mergeWith().

◆ getSPointId()

quint32 MoveSPoint::getSPointId ( ) const
inline

Definition at line 90 of file movespoint.h.

References VUndoCommand::nodeId.

Referenced by mergeWith().

◆ id()

int MoveSPoint::id ( ) const
virtual

Definition at line 135 of file movespoint.cpp.

References MoveSPoint.

Referenced by MoveSPoint().

◆ mergeWith()

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

Definition at line 113 of file movespoint.cpp.

References getNewX(), getNewY(), getSPointId(), newX, newY, VUndoCommand::nodeId, and SCASSERT.

◆ redo()

void MoveSPoint::redo ( )
virtual

Definition at line 105 of file movespoint.cpp.

References Do(), newX, and newY.

◆ undo()

void MoveSPoint::undo ( )
virtual

Definition at line 97 of file movespoint.cpp.

References Do(), oldX, and oldY.

Member Data Documentation

◆ newX

double MoveSPoint::newX
private

Definition at line 84 of file movespoint.h.

Referenced by getNewX(), mergeWith(), MoveSPoint(), and redo().

◆ newY

double MoveSPoint::newY
private

Definition at line 85 of file movespoint.h.

Referenced by getNewY(), mergeWith(), MoveSPoint(), and redo().

◆ oldX

double MoveSPoint::oldX
private

Definition at line 82 of file movespoint.h.

Referenced by MoveSPoint(), and undo().

◆ oldY

double MoveSPoint::oldY
private

Definition at line 83 of file movespoint.h.

Referenced by MoveSPoint(), and undo().

◆ scene

QGraphicsScene* MoveSPoint::scene
private

Definition at line 86 of file movespoint.h.

Referenced by MoveSPoint().


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