comparison base/CommandHistory.h @ 44:701404725897

* Use commands for add/delete pane in main window * Add compound command collection to command history (for add pane, import file etc) * Add hide/show pane and hidden pane list to PaneStack * Various other fixes
author Chris Cannam
date Mon, 13 Mar 2006 17:55:19 +0000
parents 2fb933f88604
children 5364a9d338a2
comparison
equal deleted inserted replaced
43:b8aae4f883b7 44:701404725897
26 #include <stack> 26 #include <stack>
27 #include <set> 27 #include <set>
28 #include <map> 28 #include <map>
29 29
30 class Command; 30 class Command;
31 class MacroCommand;
31 class QAction; 32 class QAction;
32 class QMenu; 33 class QMenu;
33 class QToolBar; 34 class QToolBar;
34 35
35 /** 36 /**
68 int redoLimit() { return m_redoLimit; } 69 int redoLimit() { return m_redoLimit; }
69 70
70 /// Set the maximum number of items in the redo history. 71 /// Set the maximum number of items in the redo history.
71 void setRedoLimit(int limit); 72 void setRedoLimit(int limit);
72 73
74 /// Start recording commands to batch up into a single compound command.
75 void startCompoundOperation(QString name, bool execute);
76
77 /// Finish recording commands and store the compound command.
78 void endCompoundOperation();
79
73 public slots: 80 public slots:
74 /** 81 /**
75 * Checkpoint function that should be called when the document is 82 * Checkpoint function that should be called when the document is
76 * saved. If the undo/redo stack later returns to the point at 83 * saved. If the undo/redo stack later returns to the point at
77 * which the document was saved, the documentRestored signal will 84 * which the document was saved, the documentRestored signal will
141 148
142 int m_undoLimit; 149 int m_undoLimit;
143 int m_redoLimit; 150 int m_redoLimit;
144 int m_savedAt; 151 int m_savedAt;
145 152
153 MacroCommand *m_currentMacro;
154 bool m_executeMacro;
155 void addToMacro(Command *command);
156
146 void updateActions(); 157 void updateActions();
147 158
148 void clipCommands(); 159 void clipCommands();
149 160
150 void clipStack(CommandStack &stack, int limit); 161 void clipStack(CommandStack &stack, int limit);