[Okular-devel] An Undo / Redo framework for annotations

Jon Mease jon.mease at gmail.com
Sat Oct 13 21:43:38 UTC 2012


Hello all,
     My next goal for enhancing Okular's annotation framework is to
add undo / redo support when creating/editing/deleting annotations.
Looking back at the list archives it seems like this is something that
has been asked for and mentioned in bug reports for several years now.
 Before starting in I wanted to ask whether anyone has already started
work on this.

I have some experience with Qt's Undo/Redo framework and this is what
I'm planning on using.  At the highest level my thought is to write
QUndoCommands for each of the following annotation actions
    1) Creating a new annotation with a particular set of properties
    2) Deleting an existing annotation
    3) Editing an annotation's properties (color, opacity, etc)
    4) Moving an annotation's position
    5) Editing text in a text annotation (this would rely on the
undoAvailable signal of QTextEdit)

Does anyone have any thoughts on the subject?  Does an existing
undo/redo branch or patch exists somewhere?  If not, I'll probably get
started on one this coming week.
Thanks,
-Jon


More information about the Okular-devel mailing list