QElectroTech  0.70
Public Member Functions | Private Member Functions | Private Attributes | List of all members
DeletePartsCommand Class Reference

#include <editorcommands.h>

Public Member Functions

 DeletePartsCommand (ElementScene *, const QList< QGraphicsItem *> &, QUndoCommand *=nullptr)
 
 ~DeletePartsCommand () override
 Destructeur : detruit egalement les parties supprimees. More...
 
void undo () override
 Restaure les parties supprimees. More...
 
void redo () override
 Supprime les parties. More...
 
- Public Member Functions inherited from ElementEditionCommand
 ElementEditionCommand (ElementScene *=nullptr, ElementView *=nullptr, QUndoCommand *=nullptr)
 
 ElementEditionCommand (const QString &, ElementScene *=nullptr, ElementView *=nullptr, QUndoCommand *=nullptr)
 
 ~ElementEditionCommand () override
 
ElementSceneelementScene () const
 
void setElementScene (ElementScene *)
 
ElementViewelementView () const
 
void setElementView (ElementView *)
 

Private Member Functions

 DeletePartsCommand (const DeletePartsCommand &)
 

Private Attributes

QList< QGraphicsItem * > deleted_parts
 Deleted primitives. More...
 

Additional Inherited Members

- Protected Attributes inherited from ElementEditionCommand
ElementScenem_scene
 Element editor/view/scene the command should take place on. More...
 
ElementViewm_view
 

Detailed Description

This command deletes one or several primitives/parts when editing an electrical element.

Definition at line 60 of file editorcommands.h.

Constructor & Destructor Documentation

◆ DeletePartsCommand() [1/2]

DeletePartsCommand::DeletePartsCommand ( ElementScene scene,
const QList< QGraphicsItem *> &  parts,
QUndoCommand *  parent = nullptr 
)

Constructeur

Parameters
sceneElementScene concernee
partsListe des parties supprimees
parentQUndoCommand parent

Definition at line 84 of file editorcommands.cpp.

References deleted_parts, and ElementEditionCommand::m_scene.

◆ ~DeletePartsCommand()

DeletePartsCommand::~DeletePartsCommand ( )
override

Destructeur : detruit egalement les parties supprimees.

Definition at line 98 of file editorcommands.cpp.

References deleted_parts, and ElementEditionCommand::m_scene.

◆ DeletePartsCommand() [2/2]

DeletePartsCommand::DeletePartsCommand ( const DeletePartsCommand )
private

Member Function Documentation

◆ redo()

void DeletePartsCommand::redo ( )
override

Supprime les parties.

Definition at line 114 of file editorcommands.cpp.

References deleted_parts, and ElementEditionCommand::m_scene.

◆ undo()

void DeletePartsCommand::undo ( )
override

Restaure les parties supprimees.

Definition at line 105 of file editorcommands.cpp.

References deleted_parts, and ElementEditionCommand::m_scene.

Member Data Documentation

◆ deleted_parts

QList<QGraphicsItem *> DeletePartsCommand::deleted_parts
private

Deleted primitives.

Definition at line 76 of file editorcommands.h.

Referenced by DeletePartsCommand(), redo(), undo(), and ~DeletePartsCommand().


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