18#ifndef DIAGRAM_COMMANDS_H
19#define DIAGRAM_COMMANDS_H
36 QUndoCommand * =
nullptr);
66 QUndoCommand * =
nullptr);
115 const QString &before,
116 const QString &after,
117 QUndoCommand * =
nullptr);
124 void undo()
override;
125 void redo()
override;
149 QUndoCommand * =
nullptr);
156 void undo()
override;
157 void redo()
override;
188 QUndoCommand * =
nullptr);
195 void undo()
override;
196 void redo()
override;
222 void undo()
override;
223 void redo()
override;
The BorderProperties class This class is a container for dimensions and display properties of a diagr...
Definition borderproperties.h:29
The ChangeBorderCommand class This command changes the border properties of a particular diagram.
Definition diagramcommands.h:211
Diagram * diagram
modified diagram
Definition diagramcommands.h:228
void redo() override
ChangeBorderCommand::redo Refait les changements apportes au schema.
Definition diagramcommands.cpp:473
void undo() override
ChangeBorderCommand::undo Annule les changements apportes au schema.
Definition diagramcommands.cpp:463
ChangeBorderCommand(const ChangeBorderCommand &)
~ChangeBorderCommand() override
ChangeBorderCommand::~ChangeBorderCommand Destructeur.
Definition diagramcommands.cpp:455
BorderProperties old_properties
properties before the change
Definition diagramcommands.h:231
BorderProperties new_properties
properties after the change
Definition diagramcommands.h:233
The ChangeConductorCommand class This command changes a particular conductor.
Definition diagramcommands.h:144
bool first_redo
prevent the first call to redo()
Definition diagramcommands.h:175
Qt::Corner path_type
Path type of the modified conductor.
Definition diagramcommands.h:169
Diagram * diagram
Definition diagramcommands.h:176
Conductor * conductor
changed conductor
Definition diagramcommands.h:163
void undo() override
ChangeConductorCommand::undo Annule la modification du conducteur.
Definition diagramcommands.cpp:344
QPointF text_pos_after_mov_
position of the text item after the change
Definition diagramcommands.h:173
ChangeConductorCommand(const ChangeConductorCommand &)
~ChangeConductorCommand() override
ChangeConductorCommand::~ChangeConductorCommand Destructeur.
Definition diagramcommands.cpp:336
ConductorProfile old_profile
profile before the change
Definition diagramcommands.h:165
void redo() override
ChangeConductorCommand::redo Refait la modification du conducteur.
Definition diagramcommands.cpp:355
ConductorProfile new_profile
profile after the change
Definition diagramcommands.h:167
virtual void setConductorTextItemMove(const QPointF &, const QPointF &)
ChangeConductorCommand::setConductorTextItemMove Integre dans cet objet d'annulation le repositionnem...
Definition diagramcommands.cpp:373
QPointF text_pos_before_mov_
position of the text item before the change
Definition diagramcommands.h:171
The ChangeDiagramTextCommand class This command modifies a text item.
Definition diagramcommands.h:111
ChangeDiagramTextCommand(const ChangeDiagramTextCommand &)
QString text_before
former text
Definition diagramcommands.h:132
void redo() override
ChangeDiagramTextCommand::redo.
Definition diagramcommands.cpp:300
QString text_after
new text
Definition diagramcommands.h:134
void undo() override
ChangeDiagramTextCommand::undo annule la modification de texte.
Definition diagramcommands.cpp:291
Diagram * diagram
Definition diagramcommands.h:137
~ChangeDiagramTextCommand() override
ChangeDiagramTextCommand::~ChangeDiagramTextCommand destructeur.
Definition diagramcommands.cpp:283
bool first_redo
prevent the first call to redo()
Definition diagramcommands.h:136
DiagramTextItem * text_item
modified text item
Definition diagramcommands.h:130
Definition conductor.h:43
Definition conductorprofile.h:28
Definition conductortextitem.h:30
The CutDiagramCommand class This command cuts content from a particular diagram.
Definition diagramcommands.h:62
~CutDiagramCommand() override
CutDiagramCommand::~CutDiagramCommand Destructeur.
Definition diagramcommands.cpp:147
CutDiagramCommand(const CutDiagramCommand &)
Definition deleteqgraphicsitemcommand.h:33
Definition diagramcontent.h:47
The Diagram class This class represents an electric diagram. It manages its various child elements,...
Definition diagram.h:56
Definition diagramtextitem.h:34
The MoveConductorsTextsCommand class This command moves text items related to conductors on a particu...
Definition diagramcommands.h:77
void redo() override
MoveConductorsTextsCommand::redo refait le deplacement.
Definition diagramcommands.cpp:197
QHash< ConductorTextItem *, QPair< QPointF, bool > > texts_to_move_
text items to be moved
Definition diagramcommands.h:102
bool first_redo
prevent the first call to redo()
Definition diagramcommands.h:104
Diagram * diagram
diagram the movement takes place on.
Definition diagramcommands.h:100
void regenerateTextLabel()
MoveConductorsTextsCommand::regenerateTextLabel Genere la description de l'objet d'annulation.
Definition diagramcommands.cpp:242
MoveConductorsTextsCommand(const MoveConductorsTextsCommand &)
void undo() override
MoveConductorsTextsCommand::undo annule le deplacement.
Definition diagramcommands.cpp:179
virtual void addTextMovement(ConductorTextItem *, const QPointF &, const QPointF &, bool=false)
MoveConductorsTextsCommand::addTextMovement Ajout un mouvement de champ de texte a cet objet.
Definition diagramcommands.cpp:223
~MoveConductorsTextsCommand() override
MoveConductorsTextsCommand::~MoveConductorsTextsCommand Destructeur.
Definition diagramcommands.cpp:171
The PasteDiagramCommand class This command pastes some content onto a particular diagram.
Definition diagramcommands.h:32
void redo() override
PasteDiagramCommand::redo Redo this command.
Definition diagramcommands.cpp:69
DiagramContent content
pasted content
Definition diagramcommands.h:49
void undo() override
PasteDiagramCommand::undo Undo this command.
Definition diagramcommands.cpp:57
bool first_redo
prevent the first call to redo()
Definition diagramcommands.h:55
int filter
filter stating what kinds of items should be pasted
Definition diagramcommands.h:53
PasteDiagramCommand(const PasteDiagramCommand &)
~PasteDiagramCommand() override
PasteDiagramCommand::~PasteDiagramCommand Destructor.
Definition diagramcommands.cpp:48
Diagram * diagram
diagram content is pasted onto
Definition diagramcommands.h:51
The ResetConductorCommand class This command resets conductor paths.
Definition diagramcommands.h:183
QHash< Conductor *, ConductorProfilesGroup > conductors_profiles
impacted conductors along with their former profiles
Definition diagramcommands.h:201
Diagram * diagram
Definition diagramcommands.h:202
ResetConductorCommand(const ResetConductorCommand &)
~ResetConductorCommand() override
ResetConductorCommand::~ResetConductorCommand.
Definition diagramcommands.cpp:402
void redo() override
ResetConductorCommand::redo.
Definition diagramcommands.cpp:420
void undo() override
ResetConductorCommand::undo.
Definition diagramcommands.cpp:409
QHash< Qt::Corner, ConductorProfile > ConductorProfilesGroup
Definition conductor.h:37