[Kde-games-devel] Undo framework

Stefan Majewsky majewsky at gmx.net
Wed May 27 10:09:59 CEST 2009


Am Mittwoch 27 Mai 2009 00:29:21 schrieb Matthew Woehlke:
> Stefan Majewsky wrote:
> > I'm about to combine both parts into a UndoStack implementation for Kolf.
> > As this will be done in a very generic way, I would like to ask if
> > anyone's interested to get this stuff into kdelibs. The nice thing about
> > what I'm planning is that it allows easy persistency through writing the
> > complete UndoStack into a KConfigBase instance.
>
> To risk a dumb question, would this be useful for file/web browsing
> histories? Having a standard class to save history sounds like an
> awesome idea...

It should be applicable. The framework I sketched should be compatible with 
any object that is well represented by a simple bunch of properties, and a 
history entry seems to be nothing more than a "tuple" of (name, url, comment, 
rating, ...).

> Oh, and... kpat desperately needs this for saved games :-). Maybe not so
> much for user enjoyment, but it would really help in some cases for
> saved games in bug reports.

Should also be possible, if you apply it on a bunch of card objects with 
properties suit, position, etc.

You can have a look at the code already, it's in trunk/playground/games/kolf-
ng/engine/*state*, but note that the documentation is not very extensive and 
that saving the complete undo stack is not yet implemented. (It currently 
saves just the current states, but the extension to the complete stack should 
be trivial once I come to it.)

Greetings
Stefan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/kde-games-devel/attachments/20090527/182056ea/attachment.sig 


More information about the kde-games-devel mailing list