QElectroTech  0.8-dev
Public Member Functions | Private Member Functions | Private Attributes | List of all members
AddPartCommand Class Reference

#include <editorcommands.h>

Inheritance diagram for AddPartCommand:
Inheritance graph
Collaboration diagram for AddPartCommand:
Collaboration graph

Public Member Functions

 AddPartCommand (const QString &, ElementScene *, QGraphicsItem *, QUndoCommand *=nullptr)
 
 ~AddPartCommand () override
 Destructeur. More...
 
void undo () override
 Annule l'ajout. More...
 
void redo () override
 Refait l'ajout. More...
 
- Public Member Functions inherited from ElementEditionCommand
 ElementEditionCommand (ElementScene *=nullptr, ElementView *=nullptr, QUndoCommand *=nullptr)
 ElementEditionCommand::ElementEditionCommand Constructs an ElementEditionCommand, thus embedding the provided scene and view. More...
 
 ElementEditionCommand (const QString &, ElementScene *=nullptr, ElementView *=nullptr, QUndoCommand *=nullptr)
 ElementEditionCommand::ElementEditionCommand Constructs an ElementEditionCommand, thus embedding the provided scene and view. More...
 
 ~ElementEditionCommand () override
 
ElementSceneelementScene () const
 
void setElementScene (ElementScene *)
 
ElementViewelementView () const
 
void setElementView (ElementView *)
 

Private Member Functions

 AddPartCommand (const AddPartCommand &)
 

Private Attributes

QGraphicsItem * part
 Added primitive. More...
 
bool first_redo
 Prevent the first call to redo() 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 adds a primitive when editing an electrical element.

Constructor & Destructor Documentation

◆ AddPartCommand() [1/2]

AddPartCommand::AddPartCommand ( const QString &  name,
ElementScene scene,
QGraphicsItem *  p,
QUndoCommand *  parent = nullptr 
)

Constructeur

Parameters
nameNom de la partie ajoutee
sceneElementScene concernee
ppartie ajoutee
parentQUndoCommand parent

◆ ~AddPartCommand()

AddPartCommand::~AddPartCommand ( )
override

Destructeur.

◆ AddPartCommand() [2/2]

AddPartCommand::AddPartCommand ( const AddPartCommand )
private

Member Function Documentation

◆ redo()

void AddPartCommand::redo ( )
override

Refait l'ajout.

◆ undo()

void AddPartCommand::undo ( )
override

Annule l'ajout.

Member Data Documentation

◆ first_redo

bool AddPartCommand::first_redo
private

Prevent the first call to redo()

◆ part

QGraphicsItem* AddPartCommand::part
private

Added primitive.


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