QElectroTech 0.100.0-dev
Loading...
Searching...
No Matches
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, const DiagramContext &old_info, const DiagramContext &new_info, QUndoCommand *parent=nullptr)
 ChangeElementInformationCommand::ChangeElementInformationCommand Default constructor.
 
 ChangeElementInformationCommand (QMap< QPointer< Element >, QPair< DiagramContext, DiagramContext > > map, QUndoCommand *parent=nullptr)
 
int id () const override
 
bool mergeWith (const QUndoCommand *other) override
 
void undo () override
 ChangeElementInformationCommand::undo.
 
void redo () override
 ChangeElementInformationCommand::redo.
 

Private Member Functions

void updateProjectDB ()
 

Private Attributes

QMap< QPointer< Element >, QPair< DiagramContext, DiagramContext > > m_map
 

Detailed Description

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

Constructor & Destructor Documentation

◆ ChangeElementInformationCommand() [1/2]

ChangeElementInformationCommand::ChangeElementInformationCommand ( Element elmt,
const DiagramContext old_info,
const 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

◆ ChangeElementInformationCommand() [2/2]

ChangeElementInformationCommand::ChangeElementInformationCommand ( QMap< QPointer< Element >, QPair< DiagramContext, DiagramContext > >  map,
QUndoCommand *  parent = nullptr 
)

Member Function Documentation

◆ id()

int ChangeElementInformationCommand::id ( ) const
inlineoverride

◆ mergeWith()

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

◆ 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:

◆ updateProjectDB()

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

Member Data Documentation

◆ m_map

QMap<QPointer<Element>, QPair<DiagramContext, DiagramContext> > ChangeElementInformationCommand::m_map
private

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