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

Undo/Redo for changes in component properties. More...

#include <ChangePropertyCommand.h>

Inheritance diagram for te::layout::ChangePropertyCommand:

Public Member Functions

 ChangePropertyCommand (QGraphicsItem *item, Properties *oldProperties, Properties *newProperties, PropertiesOutside *outside=0, QUndoCommand *parent=0)
 Constructor. More...
 
 ChangePropertyCommand (std::vector< QGraphicsItem * > items, std::vector< Properties * > allOld, std::vector< Properties * > allNew, PropertiesOutside *outside=0, QUndoCommand *parent=0)
 Constructor. More...
 
virtual void redo ()
 Reimplemented from QUndoCommand. More...
 
virtual void undo ()
 Reimplemented from QUndoCommand. More...
 
virtual ~ChangePropertyCommand ()
 Destructor. Delete all properties. More...
 

Protected Member Functions

virtual bool checkItem (QGraphicsItem *item, Properties *props)
 
virtual bool checkVectors ()
 
virtual QString createCommandString (QGraphicsItem *item)
 
virtual bool equals (Properties *props1, Properties *props2)
 

Protected Attributes

std::vector< Properties * > m_allNewProperties
 
std::vector< Properties * > m_allOldProperties
 
QGraphicsItem * m_item
 
std::vector< QGraphicsItem * > m_items
 
Propertiesm_newProperties
 
Propertiesm_oldProperties
 
PropertiesOutsidem_outside
 

Detailed Description

Undo/Redo for changes in component properties.

Definition at line 54 of file ChangePropertyCommand.h.

Constructor & Destructor Documentation

te::layout::ChangePropertyCommand::ChangePropertyCommand ( QGraphicsItem *  item,
Properties oldProperties,
Properties newProperties,
PropertiesOutside outside = 0,
QUndoCommand *  parent = 0 
)

Constructor.

Parameters
item
oldProperties
newProperties
outside
parent

Definition at line 40 of file ChangePropertyCommand.cpp.

te::layout::ChangePropertyCommand::ChangePropertyCommand ( std::vector< QGraphicsItem * >  items,
std::vector< Properties * >  allOld,
std::vector< Properties * >  allNew,
PropertiesOutside outside = 0,
QUndoCommand *  parent = 0 
)

Constructor.

Parameters
items
oldProperties
newProperties
outside
parent

Definition at line 51 of file ChangePropertyCommand.cpp.

te::layout::ChangePropertyCommand::~ChangePropertyCommand ( )
virtual

Destructor. Delete all properties.

Definition at line 65 of file ChangePropertyCommand.cpp.

References te::layout::Properties::clear().

Member Function Documentation

bool te::layout::ChangePropertyCommand::checkItem ( QGraphicsItem *  item,
Properties props 
)
protectedvirtual
bool te::layout::ChangePropertyCommand::checkVectors ( )
protectedvirtual

Definition at line 263 of file ChangePropertyCommand.cpp.

QString te::layout::ChangePropertyCommand::createCommandString ( QGraphicsItem *  item)
protectedvirtual
bool te::layout::ChangePropertyCommand::equals ( Properties props1,
Properties props2 
)
protectedvirtual
void te::layout::ChangePropertyCommand::redo ( )
virtual

Reimplemented from QUndoCommand.

Definition at line 150 of file ChangePropertyCommand.cpp.

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

Reimplemented from QUndoCommand.

Definition at line 116 of file ChangePropertyCommand.cpp.

Member Data Documentation

std::vector<Properties*> te::layout::ChangePropertyCommand::m_allNewProperties
protected

Definition at line 113 of file ChangePropertyCommand.h.

std::vector<Properties*> te::layout::ChangePropertyCommand::m_allOldProperties
protected

Definition at line 112 of file ChangePropertyCommand.h.

QGraphicsItem* te::layout::ChangePropertyCommand::m_item
protected

Definition at line 107 of file ChangePropertyCommand.h.

std::vector<QGraphicsItem*> te::layout::ChangePropertyCommand::m_items
protected

Definition at line 111 of file ChangePropertyCommand.h.

Properties* te::layout::ChangePropertyCommand::m_newProperties
protected

Definition at line 109 of file ChangePropertyCommand.h.

Properties* te::layout::ChangePropertyCommand::m_oldProperties
protected

Definition at line 108 of file ChangePropertyCommand.h.

PropertiesOutside* te::layout::ChangePropertyCommand::m_outside
protected

Definition at line 110 of file ChangePropertyCommand.h.


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