MementoController Class Reference

Subcontroller which handles all user interaction with the undo and redo buttons on the user interface. 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.
 
void enableRedoButtonVisualization (bool enable)
 Enables or disables the redo button.
 
void enableUndoButton (bool enable)
 Enables or disables the undo button.
 

Signals

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

Public Member Functions

QPushButton * getRedoButton ()
 Getter for the redo button.
 
QPushButton * getUndoButton ()
 Getter for the undo button.
 
 MementoController (QPushButton *undoButton, QPushButton *redoButton)
 Creates a new MementoController with two given push buttons realizing the undo and redo operations.
 
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.

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

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

◆ enableRedoButtonVisualization

void enableRedoButtonVisualization ( bool enable)
slot

Enables or disables the redo button.

Parameters
enableDetermines whether to enable or disable the redo button

◆ enableUndoButton

void enableUndoButton ( bool enable)
slot

Enables or disables the undo button.

Parameters
enableDetermines whether to enable or disable the undo button

◆ getRedoButton()

QPushButton * getRedoButton ( )

Getter for the redo button.

Returns
Push button realizing the redo operation

◆ getUndoButton()

QPushButton * getUndoButton ( )

Getter for the undo button.

Returns
Push button realizing the undo operation

◆ onConnectComponent()

void onConnectComponent ( )
overridevirtual

◆ onDisconnectComponent()

void onDisconnectComponent ( )
overridevirtual

◆ onExitComponent()

void onExitComponent ( )
overridevirtual

◆ onInitComponent()

void onInitComponent ( )
overridevirtual

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