QElectroTech 0.200.1-dev
Loading...
Searching...
No Matches
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
Here is the caller graph for this function:

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

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