Logo Search packages:      
Sourcecode: rosegarden version File versions

MultiViewCommandHistory Class Reference

#include <multiviewcommandhistory.h>

List of all members.

Detailed Description

The MultiViewCommandHistory class is much like KCommandHistory in that it stores a list of executed commands and maintains Undo and Redo actions synchronised with those commands.

The difference is that MultiViewCommandHistory allows you to associate more than one Undo and Redo action with the same command history, and it keeps them all up-to-date at once. This makes it effective in systems where multiple views may be editing the same data at once.

Definition at line 44 of file multiviewcommandhistory.h.

Public Slots

virtual void documentSaved ()


void commandExecuted ()
void commandExecuted (KCommand *)
void documentRestored ()

Public Member Functions

void addCommand (KCommand *command, bool execute=true)
void attachView (KActionCollection *collection)
void clear ()
void detachView (KActionCollection *collection)
int redoLimit ()
void setRedoLimit (int limit)
 Set the maximum number of items in the redo history.
void setUndoLimit (int limit)
 Set the maximum number of items in the undo history.
int undoLimit ()

Protected Slots

void slotRedo ()
void slotRedoAboutToShow ()
void slotRedoActivated (int)
void slotUndo ()
void slotUndoAboutToShow ()
void slotUndoActivated (int)

Private Types

typedef std::stack< KCommand * > CommandStack
typedef std::set
< KActionCollection * > 

Private Member Functions

void clearStack (CommandStack &stack)
void clipCommands ()
void clipStack (CommandStack &stack, int limit)
void updateButton (bool undo, const QString &name, CommandStack &stack)
void updateButtons ()
void updateMenu (bool undo, const QString &name, CommandStack &stack)

Private Attributes

int m_redoLimit
CommandStack m_redoStack
int m_savedAt
int m_undoLimit
CommandStack m_undoStack
ViewSet m_views

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index