30 #include <QListWidgetItem>
31 #include <QPushButton>
33 #include "scribusapi.h"
34 #include "undoobject.h"
35 #include "undostate.h"
36 #include "ui/scdockpalette.h"
70 UndoGui(QWidget* parent = 0,
const char* name =
"UndoGui", Qt::WindowFlags f = 0);
76 virtual void clear() = 0;
79 virtual void languageChange();
108 virtual void updateUndo(
int steps) = 0;
118 virtual void updateRedo(
int steps) = 0;
123 virtual void updateUndoActions() = 0;
126 virtual void clearRedo() = 0;
129 virtual void popBack() = 0;
154 static const uint MENU_HEIGHT = 5;
155 std::vector<QString> undoItems;
156 std::vector<QString> redoItems;
163 void updateUndoMenu();
164 void updateRedoMenu();
167 UndoWidget(QWidget* parent = 0,
const char* name = 0);
182 void undoMenuClicked(QAction *
id);
183 void redoMenuClicked(QAction *
id);
235 void undo(
int steps);
243 void redo(
int steps);
265 int currentSelection;
267 QListWidget* undoList;
268 QCheckBox* objectBox;
269 QPushButton* undoButton;
270 QPushButton* redoButton;
271 QKeySequence initialUndoKS;
272 QKeySequence initialRedoKS;
274 void removeRedoItems();
279 class UndoItem :
public QListWidgetItem
283 QPixmap *targetpixmap;
285 QPixmap *actionpixmap;
301 UndoItem(
const UndoItem &another);
314 UndoItem(
const QString &targetName,
315 const QString &actionName,
316 const QString &actionDescription,
317 QPixmap *targetPixmap,
318 QPixmap *actionPixmap,
320 QListWidget * parent = 0);
325 QString getDescription();
327 void setUndoAction(
bool isUndo);
335 void undoListClicked(
int i);
336 void showToolTip(QListWidgetItem *i);
337 void removeToolTip();
338 void objectCheckBoxClicked(
bool on);
347 UndoPalette(QWidget* parent = 0,
const char* name = 0);
352 virtual void changeEvent(QEvent *e);
410 void updateFromPrefs();
419 void objectMode(
bool isEnabled);
426 void undo(
int steps);
434 void redo(
int steps);
virtual ~UndoGui()
Destroys the widget.
Definition: undogui.h:73
virtual void clear()=0
Empties the undo stack representation.
UndoGui subclass which creates an undo history window.
Definition: undogui.h:259
Definition: scdockpalette.h:38
UndoState describes an undoable state (action).
Definition: undostate.h:59
virtual void updateUndoActions()=0
Update the scrActions.
virtual void insertUndoItem(UndoObject *target, UndoState *state)=0
Insert a new undo item.
UndoGui is a virtual superclass for undo/redo widgets.
Definition: undogui.h:59
virtual void insertRedoItem(UndoObject *target, UndoState *state)=0
Insert a new redo item.
virtual void updateUndo(int steps)=0
Update undo stack representation with number of steps.
Superclass for all objects that are wanted to have undoable actions.
Definition: undoobject.h:59
virtual void languageChange()
Sets GUI strings on language change.
Definition: undogui.cpp:46
virtual void updateRedo(int steps)=0
Update redo stack representation with number of steps.
virtual void clearRedo()=0
Clear the redo action items.
virtual void popBack()=0
Remove the last (oldest) item from the undo stack representation.