QElectroTech
0.70
|
#include <editorcommands.h>
Public Member Functions | |
MovePartsCommand (const QPointF &, ElementScene *, const QList< QGraphicsItem *> &, QUndoCommand *=nullptr) | |
~MovePartsCommand () override | |
Destructeur. More... | |
void | undo () override |
Annule le deplacement. More... | |
void | redo () override |
Refait le deplacement. 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 | |
MovePartsCommand (const MovePartsCommand &) | |
Private Attributes | |
QList< QGraphicsItem * > | moved_parts |
List of moved primitives. More... | |
QPointF | movement |
applied movement 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 moves primitives when editing an electrical element.
Definition at line 125 of file editorcommands.h.
MovePartsCommand::MovePartsCommand | ( | const QPointF & | m, |
ElementScene * | scene, | ||
const QList< QGraphicsItem *> & | parts, | ||
QUndoCommand * | parent = nullptr |
||
) |
Constructeur
m | Mouvement sous forme de QPointF |
scene | ElementScene concernee |
parts | Liste des parties deplacees |
parent | QUndoCommand parent |
Definition at line 224 of file editorcommands.cpp.
References moved_parts.
|
override |
Destructeur.
Definition at line 238 of file editorcommands.cpp.
|
private |
|
override |
Refait le deplacement.
Definition at line 247 of file editorcommands.cpp.
References first_redo, moved_parts, and movement.
|
override |
Annule le deplacement.
Definition at line 242 of file editorcommands.cpp.
References moved_parts, and movement.
|
private |
Prevent the first call to redo()
Definition at line 145 of file editorcommands.h.
Referenced by redo().
|
private |
List of moved primitives.
Definition at line 141 of file editorcommands.h.
Referenced by MovePartsCommand(), redo(), and undo().
|
private |