MementoController Class Reference

Subcontroller which handles all user interaction with the undo and redo buttons on the user interface. Communicates with other controllers to realize the memento pattern. More...

#include <RobotComponents/gui-plugins/RobotTrajectoryDesignerGuiPlugin/Controller/MementoController.h>

+ Inheritance diagram for MementoController:

Public Slots

void enableRedoButton (bool enable)
 Enables or disables the redo button. More...
 
void enableRedoButtonVisualization (bool enable)
 Enables or disables the redo button. More...
 
void enableUndoButton (bool enable)
 Enables or disables the undo button. More...
 

Signals

void redo ()
 Notifies other controllers about redoing the lastly undone operation. More...
 
void undo ()
 Notifies other controllers about undoing the lastly executed operation. More...
 

Public Member Functions

QPushButton * getRedoButton ()
 Getter for the redo button. More...
 
QPushButton * getUndoButton ()
 Getter for the undo button. More...
 
 MementoController (QPushButton *undoButton, QPushButton *redoButton)
 Creates a new MementoController with two given push buttons realizing the undo and redo operations. More...
 
void onConnectComponent () override
 
void onDisconnectComponent () override
 
void onExitComponent () override
 
void onInitComponent () override
 

Detailed Description

Subcontroller which handles all user interaction with the undo and redo buttons on the user interface. Communicates with other controllers to realize the memento pattern.

Definition at line 36 of file MementoController.h.

Constructor & Destructor Documentation

◆ MementoController()

MementoController ( QPushButton *  undoButton,
QPushButton *  redoButton 
)

Creates a new MementoController with two given push buttons realizing the undo and redo operations.

Parameters
undoButtonPush button realizing the undo operation
redoButtonPush button realizing the redo operation

Definition at line 57 of file MementoController.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ enableRedoButton

void enableRedoButton ( bool  enable)
slot

Enables or disables the redo button.

Parameters
enableDetermines whether to enable or disable the redo button

Definition at line 89 of file MementoController.cpp.

+ Here is the caller graph for this function:

◆ enableRedoButtonVisualization

void enableRedoButtonVisualization ( bool  enable)
slot

Enables or disables the redo button.

Parameters
enableDetermines whether to enable or disable the redo button

Definition at line 96 of file MementoController.cpp.

◆ enableUndoButton

void enableUndoButton ( bool  enable)
slot

Enables or disables the undo button.

Parameters
enableDetermines whether to enable or disable the undo button

Definition at line 105 of file MementoController.cpp.

+ Here is the caller graph for this function:

◆ getRedoButton()

QPushButton * getRedoButton ( )

Getter for the redo button.

Returns
Push button realizing the redo operation

Definition at line 71 of file MementoController.cpp.

◆ getUndoButton()

QPushButton * getUndoButton ( )

Getter for the undo button.

Returns
Push button realizing the undo operation

Definition at line 65 of file MementoController.cpp.

◆ onConnectComponent()

void onConnectComponent ( )
overridevirtual
See also
AbstractController

Implements AbstractController.

Definition at line 36 of file MementoController.cpp.

+ Here is the caller graph for this function:

◆ onDisconnectComponent()

void onDisconnectComponent ( )
overridevirtual
See also
AbstractController

Implements AbstractController.

Definition at line 46 of file MementoController.cpp.

◆ onExitComponent()

void onExitComponent ( )
overridevirtual
See also
AbstractController

Implements AbstractController.

Definition at line 52 of file MementoController.cpp.

◆ onInitComponent()

void onInitComponent ( )
overridevirtual
See also
AbstractController

Implements AbstractController.

Definition at line 27 of file MementoController.cpp.

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

◆ redo

void redo ( )
signal

Notifies other controllers about redoing the lastly undone operation.

◆ undo

void undo ( )
signal

Notifies other controllers about undoing the lastly executed operation.


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