18 #ifndef DIAGRAM_COMMANDS_H 19 #define DIAGRAM_COMMANDS_H 41 template <
typename QGI>
45 QUndoCommand (parent),
135 void undo()
override;
136 void redo()
override;
137 virtual void move(
const QPointF &);
140 void setupAnimation (QObject * target,
const QByteArray &propertyName,
const QVariant& start,
const QVariant& end);
170 void undo()
override;
171 void redo()
override;
200 void undo()
override;
201 void redo()
override;
229 void undo()
override;
230 void redo()
override;
265 void undo()
override;
266 void redo()
override;
290 void undo()
override;
291 void redo()
override;
Diagram * diagram
modified diagram
~ResetConductorCommand() override
ResetConductorCommand::~ResetConductorCommand.
int filter
filter stating what kinds of items should be pasted
void undo() override
Annule la modification du conducteur.
QPointF movement
applied movement
ChangeDiagramTextCommand(DiagramTextItem *, const QString &before, const QString &after, QUndoCommand *=nullptr)
Conductor * conductor
changed conductor
QParallelAnimationGroup * m_anim_group
animation group
QString text_before
former text
~ChangeBorderCommand() override
Destructeur.
Qt::Corner path_type
Path type of the modified conductor.
Diagram * diagram
diagram the movement takes place on.
virtual void setConductorTextItemMove(const QPointF &, const QPointF &)
The AddItemCommand class This command add an item in a diagram The item to add is template...
MoveConductorsTextsCommand(Diagram *, QUndoCommand *=nullptr)
~CutDiagramCommand() override
Destructeur.
void undo() override
annule la modification de texte
bool first_redo
prevent the first call to redo()
virtual void move(const QPointF &)
MoveElementsCommand::move Move item and conductor to .
ChangeConductorCommand(Conductor *, const ConductorProfile &, const ConductorProfile &, Qt::Corner, QUndoCommand *=nullptr)
bool first_redo
prevent the first call to redo()
void redo() override
MoveElementsCommand::redo.
void undo() override
annule le deplacement
void undo() override
PasteDiagramCommand::undo Undo this command.
virtual void addTextMovement(ConductorTextItem *, const QPointF &, const QPointF &, bool=false)
Diagram * diagram
diagram the movement takes place on.
ResetConductorCommand(const QHash< Conductor *, ConductorProfilesGroup > &, QUndoCommand *=nullptr)
ResetConductorCommand::ResetConductorCommand.
void redo() override
Refait la modification du conducteur.
CutDiagramCommand(Diagram *, const DiagramContent &, QUndoCommand *=nullptr)
ConductorProfile new_profile
profile after the change
~ChangeDiagramTextCommand() override
destructeur
MoveElementsCommand(Diagram *, const DiagramContent &, const QPointF &m, QUndoCommand *=nullptr)
MoveElementsCommand::MoveElementsCommand Constructor.
bool first_redo
prevent the first call to redo()
void redo() override
ChangeDiagramTextCommand::redo.
~MoveElementsCommand() override
MoveElementsCommand::~MoveElementsCommand Destructor.
ChangeBorderCommand(Diagram *, const BorderProperties &, const BorderProperties &, QUndoCommand *=nullptr)
DiagramTextItem * text_item
modified text item
~ChangeConductorCommand() override
Destructeur.
QString itemText(const QetGraphicsItem *item)
BorderProperties old_properties
properties before the change
void undo() override
Annule les changements apportes au schema.
PasteDiagramCommand(Diagram *, const DiagramContent &, QUndoCommand *=nullptr)
PasteDiagramCommand::PasteDiagramCommand Constructor.
DiagramContent content_to_move
moved content
QHash< ConductorTextItem *, QPair< QPointF, bool > > texts_to_move_
text items to be moved
void regenerateTextLabel()
QString text_after
new text
DiagramContent content
pasted content
void redo() override
Refait les changements apportes au schema.
void redo() override
PasteDiagramCommand::redo Redo this commnand.
void redo() override
ResetConductorCommand::redo.
void undo() override
ResetConductorCommand::undo.
~AddItemCommand() override
QPointF text_pos_before_mov_
position of the text item before the change
void undo() override
MoveElementsCommand::undo.
BorderProperties new_properties
properties after the change
QPointF text_pos_after_mov_
position of the text item after the change
~MoveConductorsTextsCommand() override
Destructeur.
~PasteDiagramCommand() override
PasteDiagramCommand::~PasteDiagramCommand Destructor.
ConductorProfile old_profile
profile before the change
AddItemCommand(QGI item, Diagram *diagram, const QPointF &pos=QPointF(), QUndoCommand *parent=nullptr)
void setupAnimation(QObject *target, const QByteArray &propertyName, const QVariant &start, const QVariant &end)
MoveElementsCommand::setupAnimation Set up the animation for this undo command.
Diagram * diagram
diagram content is pasted onto
bool first_redo
prevent the first call to redo()
QHash< Conductor *, ConductorProfilesGroup > conductors_profiles
impacted conductors along with their former profiles
void redo() override
refait le deplacement
bool first_redo
prevent the first call to redo()