QElectroTech 0.100.0-dev
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
AddGraphicsObjectCommand Class Reference

The AddGraphicsObjectCommand class Undo command to used to add item to a diagram. More...

#include <addgraphicsobjectcommand.h>

Inherits QUndoCommand.

Collaboration diagram for AddGraphicsObjectCommand:
Collaboration graph

Public Member Functions

 AddGraphicsObjectCommand (QGraphicsObject *qgo, Diagram *diagram, const QPointF &pos=QPointF(), QUndoCommand *parent=nullptr)
 AddGraphicsObjectCommand::AddGraphicsObjectCommand Default constructor.
 
 ~AddGraphicsObjectCommand () override
 AddGraphicsObjectCommand::~AddGraphicsObjectCommand.
 
void undo () override
 AddGraphicsObjectCommand::undo Reimplemented from QUndoCommand.
 
void redo () override
 AddGraphicsObjectCommand::redo Reimplemented from QUndoCommand.
 

Private Member Functions

QString itemText () const
 AddGraphicsObjectCommand::itemText.
 

Private Attributes

QPointer< QGraphicsObject > m_item
 
Diagramm_diagram = nullptr
 
QPointF m_pos
 

Detailed Description

The AddGraphicsObjectCommand class Undo command to used to add item to a diagram.

Constructor & Destructor Documentation

◆ AddGraphicsObjectCommand()

AddGraphicsObjectCommand::AddGraphicsObjectCommand ( QGraphicsObject *  qgo,
Diagram diagram,
const QPointF &  pos = QPointF(),
QUndoCommand *  parent = nullptr 
)

AddGraphicsObjectCommand::AddGraphicsObjectCommand Default constructor.

Parameters
qgo: QGraphicsObject to manage by this undo command
diagram: Diagram where the graphics object must be added
pos: position of the qgraphics object in the diagram in scene coordinate
parent: parent undo command of this class.
Here is the call graph for this function:

◆ ~AddGraphicsObjectCommand()

AddGraphicsObjectCommand::~AddGraphicsObjectCommand ( )
override

AddGraphicsObjectCommand::~AddGraphicsObjectCommand.

Here is the call graph for this function:

Member Function Documentation

◆ itemText()

QString AddGraphicsObjectCommand::itemText ( ) const
private

AddGraphicsObjectCommand::itemText.

Returns
Here is the caller graph for this function:

◆ redo()

void AddGraphicsObjectCommand::redo ( )
override

AddGraphicsObjectCommand::redo Reimplemented from QUndoCommand.

Here is the call graph for this function:

◆ undo()

void AddGraphicsObjectCommand::undo ( )
override

AddGraphicsObjectCommand::undo Reimplemented from QUndoCommand.

Here is the call graph for this function:

Member Data Documentation

◆ m_diagram

Diagram* AddGraphicsObjectCommand::m_diagram = nullptr
private

◆ m_item

QPointer<QGraphicsObject> AddGraphicsObjectCommand::m_item
private

◆ m_pos

QPointF AddGraphicsObjectCommand::m_pos
private

The documentation for this class was generated from the following files: