Scribus
Open source desktop publishing at your fingertips
UndoPalette Class Reference

UndoGui subclass which creates an undo history window. More...

#include <undogui.h>

Inheritance diagram for UndoPalette:
Collaboration diagram for UndoPalette:

Public Slots

void languageChange ()
 Sets GUI strings on language change.
 
void insertUndoItem (UndoObject *target, UndoState *state)
 Insert a new undo item. More...
 
void insertRedoItem (UndoObject *target, UndoState *state)
 Insert a new redo item. More...
 
void updateUndo (int steps)
 Update undo stack representation with number of steps. More...
 
void updateRedo (int steps)
 Update redo stack representation with number of steps. More...
 
void clearRedo ()
 Clear the redo action items.
 
void popBack ()
 Remove the last (oldest) item from the undo stack representation.
 
void updateFromPrefs ()
 Recieve prefsChanged() signal to update shortcuts.
 
- Public Slots inherited from UndoGui
virtual void insertUndoItem (UndoObject *target, UndoState *state)=0
 Insert a new undo item. More...
 
virtual void insertRedoItem (UndoObject *target, UndoState *state)=0
 Insert a new redo item. More...
 
virtual void updateUndo (int steps)=0
 Update undo stack representation with number of steps. More...
 
virtual void updateRedo (int steps)=0
 Update redo stack representation with number of steps. More...
 
virtual void clearRedo ()=0
 Clear the redo action items.
 
virtual void popBack ()=0
 Remove the last (oldest) item from the undo stack representation.
 
- Public Slots inherited from ScDockPalette
virtual void setPaletteShown (bool)
 
virtual void setFontSize ()
 

Signals

void objectMode (bool isEnabled)
 Emitted when undo behaviour should be changed from global undo. More...
 
void undo (int steps)
 Emitted when undo is requested. More...
 
void redo (int steps)
 Emitted when redo is requested. More...
 
- Signals inherited from ScDockPalette
void paletteShown (bool)
 Let the action for this palette know when something changes and it hasnt caused it.
 

Public Member Functions

 UndoPalette (QWidget *parent=0, const char *name=0)
 Creates a new UndoPalette instance. More...
 
 ~UndoPalette ()
 Destroys the widget.
 
virtual void changeEvent (QEvent *e)
 
void clear ()
 Empties the undo stack for this widget.
 
virtual void updateUndoActions ()
 Update the scrActions.
 
- Public Member Functions inherited from UndoGui
 UndoGui (QWidget *parent=0, const char *name="UndoGui", Qt::WindowFlags f=0)
 Creates a new UndoGui instance. More...
 
virtual ~UndoGui ()
 Destroys the widget.
 
virtual void languageChange ()
 Sets GUI strings on language change.
 
- Public Member Functions inherited from ScDockPalette
 ScDockPalette (QWidget *parent=NULL, const QString &prefsContext=QString::null, Qt::WindowFlags f=0)
 
virtual void hide ()
 Sample way to grab keystrokes, simply calls superclass at this point.
 
void startup ()
 

Additional Inherited Members

- Protected Member Functions inherited from ScDockPalette
virtual void setPrefsContext (QString context)
 Set the Preferences context to be used for storage of startup visibility and position and size.
 
void storePosition ()
 
void storePosition (int newX, int newY)
 
void storeSize ()
 
void storeVisibility (bool)
 
void storeDockState ()
 
virtual void showEvent (QShowEvent *showEvent)
 Restore the geometry of the window when showing it.
 
virtual void closeEvent (QCloseEvent *closeEvent)
 Captures the close event and changes it to hide.
 
virtual void hideEvent (QHideEvent *)
 Stores the geometry of the window when hiding.
 
- Protected Attributes inherited from ScDockPalette
PrefsContextpalettePrefs
 
QString prefsContextName
 
bool visibleOnStartup
 
QWidget * originalParent
 
QWidget * tempParent
 

Detailed Description

UndoGui subclass which creates an undo history window.

Provides a regular undo history window where a user can click on any action and related undo/redo steps are taken. Undo steps are represented as a QListBox where there can be an image to describe the action visually, the name of the object and the name of the action per row.

Author
Riku Leino tsoot.nosp@m.s@gm.nosp@m.ail.c.nosp@m.om
Date
December 2004

Constructor & Destructor Documentation

UndoPalette::UndoPalette ( QWidget *  parent = 0,
const char *  name = 0 
)

Creates a new UndoPalette instance.

Creates a new UndoPalette instance. After creation of an UndoPalette it must be registered to the UndoManager with UndoManager's registerGui() method.

Member Function Documentation

void UndoPalette::insertRedoItem ( UndoObject target,
UndoState state 
)
slot

Insert a new redo item.

Parameters
targetTarget of the redo action
stateState describing the action
void UndoPalette::insertUndoItem ( UndoObject target,
UndoState state 
)
slot

Insert a new undo item.

Insert a new undo item. After an undoable action has happened and if this UndoGui is registered to the UndoManager this slot will be used to register the action to the widget.

Parameters
targetTarget of the undo action
stateState describing the action
void UndoPalette::objectMode ( bool  isEnabled)
signal

Emitted when undo behaviour should be changed from global undo.

to object specific undo and other way around.

Parameters
isEnabledtrue if object specific undo is wanted, false for global undo
void UndoPalette::redo ( int  steps)
signal

Emitted when redo is requested.

When redo action is done by this class this signal is emitted.

Parameters
stepsHow many redo steps to take
void UndoPalette::undo ( int  steps)
signal

Emitted when undo is requested.

When undo action is done by this class this signal is emitted.

Parameters
stepsHow many undo steps to take
void UndoPalette::updateRedo ( int  steps)
slot

Update redo stack representation with number of steps.

When some other UndoGui subclass has received a redo request this slot is used to inform this UndoGui to update it's UndoStack representation.

Parameters
stepsNumber of steps to take
void UndoPalette::updateUndo ( int  steps)
slot

Update undo stack representation with number of steps.

When some other UndoGui subclass has received an undo request this slot is used to inform this UndoGui to update it's UndoStack representation.

Parameters
stepsNumber of steps to take

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