QElectroTech
0.70
|
The ElementEditionCommand class ElementEditionCommand is the base class for all commands classes involved in the edition of an electrical element. It provides commonly required methods and attributes, such as accessors to the modified scene and view. More...
#include <editorcommands.h>
Public Member Functions | |
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 *) |
Protected Attributes | |
ElementScene * | m_scene |
Element editor/view/scene the command should take place on. More... | |
ElementView * | m_view |
Private Member Functions | |
ElementEditionCommand (const ElementEditionCommand &) | |
The ElementEditionCommand class ElementEditionCommand is the base class for all commands classes involved in the edition of an electrical element. It provides commonly required methods and attributes, such as accessors to the modified scene and view.
Definition at line 32 of file editorcommands.h.
ElementEditionCommand::ElementEditionCommand | ( | ElementScene * | scene = nullptr , |
ElementView * | view = nullptr , |
||
QUndoCommand * | parent = nullptr |
||
) |
Constructs an ElementEditionCommand, thus embedding the provided scene and view.
parent | Parent command |
Definition at line 24 of file editorcommands.cpp.
ElementEditionCommand::ElementEditionCommand | ( | const QString & | text, |
ElementScene * | scene = nullptr , |
||
ElementView * | view = nullptr , |
||
QUndoCommand * | parent = nullptr |
||
) |
Constructs an ElementEditionCommand, thus embedding the provided scene and view.
text | Text describing the effect of the command |
parent | Parent command |
Definition at line 36 of file editorcommands.cpp.
|
override |
Destructor
Definition at line 46 of file editorcommands.cpp.
|
private |
ElementScene * ElementEditionCommand::elementScene | ( | ) | const |
Definition at line 52 of file editorcommands.cpp.
References m_scene.
ElementView * ElementEditionCommand::elementView | ( | ) | const |
Definition at line 66 of file editorcommands.cpp.
References m_view.
void ElementEditionCommand::setElementScene | ( | ElementScene * | scene | ) |
Define scene as the element editor/scene the command should take place
Definition at line 59 of file editorcommands.cpp.
References m_scene.
void ElementEditionCommand::setElementView | ( | ElementView * | view | ) |
Define view as the view the effect of the command should be rendered on
Definition at line 73 of file editorcommands.cpp.
References m_view.
|
protected |
Element editor/view/scene the command should take place on.
Definition at line 52 of file editorcommands.h.
Referenced by AddPartCommand::AddPartCommand(), ChangeZValueCommand::ChangeZValueCommand(), DeletePartsCommand::DeletePartsCommand(), elementScene(), ScalePartsCommand::elementScene(), PastePartsCommand::PastePartsCommand(), DeletePartsCommand::redo(), PastePartsCommand::redo(), AddPartCommand::redo(), ChangeNamesCommand::redo(), ChangeInformationsCommand::redo(), ChangePropertiesCommand::redo(), setElementScene(), DeletePartsCommand::undo(), PastePartsCommand::undo(), AddPartCommand::undo(), ChangeNamesCommand::undo(), ChangeInformationsCommand::undo(), ChangePropertiesCommand::undo(), AddPartCommand::~AddPartCommand(), DeletePartsCommand::~DeletePartsCommand(), and PastePartsCommand::~PastePartsCommand().
|
protected |
Definition at line 53 of file editorcommands.h.
Referenced by elementView(), PastePartsCommand::redo(), setElementView(), and PastePartsCommand::undo().