FreeDebks  1.0.3
 All Classes Files Functions Variables Friends Pages
FdCommandsJournal.hpp
Go to the documentation of this file.
1 // --------------------------------------------------------------------
2 // Copyright © 2011-2013 Mathieu Schopfer
3 //
4 // This file is part of FreeDebks.
5 //
6 // FreeDebks is free software: you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation, either version 3 of the License, or
9 // (at your option) any later version.
10 //
11 // FreeDebks is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License
17 // along with FreeDebks. If not, see <http://www.gnu.org/licenses/>.
18 // --------------------------------------------------------------------
19 
20 #ifndef FDCOMMANDSJOURNAL_HPP
21 #define FDCOMMANDSJOURNAL_HPP
22 
23 #include <QUndoCommand>
24 
25 #include "dataDefinitions.hpp"
26 
28 
31 class FdJournalSetData : public QUndoCommand
32 {
33 private:
35  FdItemJournal_p mEntry;
36  JournalColumn mColumn;
37  QVariant mOldValue;
38  QVariant mNewValue;
39 
40 public:
41  FdJournalSetData(FdModelJournal* journal, FdItemJournal_p entry, JournalColumn column, QVariant newValue, QUndoCommand* parent = 0);
42  void redo();
43  void undo();
44 };
45 
47 
54 class FdJournalRemove : public QUndoCommand
55 {
56 public:
57  FdJournalRemove(FdModelJournal* journal, QList<FdItemJournal_p> entries);
58  void redo();
59  void undo();
60 private:
62  QList<FdItemJournal_p> mEntries;
63 };
64 
65 #endif // FDCOMMANDSJOURNAL_HPP