aboutsummaryrefslogtreecommitdiff
path: root/ports-mgmt/barry/files/patch-history.h
blob: 8d02392e68d8ad0f6311d6d8ce6f1df1d9c3edc3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
--- src/history.h.bak	Sun Jun  8 22:09:10 2003
+++ src/history.h	Sun Apr 24 02:18:42 2005
@@ -22,44 +22,7 @@
 
 namespace Barry
 {
-	class History;
-
-	class Command
-	{
-		public:
-			enum CreationFlags {
-				None = 0x0, Run = 0x1, Register = 0x2
-			};
-			virtual ~Command();
-
-			template <class T>
-			static T *create( CreationFlags flags = None )
-			{
-				T *cmd = new T;
-				if ( flags & Register )
-					History::self().registerCommand( cmd );
-				if ( flags & Run )
-					cmd->exec();
-				return cmd;
-			}
-
-			void unexec();
-			void exec();
-			virtual QString text() const = 0;
-
-		protected:
-			Command();
-			bool executed() const { return m_executed; }
-
-		private:
-			Command( const Command &rhs );
-			Command &operator=( const Command &rhs );
-
-			virtual void doExec() = 0;
-			virtual void doUnexec() = 0;
-
-			bool m_executed;
-	};
+	class Command;
 
 	class History : public QObject
 	{
@@ -100,6 +63,43 @@
 			unsigned int m_maxEntries;
 			KToolBarPopupAction *m_backAction;
 			KToolBarPopupAction *m_forwardAction;
+	};
+
+	class Command
+	{
+		public:
+			enum CreationFlags {
+				None = 0x0, Run = 0x1, Register = 0x2
+			};
+			virtual ~Command();
+
+			template <class T>
+			static T *create( CreationFlags flags = None )
+			{
+				T *cmd = new T;
+				if ( flags & Register )
+					History::self().registerCommand( cmd );
+				if ( flags & Run )
+					cmd->exec();
+				return cmd;
+			}
+
+			void unexec();
+			void exec();
+			virtual QString text() const = 0;
+
+		protected:
+			Command();
+			bool executed() const { return m_executed; }
+
+		private:
+			Command( const Command &rhs );
+			Command &operator=( const Command &rhs );
+
+			virtual void doExec() = 0;
+			virtual void doUnexec() = 0;
+
+			bool m_executed;
 	};
 };