18 #ifndef EDITOR_COMMANDS_H 19 #define EDITOR_COMMANDS_H 94 virtual void setOffset(
int,
const QPointF &,
int,
const QPointF &);
135 void undo()
override;
136 void redo()
override;
161 void undo()
override;
162 void redo()
override;
185 void undo()
override;
186 void redo()
override;
211 void undo()
override;
212 void redo()
override;
216 void applyRaise(
const QList<QGraphicsItem *> &);
217 void applyLower(
const QList<QGraphicsItem *> &);
243 void undo()
override;
244 void redo()
override;
267 void undo()
override;
268 void redo()
override;
276 void scale(
const QRectF &before,
const QRectF &after);
296 void undo()
override;
297 void redo()
override;
QPair< QRectF, QRectF > transformation()
void setElementScene(ElementScene *)
void applyBringForward(const QList< QGraphicsItem *> &)
void redo() override
Refait les changements de zValue.
~ElementEditionCommand() override
void redo() override
Refait le deplacement.
ElementScene * elementScene() const
void undo() override
annule le coller
ElementScene * elementScene() const
~ChangeNamesCommand() override
Destructeur.
~ScalePartsCommand() override
QPointF old_start_top_left_corner_
ElementEditionCommand(ElementScene *=nullptr, ElementView *=nullptr, QUndoCommand *=nullptr)
QPointF new_start_top_left_corner_
void undo() override
Annule le deplacement.
void setScaledPrimitives(const QList< CustomElementPart *> &)
void redo() override
Refait l'ajout.
QList< QGraphicsItem * > deleted_parts
Deleted primitives.
void undo() override
Annule l'ajout.
ElementView * elementView() const
ElementScene * m_scene
Element editor/view/scene the command should take place on.
void setElementView(ElementView *)
ElementContent content_
Pasted content.
void undo() override
Annule les changements de zValue.
~ChangePropertiesCommand() override
bool first_redo
Prevent the first call to redo()
void redo() override
Refait le changement.
CutPartsCommand(ElementScene *, const QList< QGraphicsItem *> &, QUndoCommand *=nullptr)
~AddPartCommand() override
Destructeur.
QRectF original_rect_
original rect items fit in
The ElementEditionCommand class ElementEditionCommand is the base class for all commands classes invo...
~ChangeZValueCommand() override
Destructeur.
QList< CustomElementPart * > scaledPrimitives() const
~PastePartsCommand() override
Destructeur.
QPointF movement
applied movement
bool first_redo
Prevent the first call to redo()
QGraphicsItem * part
Added primitive.
QList< CustomElementPart * > scaled_primitives_
List of moved primitives.
void undo() override
Annule le changement.
QHash< QGraphicsItem *, qreal > redo_hash
associates impacted primitives with their new zValues
DepthOption
List the various kind of changes for the zValue.
ChangePropertiesCommand(ElementScene *scene, const QString &type, const DiagramContext &info, const DiagramContext &elmt_info, QUndoCommand *parent=nullptr)
ChangePropertiesCommand::ChangePropertiesCommand Change the properties of the drawed element...
NamesList names_before
List of former names.
QList< DiagramContext > m_kind_info
~CutPartsCommand() override
Destructeur.
QRectF new_rect_
new rect items should fit in
ChangeNamesCommand(ElementScene *, const NamesList &, const NamesList &, QUndoCommand *=nullptr)
DeletePartsCommand(ElementScene *, const QList< QGraphicsItem *> &, QUndoCommand *=nullptr)
PastePartsCommand(ElementView *, const ElementContent &, QUndoCommand *=nullptr)
void redo() override
Supprime les parties.
AddPartCommand(const QString &, ElementScene *, QGraphicsItem *, QUndoCommand *=nullptr)
QList< QGraphicsItem * > moved_parts
List of moved primitives.
void applyLower(const QList< QGraphicsItem *> &)
int new_offset_paste_count_
ChangeZValueCommand(ElementScene *, QET::DepthOption, QUndoCommand *=nullptr)
void redo() override
refait le coller
virtual void setOffset(int, const QPointF &, int, const QPointF &)
void applySendBackward(const QList< QGraphicsItem *> &)
void setTransformation(const QRectF &, const QRectF &)
ScalePartsCommand(ElementScene *=nullptr, QUndoCommand *=nullptr)
~MovePartsCommand() override
Destructeur.
NamesList names_after
List of new names.
QList< QGraphicsItem * > ElementContent
int old_offset_paste_count_
Data required to undo a copy/paste with offset.
void undo() override
Restaure les parties supprimees.
QET::DepthOption m_option
kind of treatment to apply
void scale(const QRectF &before, const QRectF &after)
QHash< QGraphicsItem *, qreal > undo_hash
associates impacted primitives with their former zValues
MovePartsCommand(const QPointF &, ElementScene *, const QList< QGraphicsItem *> &, QUndoCommand *=nullptr)
bool first_redo
Prevent the first call to redo()
bool first_redo
Prevent the first call to redo()
void applyRaise(const QList< QGraphicsItem *> &)
~DeletePartsCommand() override
Destructeur : detruit egalement les parties supprimees.
QList< DiagramContext > m_elmt_info