18#ifndef MOVEGRAPHICSITEMCOMMAND_H
19#define MOVEGRAPHICSITEMCOMMAND_H
21#include <QUndoCommand>
22#include <QParallelAnimationGroup>
25#include "../diagramcontent.h"
38 const QPointF &movement,
39 QUndoCommand *parent =
nullptr);
51 void move(
const QPointF &movement);
53 const QByteArray &property_name,
54 const QVariant &start,
Definition diagramcontent.h:47
The Diagram class This class represents an electric diagram. It manages its various child elements,...
Definition diagram.h:56
The MoveGraphicsItemCommand class An undo command used for move item(s) in a diagram.
Definition movegraphicsitemcommand.h:34
void setupAnimation(QObject *target, const QByteArray &property_name, const QVariant &start, const QVariant &end)
MoveGraphicsItemCommand::setupAnimation Create the animation used for the movement.
Definition movegraphicsitemcommand.cpp:164
~MoveGraphicsItemCommand()
Definition movegraphicsitemcommand.h:41
QParallelAnimationGroup m_anim_group
Definition movegraphicsitemcommand.h:61
bool m_first_redo
Definition movegraphicsitemcommand.h:62
void undo() override
MoveGraphicsItemCommand::undo Reimplemented from QUndoCommand::undo()
Definition movegraphicsitemcommand.cpp:61
void redo() override
MoveGraphicsItemCommand::redo Reimplemented from QUndoCommand::redo()
Definition movegraphicsitemcommand.cpp:76
QPointer< Diagram > m_diagram
Definition movegraphicsitemcommand.h:58
MoveGraphicsItemCommand(const MoveGraphicsItemCommand &)
const QPointF m_movement
Definition movegraphicsitemcommand.h:60
DiagramContent m_content
Definition movegraphicsitemcommand.h:59
void move(const QPointF &movement)
MoveGraphicsItemCommand::move Apply movement to items of m_content.
Definition movegraphicsitemcommand.cpp:100