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

Undo/Redo for add one components. More...

#include <AddCommand.h>

Inheritance diagram for te::layout::AddCommand:

Public Member Functions

 AddCommand (QGraphicsItem *item, QUndoCommand *parent=0)
 Constructor. More...
 
virtual void redo ()
 Reimplemented from QUndoCommand. More...
 
virtual void undo ()
 Reimplemented from QUndoCommand. More...
 
virtual ~AddCommand ()
 Destructor. More...
 

Protected Member Functions

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

Protected Attributes

QPointF m_initialPosition
 
QGraphicsItem * m_item
 
QGraphicsScene * m_scene
 

Detailed Description

Undo/Redo for add one components.

Definition at line 51 of file AddCommand.h.

Constructor & Destructor Documentation

te::layout::AddCommand::AddCommand ( QGraphicsItem *  item,
QUndoCommand *  parent = 0 
)

Constructor.

Parameters
item
parent

Definition at line 39 of file AddCommand.cpp.

References createCommandString(), m_initialPosition, m_item, and m_scene.

te::layout::AddCommand::~AddCommand ( )
virtual

Destructor.

Definition at line 53 of file AddCommand.cpp.

Member Function Documentation

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

Reimplemented from QUndoCommand.

Definition at line 70 of file AddCommand.cpp.

References te::layout::Scene::insertItem(), and te::layout::Scene::removeItemStackWithoutScene().

void te::layout::AddCommand::undo ( )
virtual

Reimplemented from QUndoCommand.

Definition at line 58 of file AddCommand.cpp.

References te::layout::Scene::addItemStackWithoutScene().

Member Data Documentation

QPointF te::layout::AddCommand::m_initialPosition
protected

Definition at line 84 of file AddCommand.h.

Referenced by AddCommand().

QGraphicsItem* te::layout::AddCommand::m_item
protected

Definition at line 83 of file AddCommand.h.

Referenced by AddCommand().

QGraphicsScene* te::layout::AddCommand::m_scene
protected

Definition at line 82 of file AddCommand.h.

Referenced by AddCommand().


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