[Kde-games-devel] Magnifier for Palapeli (patch)

Ian Wadham iandw.au at gmail.com
Wed Aug 18 15:49:12 CEST 2010


Hi guys,

Here are some files for a piece-magnifier for Palapeli.  To try it out
you need to install both patches in kdegames/palapeli and add the two
program files to kdegames/palapeli/src/engine.

The scenegeneralization.patch is the first step in generalizing some
scene methods for use when tidying up pieces and distributing them
into boxes or whatever we decide.  I have put this in a separate patch
in case we do not proceed with it, but one of the generalized methods
*is* needed by the piece-magnifier.

I have tested the magnifier on a 1008-piece puzzle and it seems to be
quite good for examining pieces in detail, looking for precise fits (e.g.
between two pieces of sky of the same color) and assisting selection
of pieces with skinny centers.  However, it is rather obstructive when
you are navigating around the forest of small pieces and it is hard to
see where you are going when the magnifier is on.  So I have made it
that Spacebar will toggle the magnifier on and off quickly, choosing
Spacebar because it can be easily reached if you are using
something like Ctrl-Click.

One technical question for Stefan or Johannes ... is it OK to use
piece->atomicSize() in the Scene::calculatePieceAreaSize() method,
instead of piece->sceneBareBoundingRect().size()?  I need to find the
max size of a single piece, even if the puzzle has been partially solved.

All the best, Ian W.

P.S. Johannes, please excuse the clashes you may get with the Palapeli
preview patch.  We both need to do inserts at the same spots ...


-------------- next part --------------
A non-text attachment was scrubbed...
Name: magnifiedview.patch
Type: text/x-patch
Size: 3889 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-games-devel/attachments/20100818/9f4a8081/attachment.patch 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: scenegeneralization.patch
Type: text/x-patch
Size: 4724 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-games-devel/attachments/20100818/9f4a8081/attachment-0001.patch 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: magnifiedview.h
Type: text/x-chdr
Size: 1827 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-games-devel/attachments/20100818/9f4a8081/attachment.h 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: magnifiedview.cpp
Type: text/x-c++src
Size: 3533 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-games-devel/attachments/20100818/9f4a8081/attachment.cpp 


More information about the kde-games-devel mailing list