18#ifndef EDITOR_COMMANDS_H
19#define EDITOR_COMMANDS_H
52 QUndoCommand * =
nullptr);
56 QUndoCommand * =
nullptr);
100 void undo()
override;
101 void redo()
override;
126 void undo()
override;
127 void redo()
override;
152 void undo()
override;
153 void redo()
override;
157 void applyRaise(
const QList<QGraphicsItem *> &);
158 void applyLower(
const QList<QGraphicsItem *> &);
184 void undo()
override;
185 void redo()
override;
208 void undo()
override;
209 void redo()
override;
217 void scale(
const QRectF &before,
const QRectF &after);
238 QUndoCommand *parent =
nullptr);
241 void undo()
override;
242 void redo()
override;
259 void undo()
override;
260 void redo()
override;
273 void undo()
override;
274 void redo()
override;
292 void undo()
override;
293 void redo()
override;
310 void undo()
override;
311 void redo()
override;
NamesList names_after
List of new names.
Definition editorcommands.h:134
ChangeNamesCommand(ElementScene *, const NamesList &, const NamesList &, QUndoCommand *=nullptr)
Definition editorcommands.cpp:166
ChangeNamesCommand(const ChangeNamesCommand &)
void redo() override
Refait le changement.
Definition editorcommands.cpp:192
~ChangeNamesCommand() override
Destructeur.
Definition editorcommands.cpp:179
void undo() override
Annule le changement.
Definition editorcommands.cpp:184
NamesList names_before
List of former names.
Definition editorcommands.h:132
void applyLower(const QList< QGraphicsItem * > &)
Definition editorcommands.cpp:292
ChangeZValueCommand(const ChangeZValueCommand &)
void redo() override
Refait les changements de zValue.
Definition editorcommands.cpp:247
ChangeZValueCommand(ElementScene *, QET::DepthOption, QUndoCommand *=nullptr)
Definition editorcommands.cpp:205
void undo() override
Annule les changements de zValue.
Definition editorcommands.cpp:241
QHash< QGraphicsItem *, qreal > redo_hash
associates impacted primitives with their new zValues
Definition editorcommands.h:166
void applyBringForward(const QList< QGraphicsItem * > &)
Definition editorcommands.cpp:256
QHash< QGraphicsItem *, qreal > undo_hash
associates impacted primitives with their former zValues
Definition editorcommands.h:164
void applySendBackward(const QList< QGraphicsItem * > &)
Definition editorcommands.cpp:311
QET::DepthOption m_option
kind of treatment to apply
Definition editorcommands.h:168
void applyRaise(const QList< QGraphicsItem * > &)
Definition editorcommands.cpp:274
~ChangeZValueCommand() override
Destructeur.
Definition editorcommands.cpp:236
CutPartsCommand(ElementScene *, const QList< QGraphicsItem * > &, QUndoCommand *=nullptr)
Definition editorcommands.cpp:101
~CutPartsCommand() override
Destructeur.
Definition editorcommands.cpp:112
CutPartsCommand(const CutPartsCommand &)
DeletePartsCommand(QPointer< ElementScene > scene, const QVector< QGraphicsItem * > &parts, QUndoCommand *parent=nullptr)
DeletePartsCommand::DeletePartsCommand.
Definition deletepartscommand.cpp:27
The ElementData class WARNING This class inherit from PropertiesInterface but only fromXml is actuall...
Definition elementdata.h:36
void setElementView(ElementView *)
Definition editorcommands.cpp:90
ElementView * elementView() const
Definition editorcommands.cpp:82
~ElementEditionCommand() override
Definition editorcommands.cpp:60
ElementEditionCommand(const ElementEditionCommand &)
ElementScene * elementScene() const
Definition editorcommands.cpp:67
ElementEditionCommand(ElementScene *=nullptr, ElementView *=nullptr, QUndoCommand *=nullptr)
ElementEditionCommand::ElementEditionCommand Constructs an ElementEditionCommand, thus embedding the ...
Definition editorcommands.cpp:29
ElementView * m_view
Definition editorcommands.h:72
ElementScene * m_scene
Element editor/view/scene the command should take place on.
Definition editorcommands.h:71
void setElementScene(ElementScene *)
Definition editorcommands.cpp:75
The ElementScene class This class is the canvas allowing the visual edition of an electrical element....
Definition elementscene.h:46
Definition elementview.h:27
ElementScene * m_scene
Definition editorcommands.h:313
qreal m_axis_y
Definition editorcommands.h:315
FlipElementsCommand(ElementScene *scene, QUndoCommand *parent=nullptr)
Definition editorcommands.cpp:740
QList< QGraphicsItem * > m_items
Definition editorcommands.h:314
void redo() override
FlipElementsCommand::redo.
Definition editorcommands.cpp:750
void undo() override
FlipElementsCommand::undo.
Definition editorcommands.cpp:784
ElementScene * m_scene
Definition editorcommands.h:295
QList< QGraphicsItem * > m_items
Definition editorcommands.h:296
void redo() override
MirrorElementsCommand::redo.
Definition editorcommands.cpp:701
qreal m_axis_x
Definition editorcommands.h:297
MirrorElementsCommand(ElementScene *scene, QUndoCommand *parent=nullptr)
Definition editorcommands.cpp:691
void undo() override
MirrorElementsCommand::undo.
Definition editorcommands.cpp:734
~MovePartsCommand() override
Destructeur.
Definition editorcommands.cpp:138
QPointF movement
applied movement
Definition editorcommands.h:108
void redo() override
Refait le deplacement.
Definition editorcommands.cpp:149
void undo() override
Annule le deplacement.
Definition editorcommands.cpp:143
QList< QGraphicsItem * > moved_parts
List of moved primitives.
Definition editorcommands.h:106
MovePartsCommand(const QPointF &, ElementScene *, const QList< QGraphicsItem * > &, QUndoCommand *=nullptr)
Definition editorcommands.cpp:124
MovePartsCommand(const MovePartsCommand &)
bool first_redo
Prevent the first call to redo().
Definition editorcommands.h:110
Definition nameslist.h:37
QList< QGraphicsItem * > m_items
Definition editorcommands.h:264
RotateElementsCommand(ElementScene *scene, QUndoCommand *parent=nullptr)
Definition editorcommands.cpp:500
ElementScene * m_scene
Definition editorcommands.h:263
void redo() override
RotateElementsCommand::redo.
Definition editorcommands.cpp:558
void undo() override
RotateElementsCommand::undo.
Definition editorcommands.cpp:509
ElementScene * m_scene
Definition editorcommands.h:277
QList< QGraphicsItem * > m_items
Definition editorcommands.h:278
void undo() override
RotateFineElementsCommand::undo.
Definition editorcommands.cpp:614
RotateFineElementsCommand(ElementScene *scene, QUndoCommand *parent=nullptr)
Definition editorcommands.cpp:605
void redo() override
RotateFineElementsCommand::redo.
Definition editorcommands.cpp:643
bool first_redo
Prevent the first call to redo().
Definition editorcommands.h:229
QList< CustomElementPart * > scaled_primitives_
List of moved primitives.
Definition editorcommands.h:223
void setScaledPrimitives(const QList< CustomElementPart * > &)
Definition editorcommands.cpp:408
QRectF original_rect_
original rect items fit in
Definition editorcommands.h:225
void redo() override
Definition editorcommands.cpp:388
void scale(const QRectF &before, const QRectF &after)
Definition editorcommands.cpp:448
void adjustText()
Definition editorcommands.cpp:462
~ScalePartsCommand() override
Definition editorcommands.cpp:373
void undo() override
Definition editorcommands.cpp:380
QList< CustomElementPart * > scaledPrimitives() const
Definition editorcommands.cpp:416
QPair< QRectF, QRectF > transformation()
Definition editorcommands.cpp:440
ScalePartsCommand(ElementScene *=nullptr, QUndoCommand *=nullptr)
Definition editorcommands.cpp:365
ElementScene * elementScene() const
Definition editorcommands.cpp:400
ScalePartsCommand(const ScalePartsCommand &)
void setTransformation(const QRectF &, const QRectF &)
ScalePartsCommand::setTransformation Define the transformation applied by this command.
Definition editorcommands.cpp:429
QRectF new_rect_
new rect items should fit in
Definition editorcommands.h:227
void redo() override
Definition editorcommands.cpp:495
void undo() override
Definition editorcommands.cpp:490
ElementData m_new
Definition editorcommands.h:246
changeElementDataCommand(ElementScene *scene, ElementData old_data, ElementData new_data, QUndoCommand *parent=nullptr)
changeElementDataCommand::changeElementDataCommand Change the properties of the drawn element
Definition editorcommands.cpp:479
ElementData m_old
Definition editorcommands.h:245
~changeElementDataCommand() override
Definition editorcommands.h:239
DepthOption
List the various kind of changes for the zValue.
Definition qet.h:42