Scribus Developer Documentation - API
logo-pen

Scribus Developer Documentation - API

UndoPalette Class Reference

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

#include <undogui.h>

Inheritance diagram for UndoPalette:

Inheritance graph
[legend]
Collaboration diagram for UndoPalette:

Collaboration graph
[legend]

List of all members.

Public Slots

void languageChange ()
 Sets GUI strings on language change.
void insertUndoItem (UndoObject *target, UndoState *state)
 Insert a new undo item.
void insertRedoItem (UndoObject *target, UndoState *state)
 Insert a new redo item.
void updateUndo (int steps)
 Update undo stack representation with number of steps.
void updateRedo (int steps)
 Update redo stack representation with number of steps.
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.

Signals

void objectMode (bool isEnabled)
 Emitted when undo behaviour should be changed from global undo.
void undo (int steps)
 Emitted when undo is requested.
void redo (int steps)
 Emitted when redo is requested.

Public Member Functions

 UndoPalette (QWidget *parent=0, const char *name=0)
 Creates a new UndoPalette instance.
 ~UndoPalette ()
 Destroys the widget.
virtual void changeEvent (QEvent *e)
void clear ()
 Empties the undo stack for this widget.
virtual void updateUndoActions ()
 Update the scrActions.

Private Slots

void undoClicked ()
void redoClicked ()
void undoListClicked (int i)
void showToolTip (QListWidgetItem *i)
void removeToolTip ()
void objectCheckBoxClicked (bool on)

Private Member Functions

void updateList ()
void removeRedoItems ()

Private Attributes

int currentSelection
int redoItems
QListWidget * undoList
QCheckBox * objectBox
QPushButton * undoButton
QPushButton * redoButton
QKeySequence initialUndoKS
QKeySequence initialRedoKS

Classes

class  UndoItem
 UndoItem provides a custom QListBoxItem for the undo history view. More...


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 tsoots@gmail.com
Date:
December 2004

Definition at line 254 of file undogui.h.


Constructor & Destructor Documentation

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

UndoPalette::~UndoPalette (  ) 

Destroys the widget.

Definition at line 469 of file undogui.cpp.


Member Function Documentation

void UndoPalette::updateList (  )  [private]

void UndoPalette::removeRedoItems (  )  [private]

void UndoPalette::undoClicked (  )  [private, slot]

Definition at line 414 of file undogui.cpp.

References undo().

Referenced by UndoPalette().

void UndoPalette::redoClicked (  )  [private, slot]

Definition at line 420 of file undogui.cpp.

References redo().

Referenced by UndoPalette().

void UndoPalette::undoListClicked ( int  i  )  [private, slot]

Definition at line 426 of file undogui.cpp.

References currentSelection, redo(), undo(), undoList, and updateList().

Referenced by clear(), and UndoPalette().

void UndoPalette::showToolTip ( QListWidgetItem *  i  )  [private, slot]

Definition at line 447 of file undogui.cpp.

References UndoPalette::UndoItem::getDescription(), removeToolTip(), and undoList.

Referenced by UndoPalette().

void UndoPalette::removeToolTip (  )  [private, slot]

Definition at line 462 of file undogui.cpp.

References undoList.

Referenced by showToolTip(), and UndoPalette().

void UndoPalette::objectCheckBoxClicked ( bool  on  )  [private, slot]

Definition at line 440 of file undogui.cpp.

References objectMode().

Referenced by UndoPalette().

void UndoPalette::changeEvent ( QEvent *  e  )  [virtual]

Definition at line 296 of file undogui.cpp.

References languageChange().

void UndoPalette::clear (  )  [virtual]

Empties the undo stack for this widget.

Implements UndoGui.

Definition at line 276 of file undogui.cpp.

References redoButton, tr(), undoButton, undoList, and undoListClicked().

void UndoPalette::updateUndoActions (  )  [virtual]

Update the scrActions.

Implements UndoGui.

Definition at line 399 of file undogui.cpp.

void UndoPalette::languageChange (  )  [slot]

Sets GUI strings on language change.

Definition at line 306 of file undogui.cpp.

References objectBox, redoButton, tr(), and undoButton.

Referenced by changeEvent(), and UndoPalette().

void UndoPalette::insertUndoItem ( UndoObject target,
UndoState state 
) [virtual, 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:
target Target of the undo action
state State describing the action

Implements UndoGui.

Definition at line 314 of file undogui.cpp.

References clearRedo(), currentSelection, UndoState::getDescription(), UndoState::getName(), UndoState::getPixmap(), UndoObject::getUName(), UndoObject::getUPixmap(), undoList, and updateList().

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

Insert a new redo item.

Parameters:
target Target of the redo action
state State describing the action

Implements UndoGui.

Definition at line 326 of file undogui.cpp.

References currentSelection, UndoState::getDescription(), UndoState::getName(), UndoState::getPixmap(), UndoObject::getUName(), UndoObject::getUPixmap(), undoList, and updateList().

void UndoPalette::updateUndo ( int  steps  )  [virtual, 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:
steps Number of steps to take

Implements UndoGui.

Definition at line 343 of file undogui.cpp.

References currentSelection, undoList, and updateList().

void UndoPalette::updateRedo ( int  steps  )  [virtual, 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:
steps Number of steps to take

Implements UndoGui.

Definition at line 354 of file undogui.cpp.

References currentSelection, undoList, and updateList().

void UndoPalette::clearRedo (  )  [virtual, slot]

Clear the redo action items.

Implements UndoGui.

Definition at line 405 of file undogui.cpp.

References currentSelection, and undoList.

Referenced by insertUndoItem().

void UndoPalette::popBack (  )  [virtual, slot]

Remove the last (oldest) item from the undo stack representation.

Implements UndoGui.

Definition at line 365 of file undogui.cpp.

References currentSelection, and undoList.

void UndoPalette::updateFromPrefs (  )  [slot]

Recieve prefsChanged() signal to update shortcuts.

Definition at line 288 of file undogui.cpp.

References ScribusCore::primaryMainWindow(), redoButton, ScCore, ScribusMainWindow::scrActions, and undoButton.

Referenced by UndoPalette().

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:
isEnabled true if object specific undo is wanted, false for global undo

Referenced by objectCheckBoxClicked().

void UndoPalette::undo ( int  steps  )  [signal]

Emitted when undo is requested.

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

Parameters:
steps How many undo steps to take

Referenced by undoClicked(), and undoListClicked().

void UndoPalette::redo ( int  steps  )  [signal]

Emitted when redo is requested.

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

Parameters:
steps How many redo steps to take

Referenced by redoClicked(), and undoListClicked().


Member Data Documentation

int UndoPalette::redoItems [private]

Definition at line 260 of file undogui.h.

Referenced by UndoPalette().

QListWidget* UndoPalette::undoList [private]

QCheckBox* UndoPalette::objectBox [private]

Definition at line 262 of file undogui.h.

Referenced by languageChange(), and UndoPalette().

QPushButton* UndoPalette::undoButton [private]

Definition at line 263 of file undogui.h.

Referenced by clear(), languageChange(), UndoPalette(), updateFromPrefs(), and updateList().

QPushButton* UndoPalette::redoButton [private]

Definition at line 264 of file undogui.h.

Referenced by clear(), languageChange(), UndoPalette(), updateFromPrefs(), and updateList().

QKeySequence UndoPalette::initialUndoKS [private]

Definition at line 265 of file undogui.h.

Referenced by UndoPalette().

QKeySequence UndoPalette::initialRedoKS [private]

Definition at line 266 of file undogui.h.

Referenced by UndoPalette().


The documentation for this class was generated from the following files:
Created with personalized Doxygen. This is documentation for GPL software Scribus - Open Source Desktop Publishing.