iVS3D v2.0.0
Loading...
Searching...
No Matches
History Class Reference

The History class stores and restores historical states of ModelInputPictrues in order to provide undo and redo functionality. Therefor the current state of mip is stored by calling ore invoking slot_save(). undo() and redo() then allow to jump back and forth between these historical states. Saving a new state will whipe the "future" states (f.e. states that were discareded by undo()). This ensures a linear history. More...

#include <history.h>

Inheritance diagram for History:

Public Slots

void slot_save ()
 slot_save stores the current state of mip.
 

Signals

void sig_historyChanged ()
 sig_historyChanged is emitted whenever a new state is added to the history.
 

Public Member Functions

 History (ModelInputPictures *mip)
 History creates a history for the given mip.
 
bool hasFuture ()
 hasFuture checks if there is a future state to restore.
 
bool hasPast ()
 hasPastchecks if there is a past state to restore.
 
bool undo ()
 undo restores the past state of mip if one was saved.
 
bool redo ()
 redo restores the future state of mip if one was saved.
 

Detailed Description

The History class stores and restores historical states of ModelInputPictrues in order to provide undo and redo functionality. Therefor the current state of mip is stored by calling ore invoking slot_save(). undo() and redo() then allow to jump back and forth between these historical states. Saving a new state will whipe the "future" states (f.e. states that were discareded by undo()). This ensures a linear history.

Author
Dominik Wuest
Date
2022/05/16

Constructor & Destructor Documentation

◆ History()

History::History ( ModelInputPictures mip)

History creates a history for the given mip.

Parameters
mipthe ModelInputPictures object to store and restore

Member Function Documentation

◆ hasFuture()

bool History::hasFuture ( )

hasFuture checks if there is a future state to restore.

Returns
returns true if there is a state to restore on redo()

◆ hasPast()

bool History::hasPast ( )

hasPastchecks if there is a past state to restore.

Returns
returns true if there is a state to restore on undo()

◆ redo()

bool History::redo ( )

redo restores the future state of mip if one was saved.

Returns
returns true if a future state was restored

◆ undo()

bool History::undo ( )

undo restores the past state of mip if one was saved.

Returns
returns true if a past state was restored

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