18#ifndef EDITOR_COMMANDS_H
19#define EDITOR_COMMANDS_H
20#include "../editor/graphicspart/customelementpart.h"
21#include "../qgimanager.h"
36#include "../QPropertyUndoCommand/qpropertyundocommand.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;
Definition editorcommands.h:116
NamesList names_after
List of new names.
Definition editorcommands.h:134
ChangeNamesCommand(const ChangeNamesCommand &)
void redo() override
Refait le changement.
Definition editorcommands.cpp:191
~ChangeNamesCommand() override
Destructeur.
Definition editorcommands.cpp:178
void undo() override
Annule le changement.
Definition editorcommands.cpp:183
NamesList names_before
List of former names.
Definition editorcommands.h:132
Definition editorcommands.h:142
void applyLower(const QList< QGraphicsItem * > &)
Definition editorcommands.cpp:298
ChangeZValueCommand(const ChangeZValueCommand &)
void redo() override
Refait les changements de zValue.
Definition editorcommands.cpp:246
void undo() override
Annule les changements de zValue.
Definition editorcommands.cpp:240
QHash< QGraphicsItem *, qreal > redo_hash
associates impacted primitives with their new zValues
Definition editorcommands.h:166
void applyBringForward(const QList< QGraphicsItem * > &)
Definition editorcommands.cpp:255
QHash< QGraphicsItem *, qreal > undo_hash
associates impacted primitives with their former zValues
Definition editorcommands.h:164
void applySendBackward(const QList< QGraphicsItem * > &)
Definition editorcommands.cpp:324
QET::DepthOption m_option
kind of treatment to apply
Definition editorcommands.h:168
void applyRaise(const QList< QGraphicsItem * > &)
Definition editorcommands.cpp:273
~ChangeZValueCommand() override
Destructeur.
Definition editorcommands.cpp:235
Definition editorcommands.h:78
~CutPartsCommand() override
Destructeur.
Definition editorcommands.cpp:111
CutPartsCommand(const CutPartsCommand &)
The DeletePartsCommand class Class used to remove part from an element scene.
Definition deletepartscommand.h:33
The ElementData class WARNING This class inherit from PropertiesInterface but only fromXml is actuall...
Definition elementdata.h:32
The ElementEditionCommand class ElementEditionCommand is the base class for all commands classes invo...
Definition editorcommands.h:47
void setElementView(ElementView *)
Definition editorcommands.cpp:89
ElementView * elementView() const
Definition editorcommands.cpp:81
~ElementEditionCommand() override
Definition editorcommands.cpp:59
ElementEditionCommand(const ElementEditionCommand &)
ElementScene * elementScene() const
Definition editorcommands.cpp:66
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:74
The ElementScene class This class is the canvas allowing the visual edition of an electrical element....
Definition elementscene.h:46
Definition elementview.h:27
Definition editorcommands.h:90
~MovePartsCommand() override
Destructeur.
Definition editorcommands.cpp:137
QPointF movement
applied movement
Definition editorcommands.h:108
void redo() override
Refait le deplacement.
Definition editorcommands.cpp:148
void undo() override
Annule le deplacement.
Definition editorcommands.cpp:142
QList< QGraphicsItem * > moved_parts
List of moved primitives.
Definition editorcommands.h:106
MovePartsCommand(const MovePartsCommand &)
bool first_redo
Prevent the first call to redo()
Definition editorcommands.h:110
Definition nameslist.h:31
The RotateSelectionInESCommand class Rotate the selected items in the element editor.
Definition editorcommands.h:255
QList< QGraphicsItem * > m_items
Definition editorcommands.h:264
ElementScene * m_scene
Definition editorcommands.h:263
void redo() override
RotateElementsCommand::redo.
Definition editorcommands.cpp:550
void undo() override
RotateElementsCommand::undo.
Definition editorcommands.cpp:522
Definition editorcommands.h:198
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:421
QRectF original_rect_
original rect items fit in
Definition editorcommands.h:225
void redo() override
Definition editorcommands.cpp:401
void scale(const QRectF &before, const QRectF &after)
Definition editorcommands.cpp:461
void adjustText()
Definition editorcommands.cpp:475
~ScalePartsCommand() override
Definition editorcommands.cpp:386
void undo() override
Definition editorcommands.cpp:393
QList< CustomElementPart * > scaledPrimitives() const
Definition editorcommands.cpp:429
QPair< QRectF, QRectF > transformation()
Definition editorcommands.cpp:453
ElementScene * elementScene() const
Definition editorcommands.cpp:413
ScalePartsCommand(const ScalePartsCommand &)
void setTransformation(const QRectF &, const QRectF &)
ScalePartsCommand::setTransformation Define the transformation applied by this command.
Definition editorcommands.cpp:442
QRectF new_rect_
new rect items should fit in
Definition editorcommands.h:227
Definition editorcommands.h:233
void redo() override
Definition editorcommands.cpp:508
void undo() override
Definition editorcommands.cpp:503
ElementData m_new
Definition editorcommands.h:246
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:41