Undo/Redo action for removing entries. More...
#include <FdCommandsJournal.hpp>
Public Member Functions | |
FdJournalRemove (FdModelJournal *journal, QList< FdItemJournal_p > entries) | |
void | redo () |
void | undo () |
Private Attributes | |
FdModelJournal * | mJournal |
QList< FdItemJournal_p > | mEntries |
Undo/Redo action for removing entries.
This QUndoCommand make it possible to undo/redo suppression of rows.
The constructor will get a QList of pointers to the corresponding FdItemJournal. Index of entries is neither absolute nor user defined. For example, FdModelJournal::orderByDate() can't be undone and changes entries order. Hence the need of storing FdItemJournal_p instead of indexes.
By calling redo(), deleted entries will be append at the end of the journal.
Definition at line 54 of file FdCommandsJournal.hpp.
FdJournalRemove::FdJournalRemove | ( | FdModelJournal * | journal, |
QList< FdItemJournal_p > | entries | ||
) |
Definition at line 63 of file FdCommandsJournal.cpp.
void FdJournalRemove::redo | ( | ) |
Definition at line 68 of file FdCommandsJournal.cpp.
void FdJournalRemove::undo | ( | ) |
Definition at line 73 of file FdCommandsJournal.cpp.
|
private |
Definition at line 62 of file FdCommandsJournal.hpp.
|
private |
Definition at line 61 of file FdCommandsJournal.hpp.