QElectroTech
0.70
|
#include <diagramcommands.h>
Public Member Functions | |
ChangeConductorCommand (Conductor *, const ConductorProfile &, const ConductorProfile &, Qt::Corner, QUndoCommand *=nullptr) | |
~ChangeConductorCommand () override | |
Destructeur. More... | |
void | undo () override |
Annule la modification du conducteur. More... | |
void | redo () override |
Refait la modification du conducteur. More... | |
virtual void | setConductorTextItemMove (const QPointF &, const QPointF &) |
Private Member Functions | |
ChangeConductorCommand (const ChangeConductorCommand &) | |
Private Attributes | |
Conductor * | conductor |
changed conductor More... | |
ConductorProfile | old_profile |
profile before the change More... | |
ConductorProfile | new_profile |
profile after the change More... | |
Qt::Corner | path_type |
Path type of the modified conductor. More... | |
QPointF | text_pos_before_mov_ |
position of the text item before the change More... | |
QPointF | text_pos_after_mov_ |
position of the text item after the change More... | |
bool | first_redo |
prevent the first call to redo() More... | |
Diagram * | diagram |
This command changes a particular conductor.
Definition at line 219 of file diagramcommands.h.
ChangeConductorCommand::ChangeConductorCommand | ( | Conductor * | c, |
const ConductorProfile & | old_p, | ||
const ConductorProfile & | new_p, | ||
Qt::Corner | path_t, | ||
QUndoCommand * | parent = nullptr |
||
) |
Constructeur
c | Conducteur modifie |
old_p | ancien profil du conducteur |
new_p | nouveau profil du conducteur |
path_t | Trajectoire du trajet modifie |
parent | QUndoCommand parent |
Definition at line 429 of file diagramcommands.cpp.
|
override |
Destructeur.
Definition at line 447 of file diagramcommands.cpp.
|
private |
|
override |
Refait la modification du conducteur.
Definition at line 458 of file diagramcommands.cpp.
References conductor, diagram, first_redo, new_profile, path_type, and text_pos_after_mov_.
|
virtual |
Integre dans cet objet d'annulation le repositionnement du champ de texte du conducteur
pos_before | Position du texte avant la modification du conducteur |
pos_after | Position du texte apres la modification du conducteur |
Definition at line 474 of file diagramcommands.cpp.
References text_pos_after_mov_, and text_pos_before_mov_.
|
override |
Annule la modification du conducteur.
Definition at line 451 of file diagramcommands.cpp.
References conductor, diagram, old_profile, path_type, and text_pos_before_mov_.
|
private |
changed conductor
Definition at line 236 of file diagramcommands.h.
|
private |
Definition at line 249 of file diagramcommands.h.
|
private |
prevent the first call to redo()
Definition at line 248 of file diagramcommands.h.
Referenced by redo().
|
private |
|
private |
|
private |
Path type of the modified conductor.
Definition at line 242 of file diagramcommands.h.
|
private |
position of the text item after the change
Definition at line 246 of file diagramcommands.h.
Referenced by redo(), and setConductorTextItemMove().
|
private |
position of the text item before the change
Definition at line 244 of file diagramcommands.h.
Referenced by setConductorTextItemMove(), and undo().