QElectroTech
0.70
|
#include <editorcommands.h>
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 (const QString &, ElementScene *=nullptr, ElementView *=nullptr, QUndoCommand *=nullptr) | |
~ElementEditionCommand () override | |
ElementScene * | elementScene () const |
void | setElementScene (ElementScene *) |
ElementView * | elementView () 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 | |
ElementScene * | m_scene |
Element editor/view/scene the command should take place on. More... | |
ElementView * | m_view |
This command adds a primitive when editing an electrical element.
Definition at line 151 of file editorcommands.h.
AddPartCommand::AddPartCommand | ( | const QString & | name, |
ElementScene * | scene, | ||
QGraphicsItem * | p, | ||
QUndoCommand * | parent = nullptr |
||
) |
Constructeur
name | Nom de la partie ajoutee |
scene | ElementScene concernee |
p | partie ajoutee |
parent | QUndoCommand parent |
Definition at line 264 of file editorcommands.cpp.
References ElementEditionCommand::m_scene, and part.
|
override |
Destructeur.
Definition at line 278 of file editorcommands.cpp.
References ElementEditionCommand::m_scene, and part.
|
private |
|
override |
Refait l'ajout.
Definition at line 288 of file editorcommands.cpp.
References first_redo, ElementEditionCommand::m_scene, part, ElementScene::SelectedOrNot, and ElementScene::SortByZValue.
|
override |
Annule l'ajout.
Definition at line 283 of file editorcommands.cpp.
References ElementEditionCommand::m_scene, and part.
|
private |
Prevent the first call to redo()
Definition at line 169 of file editorcommands.h.
Referenced by redo().
|
private |
Added primitive.
Definition at line 167 of file editorcommands.h.
Referenced by AddPartCommand(), redo(), undo(), and ~AddPartCommand().