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>
|
|
void | slot_save () |
| | slot_save stores the current state of mip.
|
| |
|
|
void | sig_historyChanged () |
| | sig_historyChanged is emitted whenever a new state is added to the history.
|
| |
|
| | 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.
|
| |
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
◆ History()
History creates a history for the given mip.
- Parameters
-
◆ 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()
redo restores the future state of mip if one was saved.
- Returns
- returns true if a future state was restored
◆ 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:
- iVS3D/src/iVS3D-core/model/data/history.h
- iVS3D/src/iVS3D-core/model/data/history.cpp