18#ifndef ADDGRAPHICSOBJECTCOMMAND_H
19#define ADDGRAPHICSOBJECTCOMMAND_H
21#include <QUndoCommand>
36 const QPointF &pos = QPointF(),
37 QUndoCommand *parent =
nullptr);
The AddGraphicsObjectCommand class Undo command to used to add item to a diagram.
Definition addgraphicsobjectcommand.h:33
QString itemText() const
AddGraphicsObjectCommand::itemText.
Definition addgraphicsobjectcommand.cpp:83
Diagram * m_diagram
Definition addgraphicsobjectcommand.h:48
~AddGraphicsObjectCommand() override
AddGraphicsObjectCommand::~AddGraphicsObjectCommand.
Definition addgraphicsobjectcommand.cpp:46
void redo() override
AddGraphicsObjectCommand::redo Reimplemented from QUndoCommand.
Definition addgraphicsobjectcommand.cpp:68
QPointer< QGraphicsObject > m_item
Definition addgraphicsobjectcommand.h:47
void undo() override
AddGraphicsObjectCommand::undo Reimplemented from QUndoCommand.
Definition addgraphicsobjectcommand.cpp:54
QPointF m_pos
Definition addgraphicsobjectcommand.h:49
The Diagram class This class represents an electric diagram. It manages its various child elements,...
Definition diagram.h:56