QElectroTech  0.8-dev
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ChangeElementInformationCommand Class Reference

The ChangeElementInformationCommand class This class manage undo/redo to change the element information. More...

#include <changeelementinformationcommand.h>

Inherits QUndoCommand.

Collaboration diagram for ChangeElementInformationCommand:
Collaboration graph

Public Member Functions

 ChangeElementInformationCommand (Element *elmt, DiagramContext &old_info, DiagramContext &new_info, QUndoCommand *parent=nullptr)
 ChangeElementInformationCommand::ChangeElementInformationCommand Default constructor. More...
 
int id () const override
 
bool mergeWith (const QUndoCommand *other) override
 
void undo () override
 ChangeElementInformationCommand::undo. More...
 
void redo () override
 ChangeElementInformationCommand::redo. More...
 

Private Member Functions

void updateProjectDB ()
 

Private Attributes

Elementm_element
 
DiagramContext m_old_info
 
DiagramContext m_new_info
 

Detailed Description

The ChangeElementInformationCommand class This class manage undo/redo to change the element information.

Constructor & Destructor Documentation

◆ ChangeElementInformationCommand()

ChangeElementInformationCommand::ChangeElementInformationCommand ( Element elmt,
DiagramContext old_info,
DiagramContext new_info,
QUndoCommand *  parent = nullptr 
)

ChangeElementInformationCommand::ChangeElementInformationCommand Default constructor.

Parameters
elmt: element to change information
old_info: old info of element
new_info: new info of element
parent

Member Function Documentation

◆ id()

int ChangeElementInformationCommand::id ( ) const
inlineoverride

◆ mergeWith()

bool ChangeElementInformationCommand::mergeWith ( const QUndoCommand *  other)
override
Here is the call graph for this function:

◆ redo()

void ChangeElementInformationCommand::redo ( )
override

ChangeElementInformationCommand::redo.

Here is the call graph for this function:

◆ undo()

void ChangeElementInformationCommand::undo ( )
override

ChangeElementInformationCommand::undo.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateProjectDB()

void ChangeElementInformationCommand::updateProjectDB ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ m_element

Element* ChangeElementInformationCommand::m_element
private

◆ m_new_info

DiagramContext ChangeElementInformationCommand::m_new_info
private

◆ m_old_info

DiagramContext ChangeElementInformationCommand::m_old_info
private

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