QElectroTech  0.70
Public 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>

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 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.

Definition at line 30 of file changeelementinformationcommand.h.

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

Definition at line 29 of file changeelementinformationcommand.cpp.

References QET::Icons::tr.

Member Function Documentation

◆ id()

int ChangeElementInformationCommand::id ( ) const
inlineoverride

Definition at line 35 of file changeelementinformationcommand.h.

◆ mergeWith()

bool ChangeElementInformationCommand::mergeWith ( const QUndoCommand *  other)
override

Definition at line 38 of file changeelementinformationcommand.cpp.

References m_element, m_new_info, and undo().

◆ redo()

void ChangeElementInformationCommand::redo ( )
override

◆ undo()

void ChangeElementInformationCommand::undo ( )
override

Member Data Documentation

◆ m_element

Element* ChangeElementInformationCommand::m_element
private

Definition at line 41 of file changeelementinformationcommand.h.

Referenced by mergeWith(), redo(), and undo().

◆ m_new_info

DiagramContext ChangeElementInformationCommand::m_new_info
private

Definition at line 42 of file changeelementinformationcommand.h.

Referenced by mergeWith(), and redo().

◆ m_old_info

DiagramContext ChangeElementInformationCommand::m_old_info
private

Definition at line 42 of file changeelementinformationcommand.h.

Referenced by undo().


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