QElectroTech 0.200.1-dev
Loading...
Searching...
No Matches
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.
void undo () override
 Annule le changement.
void redo () override
 Refait le changement.
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.
 ElementEditionCommand (const QString &, ElementScene *=nullptr, ElementView *=nullptr, QUndoCommand *=nullptr)
 ElementEditionCommand::ElementEditionCommand Constructs an ElementEditionCommand, thus embedding the provided scene and view.
 ~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.
NamesList names_after
 List of new names.

Additional Inherited Members

Protected Attributes inherited from ElementEditionCommand
ElementScenem_scene
 Element editor/view/scene the command should take place on.
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
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~ChangeNamesCommand()

ChangeNamesCommand::~ChangeNamesCommand ( )
override

Destructeur.

◆ ChangeNamesCommand() [2/2]

ChangeNamesCommand::ChangeNamesCommand ( const ChangeNamesCommand & )
private
Here is the call graph for this function:

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: