Code_TYMPAN  4.4.0
Industrial site acoustic simulation
Public Slots | Signals | Public Member Functions | Protected Attributes | List of all members
TYActionManager Class Reference

Gere les undos. More...

#include <TYActionManager.h>

Inheritance diagram for TYActionManager:
Inheritance graph
[legend]
Collaboration diagram for TYActionManager:
Collaboration graph
[legend]

Public Slots

void undo ()
 Annule la derniere action. More...
 
void redo ()
 Effectue a nouveau la derniere action annulee. More...
 
void setHistorySize (int size)
 Definit la taille de l'historique. More...
 
void reset ()
 Reinitialise l'historique. More...
 

Signals

void undoRedoChanged (bool undoAvailable, bool redoAvailable, const QString &undoCmd, const QString &redoCmd)
 Indique l'etat de ce ActionManager. More...
 
void modificationChanged (bool modified)
 Indique si un undo ou un redo a ete fait. More...
 

Public Member Functions

 TYActionManager (int size)
 Constructeur. More...
 
virtual ~TYActionManager ()
 Destructeur. More...
 
void setModified (bool modified)
 Set/Get de l'etat du manager. More...
 
bool getModified () const
 Set/Get de l'etat du manager. More...
 
void addAction (TYAction *pAction)
 Ajoute une nouvelle action a l'historique. More...
 
void emitUndoRedo ()
 Envoie un signal informant sur l'etat de ce ActionManager. More...
 
int getHistorySize ()
 Retourne la taille de l'historique. More...
 

Protected Attributes

QList< TYAction * > _history
 L'historique des actions. More...
 
int _current
 Index de l'action courante. More...
 
int _savedAt
 Index de l'action a laquelle une sauvegarde a ete effectuee. More...
 
int _size
 Nombre maximum d'actions pour l'historique. More...
 
bool _modified
 Indique l'etat du manager. More...
 

Detailed Description

Gere les undos.

Definition at line 39 of file TYActionManager.h.

Constructor & Destructor Documentation

◆ TYActionManager()

TYActionManager::TYActionManager ( int  size)

Constructeur.

Definition at line 28 of file TYActionManager.cpp.

◆ ~TYActionManager()

TYActionManager::~TYActionManager ( )
virtual

Destructeur.

Definition at line 30 of file TYActionManager.cpp.

Member Function Documentation

◆ addAction()

void TYActionManager::addAction ( TYAction pAction)

Ajoute une nouvelle action a l'historique.

Definition at line 38 of file TYActionManager.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ emitUndoRedo()

void TYActionManager::emitUndoRedo ( )

Envoie un signal informant sur l'etat de ce ActionManager.

Definition at line 82 of file TYActionManager.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getHistorySize()

int TYActionManager::getHistorySize ( )
inline

Retourne la taille de l'historique.

Definition at line 85 of file TYActionManager.h.

Here is the caller graph for this function:

◆ getModified()

bool TYActionManager::getModified ( ) const
inline

Set/Get de l'etat du manager.

Definition at line 64 of file TYActionManager.h.

◆ modificationChanged

void TYActionManager::modificationChanged ( bool  modified)
signal

Indique si un undo ou un redo a ete fait.

Here is the caller graph for this function:

◆ redo

void TYActionManager::redo ( )
slot

Effectue a nouveau la derniere action annulee.

Definition at line 144 of file TYActionManager.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reset

void TYActionManager::reset ( )
slot

Reinitialise l'historique.

Definition at line 188 of file TYActionManager.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setHistorySize

void TYActionManager::setHistorySize ( int  size)
slot

Definit la taille de l'historique.

Definition at line 168 of file TYActionManager.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setModified()

void TYActionManager::setModified ( bool  modified)

Set/Get de l'etat du manager.

Definition at line 119 of file TYActionManager.cpp.

◆ undo

void TYActionManager::undo ( )
slot

Annule la derniere action.

Definition at line 131 of file TYActionManager.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ undoRedoChanged

void TYActionManager::undoRedoChanged ( bool  undoAvailable,
bool  redoAvailable,
const QString &  undoCmd,
const QString &  redoCmd 
)
signal

Indique l'etat de ce ActionManager.

Here is the caller graph for this function:

Member Data Documentation

◆ _current

int TYActionManager::_current
protected

Index de l'action courante.

Definition at line 134 of file TYActionManager.h.

◆ _history

QList<TYAction*> TYActionManager::_history
protected

L'historique des actions.

Definition at line 131 of file TYActionManager.h.

◆ _modified

bool TYActionManager::_modified
protected

Indique l'etat du manager.

Definition at line 143 of file TYActionManager.h.

◆ _savedAt

int TYActionManager::_savedAt
protected

Index de l'action a laquelle une sauvegarde a ete effectuee.

Definition at line 137 of file TYActionManager.h.

◆ _size

int TYActionManager::_size
protected

Nombre maximum d'actions pour l'historique.

Definition at line 140 of file TYActionManager.h.


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