iVS3D v2.0.0
Loading...
Searching...
No Matches
history.h
1#ifndef HISTORY_H
2#define HISTORY_H
3
4#include <QObject>
5#include "modelinputpictures.h"
6
21class History : public QObject
22{
23 Q_OBJECT
24public:
30 ~History();
35 bool hasFuture();
40 bool hasPast();
45 bool undo();
50 bool redo();
51
52
53 bool restoreState(int index);
54
55 int getCurrentIndex();
56
57 void clear();
58
59public slots:
63 void slot_save();
64
65signals:
70
71private:
72 ModelInputPictures *m_mip;
73 QVector<ModelInputPictures::Memento*> m_history;
74 int m_currentIndex;
75
76};
77
78#endif // HISTORY_H
The History class stores and restores historical states of ModelInputPictrues in order to provide und...
Definition history.h:22
bool redo()
redo restores the future state of mip if one was saved.
Definition history.cpp:44
bool hasPast()
hasPastchecks if there is a past state to restore.
Definition history.cpp:25
bool hasFuture()
hasFuture checks if there is a future state to restore.
Definition history.cpp:20
void sig_historyChanged()
sig_historyChanged is emitted whenever a new state is added to the history.
bool undo()
undo restores the past state of mip if one was saved.
Definition history.cpp:30
void slot_save()
slot_save stores the current state of mip.
Definition history.cpp:87
The ModelInputPictures class is responsible for saving all the Data regarding the input....
Definition modelinputpictures.h:41