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

The AddPartCommand class Undo command use to add a graphics part into an element scene. More...

#include <addpartcommand.h>

Inherits QUndoCommand.

Collaboration diagram for AddPartCommand:
Collaboration graph

Public Member Functions

 AddPartCommand (const QString &text, QPointer< ElementScene > scene, QGraphicsItem *part, QUndoCommand *parent=nullptr)
 AddPartCommand::AddPartCommand.
 
 ~AddPartCommand () override
 AddPartCommand::~AddPartCommand.
 
void undo () override
 AddPartCommand::undo.
 
void redo () override
 AddPartCommand::redo.
 

Private Member Functions

 AddPartCommand (const AddPartCommand &)
 

Private Attributes

QPointer< ElementScenem_scene
 
QVector< QGraphicsItem * > m_part
 
bool m_first_redo {true}
 

Detailed Description

The AddPartCommand class Undo command use to add a graphics part into an element scene.

Constructor & Destructor Documentation

◆ AddPartCommand() [1/2]

AddPartCommand::AddPartCommand ( const QString &  text,
QPointer< ElementScene scene,
QGraphicsItem *  part,
QUndoCommand *  parent = nullptr 
)

AddPartCommand::AddPartCommand.

Parameters
text: text of the undo command
scene: scene where part must be added
part: part to add
parent: parent undo command

◆ ~AddPartCommand()

AddPartCommand::~AddPartCommand ( )
override

◆ AddPartCommand() [2/2]

AddPartCommand::AddPartCommand ( const AddPartCommand )
private

Member Function Documentation

◆ redo()

void AddPartCommand::redo ( )
override

◆ undo()

void AddPartCommand::undo ( )
override

Member Data Documentation

◆ m_first_redo

bool AddPartCommand::m_first_redo {true}
private

◆ m_part

QVector<QGraphicsItem *> AddPartCommand::m_part
private

◆ m_scene

QPointer<ElementScene> AddPartCommand::m_scene
private

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