[Kde-games-devel] Palapeli preview window survey

"Johannes Löhnert" loehnert.kde at gmx.de
Sun Aug 15 17:47:18 CEST 2010


> Yesterday I was playing with another new class for palapeli/src/engine:
> Palapeli::MagnifiedView.  It's a small QGraphicsView that displays a
> section of the puzzle table's QGraphicsScene, about the area of one
> piece, in a magnified view - roughly the same size as a piece in the
> real world.  The aim is to assist searching for (and inspecting in
> detail) a piece in a puzzle that has a large number of pieces.
> 
> The magnification widget is working, but I need to work out how to
> scale it accurately and move it.  If I have time to finish it today, I'll
> send in the patch.  Otherwise it will have to wait till next weekend.
> I have a full calendar for the next few days.

The idea of such a widget sounds good. Would you suggest to put in into a tool window like the solution?
Scaling could simply adapt to the largest atomic piece on the board.

> Looking at the code for palapeli/src/engine/scene.*, I had an idea
> of how to implement, in a fairly simple fashion, sorting-boxes for
> large-puzzle enthusiasts, i.e. easy to use, not much coding and in
> the spirit of QGraphicsView (one scene, multiple views).
> 
> In the present code, if you select multiple pieces and move them
> to the edge of the board, the puzzle-table automatically makes
> room for them.  My idea is to have a special "drop" action that
> works as follows:
> 
>   1. Use a generalized version of the code in Palapeli::Scene::
>       loadPiecePositions to arrange the selected pieces into a grid.
>   2. Make room for the grid (not the scattered pieces), as necessary.
>       Maybe allow some extra space for later additions to the grid.
>   3. Drop the pieces, as arranged in the grid.
>   4. Place a QGraphicsView over the grid area that contains just
>       that area and no other pieces.
>   5. Magnify the grid and expand the widget on hover, to allow
>       easy viewing/selection of pieces to be moved back into the general
>       puzzle area.  Not sure yet how the player would signal "done" when
>       ready to shrink the box and see the main puzzle area again.
>   6. Provide functions to dismiss the widget, etc.  Dismissing
>       would send the puzzle-table back to normal, just as if you
>       had used the edge to sort those pieces.
>   7. Allow steps 1-6 to be repeated with any number of boxes,
>       according to the whims of the puzzle-player, e.g. boxes
>       for edge pieces, sky pieces, tree pieces, road pieces, etc.
> 
> What do you think, Johannes?  I believe it could be implemented
> in one fairly small engine-class and, together with a preview and a
> magnifier, would go a long way towards making Palapeli a goer for
> really large puzzles.

hm, step by step:
ad 0. (how to trigger) - Stefan has some drafts of "on screen widgets" similar to the Plasma cashew. (http://majewsky.wordpress.com/2009/02/23/the-week-in-palapeli-research-on-fullscreen-interfaces/). Maybe one could drag pieces on one of those edge icons to open a box. They would be always visible, in contrast to the puzzle table edges, which increases convenience.

ad 1. - IMHO, "rearranging pieces" and "moving pieces into box" should be separate actions. Maybe one just wants to close "gaps" without moving pieces into a box. Or OTOH maybe one wants to move pieces to a box which are already arranged (e.g. three mergegroups with missing links).

ad 2. - .. do I understand correctly that you would use a "far off" place in the main scene as box? Sounds, well, hackish to me. But indeed it would be a simple solution, so why not.

ad 4. - That graphics view, do you mean it would be a separate window like the solution view? Or should it be embedded in / replace the main view somehow? (I am not sure yet what I would like better...)

ad 5. - well, was I placed before it without a manual, I would expect that I must drag the selected pieces out of the widget into the main view to signal "done". However I don't know if thats technically possible.

> BTW, shouldn't the "preview" be called a "retro-view" ... :-)
> It's what you had before you shuffled the puzzle ... :-)  I'm joking, but
> maybe "solution" and "view solution" would be good words for the UI.

I agree, "Solution" FTW. :-)


Best regards, Johannes


-- 
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01


More information about the kde-games-devel mailing list