|
QElectroTech
0.70
|
#include <diagramcommands.h>
Public Member Functions | |
| MoveElementsCommand (Diagram *, const DiagramContent &, const QPointF &m, QUndoCommand *=nullptr) | |
| MoveElementsCommand::MoveElementsCommand Constructor. More... | |
| ~MoveElementsCommand () override | |
| MoveElementsCommand::~MoveElementsCommand Destructor. More... | |
| void | undo () override |
| MoveElementsCommand::undo. More... | |
| void | redo () override |
| MoveElementsCommand::redo. More... | |
| virtual void | move (const QPointF &) |
| MoveElementsCommand::move Move item and conductor to . More... | |
Private Member Functions | |
| MoveElementsCommand (const MoveElementsCommand &) | |
| void | setupAnimation (QObject *target, const QByteArray &propertyName, const QVariant &start, const QVariant &end) |
| MoveElementsCommand::setupAnimation Set up the animation for this undo command. More... | |
Private Attributes | |
| Diagram * | diagram |
| diagram the movement takes place on. More... | |
| DiagramContent | content_to_move |
| moved content More... | |
| QPointF | movement |
| applied movement More... | |
| QParallelAnimationGroup * | m_anim_group |
| animation group More... | |
| bool | first_redo |
| prevent the first call to redo() More... | |
This command moves some content on a particular diagram.
Definition at line 125 of file diagramcommands.h.
| MoveElementsCommand::MoveElementsCommand | ( | Diagram * | dia, |
| const DiagramContent & | diagram_content, | ||
| const QPointF & | m, | ||
| QUndoCommand * | parent = nullptr |
||
| ) |
MoveElementsCommand::MoveElementsCommand Constructor.
| dia | diagram |
| diagram_content | diagram content (contain all items to be moved) |
| m | movement to applied |
| parent | parent undo command |
Definition at line 172 of file diagramcommands.cpp.
References DiagramContent::ConductorsToMove, DiagramContent::ConductorsToUpdate, content_to_move, DiagramContent::Elements, DiagramContent::ElementTextFields, DiagramContent::Images, DiagramContent::sentence(), DiagramContent::Shapes, DiagramContent::TextFields, and QET::Icons::tr.
|
override |
MoveElementsCommand::~MoveElementsCommand Destructor.
Definition at line 209 of file diagramcommands.cpp.
References m_anim_group.
|
private |
|
virtual |
MoveElementsCommand::move Move item and conductor to .
| actual_movement | movement to be applied |
Definition at line 244 of file diagramcommands.cpp.
References content_to_move, DiagramContent::items(), DiagramContent::m_conductors_to_move, DiagramContent::m_conductors_to_update, Conductor::pos, and setupAnimation().
Referenced by redo().
|
override |
Definition at line 226 of file diagramcommands.cpp.
References diagram, first_redo, m_anim_group, move(), and movement.
|
private |
MoveElementsCommand::setupAnimation Set up the animation for this undo command.
| target | object to anim |
| propertyName | property to animate |
| start | value at start |
| end | value at end |
Definition at line 284 of file diagramcommands.cpp.
References m_anim_group.
Referenced by move().
|
override |
Definition at line 216 of file diagramcommands.cpp.
References diagram, and m_anim_group.
|
private |
moved content
Definition at line 147 of file diagramcommands.h.
Referenced by move(), and MoveElementsCommand().
|
private |
diagram the movement takes place on.
Definition at line 145 of file diagramcommands.h.
|
private |
prevent the first call to redo()
Definition at line 153 of file diagramcommands.h.
Referenced by redo().
|
private |
animation group
Definition at line 151 of file diagramcommands.h.
Referenced by redo(), setupAnimation(), undo(), and ~MoveElementsCommand().
|
private |
1.8.15