UndoState describes an undoable state (action).
More...
#include <undostate.h>
UndoState describes an undoable state (action).
Undoable objects implement undo/redo by sending and receiving UndoState subclasses. This means that they will need to produce some sort of information for the UndoState subclass (if no suitable subclass exists it must be also created) and later they will need to be able to restore the state described by the subclass to apply undo/redo.
UndoManager will handle the deletion of UndoState objects.
- See also
- SimpleState
- Author
- Riku Leino riku@.nosp@m.scri.nosp@m.bus.i.nosp@m.nfo
- Date
- December 2004
UndoState::UndoState |
( |
const QString & |
name, |
|
|
const QString & |
description = 0 , |
|
|
QPixmap * |
pixmap = 0 |
|
) |
| |
Creates a new UndoState instance.
- Parameters
-
name | Name of the state (action). Will be used when describing the state in UndoGui subclasses. |
description | Description of the state (action) |
pixmap | Pointer to an icon describing the action visually. |
QString UndoState::getDescription |
( |
| ) |
|
|
virtual |
Returns description of the state.
- Returns
- description of the state
QString UndoState::getName |
( |
| ) |
|
|
virtual |
Returns name of the state (action).
- Returns
- name of the state
QPixmap * UndoState::getPixmap |
( |
| ) |
|
|
virtual |
Returns a pointer to the icon attached to the state.
- Returns
- A pointer to the icon attached to the state
void UndoState::setDescription |
( |
const QString & |
newDescription | ) |
|
|
virtual |
Set the description for this UndoState.
- Parameters
-
void UndoState::setName |
( |
const QString & |
newName | ) |
|
|
virtual |
void UndoState::setPixmap |
( |
QPixmap * |
newPixmap | ) |
|
|
virtual |
The documentation for this class was generated from the following files:
- /Users/ale/src/Scribus/scribus/undostate.h
- /Users/ale/src/Scribus/scribus/undostate.cpp