UndoPalette Class Reference
UndoGui subclass which creates an undo history window. More...
#include <undogui.h>


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.
- Date:
- December 2004
Definition at line 254 of file undogui.h.
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.
Definition at line 227 of file undogui.cpp.
References currentSelection, initialRedoKS, initialUndoKS, PrefsManager::instance(), languageChange(), loadIcon(), objectBox, objectCheckBoxClicked(), ScribusCore::primaryMainWindow(), redoButton, redoClicked(), redoItems, removeToolTip(), ScCore, ScribusMainWindow::scrActions, showToolTip(), undoButton, undoClicked(), undoList, undoListClicked(), and updateFromPrefs().
| UndoPalette::~UndoPalette | ( | ) |
Member Function Documentation
| void UndoPalette::updateList | ( | ) | [private] |
Definition at line 377 of file undogui.cpp.
References currentSelection, redoButton, UndoPalette::UndoItem::setUndoAction(), undoButton, and undoList.
Referenced by insertRedoItem(), insertUndoItem(), undoListClicked(), updateRedo(), and updateUndo().
| void UndoPalette::removeRedoItems | ( | ) | [private] |
| void UndoPalette::undoClicked | ( | ) | [private, slot] |
| void UndoPalette::redoClicked | ( | ) | [private, slot] |
| 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] |
| void UndoPalette::changeEvent | ( | QEvent * | e | ) | [virtual] |
| 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] |
| 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::currentSelection [private] |
Definition at line 259 of file undogui.h.
Referenced by clearRedo(), insertRedoItem(), insertUndoItem(), popBack(), undoListClicked(), UndoPalette(), updateList(), updateRedo(), and updateUndo().
int UndoPalette::redoItems [private] |
QListWidget* UndoPalette::undoList [private] |
Definition at line 261 of file undogui.h.
Referenced by clear(), clearRedo(), insertRedoItem(), insertUndoItem(), popBack(), removeToolTip(), showToolTip(), undoListClicked(), UndoPalette(), updateList(), updateRedo(), and updateUndo().
QCheckBox* UndoPalette::objectBox [private] |
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] |
QKeySequence UndoPalette::initialRedoKS [private] |
The documentation for this class was generated from the following files:
