All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
te::layout::MoveCommand Class Reference

Undo/Redo for moving components. More...

#include <MoveCommand.h>

Inheritance diagram for te::layout::MoveCommand:

Public Member Functions

 MoveCommand (QGraphicsItem *item, const QPointF oldPos, QUndoCommand *parent=0)
 Constructor. More...
 
 MoveCommand (std::map< QGraphicsItem *, QPointF > items, QUndoCommand *parent=0)
 Constructor. More...
 
virtual void redo ()
 Reimplemented from QUndoCommand. More...
 
virtual void undo ()
 Reimplemented from QUndoCommand. More...
 
virtual ~MoveCommand ()
 Destructor. More...
 

Protected Member Functions

virtual QString createCommandString (QGraphicsItem *item, const QPointF &pos)
 

Protected Attributes

QGraphicsItem * m_item
 
QList< QPointF > m_itemsPoints
 
std::map< QGraphicsItem
*, QPointF > 
m_moveItems
 
QPointF m_newPos
 
QPointF m_oldPos
 

Detailed Description

Undo/Redo for moving components.

Definition at line 54 of file MoveCommand.h.

Constructor & Destructor Documentation

te::layout::MoveCommand::MoveCommand ( QGraphicsItem *  item,
const QPointF  oldPos,
QUndoCommand *  parent = 0 
)

Constructor.

Parameters
item
oldPos
parent

Definition at line 39 of file MoveCommand.cpp.

References m_item, m_newPos, and m_oldPos.

te::layout::MoveCommand::MoveCommand ( std::map< QGraphicsItem *, QPointF >  items,
QUndoCommand *  parent = 0 
)

Constructor.

Parameters
items
parent

Definition at line 48 of file MoveCommand.cpp.

References m_itemsPoints, and m_moveItems.

te::layout::MoveCommand::~MoveCommand ( )
virtual

Destructor.

Definition at line 63 of file MoveCommand.cpp.

Member Function Documentation

QString te::layout::MoveCommand::createCommandString ( QGraphicsItem *  item,
const QPointF &  pos 
)
protectedvirtual
void te::layout::MoveCommand::redo ( )
virtual
void te::layout::MoveCommand::undo ( )
virtual

Reimplemented from QUndoCommand.

Definition at line 68 of file MoveCommand.cpp.

References te::common::Singleton< Context >::getInstance(), and te::layout::Context::getScene().

Member Data Documentation

QGraphicsItem* te::layout::MoveCommand::m_item
protected

Definition at line 95 of file MoveCommand.h.

Referenced by MoveCommand().

QList<QPointF> te::layout::MoveCommand::m_itemsPoints
protected

Definition at line 99 of file MoveCommand.h.

Referenced by MoveCommand().

std::map<QGraphicsItem*, QPointF> te::layout::MoveCommand::m_moveItems
protected

Definition at line 98 of file MoveCommand.h.

Referenced by MoveCommand().

QPointF te::layout::MoveCommand::m_newPos
protected

Definition at line 97 of file MoveCommand.h.

Referenced by MoveCommand().

QPointF te::layout::MoveCommand::m_oldPos
protected

Definition at line 96 of file MoveCommand.h.

Referenced by MoveCommand().


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