summaryrefslogtreecommitdiffabout
path: root/kaddressbook/undo.h
Unidiff
Diffstat (limited to 'kaddressbook/undo.h') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/undo.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/kaddressbook/undo.h b/kaddressbook/undo.h
index 843bc26..a8ba2ee 100644
--- a/kaddressbook/undo.h
+++ b/kaddressbook/undo.h
@@ -16,25 +16,25 @@
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
19 As a special exception, permission is given to link this program 19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23 23
24#ifndef UNDO_H 24#ifndef UNDO_H
25#define UNDO_H 25#define UNDO_H
26 26
27#include <qobject.h> 27#include <qobject.h>
28#include <qptrstack.h> 28#include <q3ptrstack.h>
29#include <qstring.h> 29#include <qstring.h>
30 30
31class Command 31class Command
32{ 32{
33public: 33public:
34 Command() {} 34 Command() {}
35 virtual ~Command() {}; 35 virtual ~Command() {};
36 virtual QString name() = 0; 36 virtual QString name() = 0;
37 virtual void redo() = 0; // egcs requires these methods to have 37 virtual void redo() = 0; // egcs requires these methods to have
38 virtual void undo() = 0; // implementations (Seems like a bug) 38 virtual void undo() = 0; // implementations (Seems like a bug)
39 // pure virtual may not work 39 // pure virtual may not work
40}; 40};
@@ -58,25 +58,25 @@ class StackBase : public QObject
58 Command *top(); 58 Command *top();
59 void clear(); 59 void clear();
60 60
61 signals: 61 signals:
62 void changed(); 62 void changed();
63 63
64 protected: 64 protected:
65 /** Protect the pop method so users must call undo/redo to properly 65 /** Protect the pop method so users must call undo/redo to properly
66 * use the stack, however the subclasses need it to modify the stack. 66 * use the stack, however the subclasses need it to modify the stack.
67 */ 67 */
68 Command *pop(); 68 Command *pop();
69 69
70 QPtrStack<Command> mCommandStack; 70 Q3PtrStack<Command> mCommandStack;
71}; 71};
72 72
73class UndoStack : public StackBase 73class UndoStack : public StackBase
74{ 74{
75public: 75public:
76 static UndoStack *instance(); 76 static UndoStack *instance();
77 void undo(); 77 void undo();
78 78
79protected: 79protected:
80 UndoStack(); 80 UndoStack();
81 static UndoStack* instance_; 81 static UndoStack* instance_;
82}; 82};