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

#include <editorcommands.h>

Inheritance diagram for ChangeNamesCommand:
Inheritance graph
Collaboration diagram for ChangeNamesCommand:
Collaboration graph

Public Member Functions

 ChangeNamesCommand (ElementScene *, const NamesList &, const NamesList &, QUndoCommand *=nullptr)
 
 ~ChangeNamesCommand () override
 Destructeur. More...
 
void undo () override
 Annule le changement. More...
 
void redo () override
 Refait le changement. More...
 
- Public Member Functions inherited from ElementEditionCommand
 ElementEditionCommand (ElementScene *=nullptr, ElementView *=nullptr, QUndoCommand *=nullptr)
 ElementEditionCommand::ElementEditionCommand Constructs an ElementEditionCommand, thus embedding the provided scene and view. More...
 
 ElementEditionCommand (const QString &, ElementScene *=nullptr, ElementView *=nullptr, QUndoCommand *=nullptr)
 ElementEditionCommand::ElementEditionCommand Constructs an ElementEditionCommand, thus embedding the provided scene and view. More...
 
 ~ElementEditionCommand () override
 
ElementSceneelementScene () const
 
void setElementScene (ElementScene *)
 
ElementViewelementView () const
 
void setElementView (ElementView *)
 

Private Member Functions

 ChangeNamesCommand (const ChangeNamesCommand &)
 

Private Attributes

NamesList names_before
 List of former names. More...
 
NamesList names_after
 List of new names. More...
 

Additional Inherited Members

- Protected Attributes inherited from ElementEditionCommand
ElementScenem_scene
 Element editor/view/scene the command should take place on. More...
 
ElementViewm_view
 

Detailed Description

This command changes the translated names of an electrical element.

Constructor & Destructor Documentation

◆ ChangeNamesCommand() [1/2]

ChangeNamesCommand::ChangeNamesCommand ( ElementScene element_scene,
const NamesList before,
const NamesList after,
QUndoCommand *  parent = nullptr 
)

Constructeur

Parameters
element_sceneElement edite
beforeListes des noms avant changement
afterListes des noms apres changement
parentQUndoCommand parent

◆ ~ChangeNamesCommand()

ChangeNamesCommand::~ChangeNamesCommand ( )
override

Destructeur.

◆ ChangeNamesCommand() [2/2]

ChangeNamesCommand::ChangeNamesCommand ( const ChangeNamesCommand )
private

Member Function Documentation

◆ redo()

void ChangeNamesCommand::redo ( )
override

Refait le changement.

◆ undo()

void ChangeNamesCommand::undo ( )
override

Annule le changement.

Member Data Documentation

◆ names_after

NamesList ChangeNamesCommand::names_after
private

List of new names.

◆ names_before

NamesList ChangeNamesCommand::names_before
private

List of former names.


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