Palapeli -> kdereview

View: New views
5 Messages — Rating Filter:   Alert me  

Palapeli -> kdereview

by Stefan Majewsky :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I've moved Palapeli to kdereview. Palapeli is a jigsaw puzzle game, which I'd
like to move to kdegames for release with KDE 4.4. Documentation is included,
but translations have not yet been moved. I do not know if this is necessary.
If yes: Could someone with experience please do this?

So long for the administrative notes. I'll post a follow-up message in a few
minutes with technical notes.

Greetings
Stefan


signature.asc (204 bytes) Download Attachment

Re: Palapeli -> kdereview

by Stefan Majewsky :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Am Dienstag 10 November 2009 01:15:41 schrieb Stefan Majewsky:
> So long for the administrative notes. I'll post a follow-up message in a
>  few minutes with technical notes.

Here we go.

The directory structure of the code is as follows:
* src = the main application
* libpala = an underlying library which serves as an interface for slicer
plugins
* slicers = the two slicer plugins that come with Palapeli (slicer plugins
describe how to slice an image into pieces)
* libpala-example = an example slicer (this would go to kdeexamples rather
than kdegames)
* mime = various smaller code bits and stuff for file manager integration
* tools = contains libpala-puzzlebuilder, a command line interface to libpala
(more tools will likely appear in later release cycles)
* puzzles = the default puzzles that come with Palapeli
* cmake = contains a find-script (which is installed together with the
headers; third-party slicer developers are encouraged to copy the find-script
to their own source tree)

So, as you see, Palapeli has a public library (libpala). APIDOX are included,
and a tutorial for third-party devs is available on Techbase [1].

I will try to ensure binary compatibility throughout the KDE 4.x lifetime, and
would very much desire if someone with experience in this topic could check
for possible BC issues.

I've written some new code today (some last-minute features) for which I do
not know how much Krazy likes it, but I've fixed all errors Krazy reported
(apart from two "improper include-guards" where Krazy fails to understand my
naming scheme).

In the main application, the most interesting part is the combined
tabbar/menubar. I've explained the reasons for this design in detail at [2].
On the technical side, I've checked the layout of the tabbar/menubar in all
widget styles I have available here, but would very much desire if someone
could test if the menubar is layed out correctly on Windows and Mac styles
(see [3] for how it is supposed to look).

Inside the main tabwidget, the tabs are implemented as mainwindows again. This
explains why there are three *ui.rc files (one for the main window and two for
the tab windows). This innovative XMLGUI usecase required me to implement
configureShortcuts() by hand. Sadly, I did not find a way to implement
configureToolbars(), so toolbars are not configurable right now.

Also, the puzzle table has some known bugs which I've reported as Qt bugs:
1. I'm using invisible handles to control the scene rect. The handle movement
is jumpy when the scene rect is changed in such a way that the view's
scrollbars are enabled (see [4]).
2. The OpenHandCursor changes into a ClosedHandCursor when dragging the
viewport, but not when dragging a piece, although I'm setting the cursor
correctly (see [5]).

Now that's all the interesting stuff I think. Thanks for your attention, and
thanks in advance for your reviews.

Greetings
Stefan

[1] http://techbase.kde.org/Development/Tutorials/Games/Palapeli_Slicers
[2] http://majewsky.wordpress.com/2009/09/28/palapeli-the-new-window-layout/
[3] http://majewsky.wordpress.com/2009/10/14/palapeli-creating-puzzles/
[4] http://bugreports.qt.nokia.com/browse/QTBUG-5437
[5] http://bugreports.qt.nokia.com/browse/QTBUG-5329


signature.asc (204 bytes) Download Attachment

Re: Palapeli -> kdereview

by Stefan Majewsky :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Am Dienstag 10 November 2009 01:15:41 schrieb Stefan Majewsky:
> So long for the administrative notes.

I forgot something: Palapeli needs icons. At least one for the application and
one for the application/x-palapeli-puzzle mimetype that represents a puzzle
file. Bug 211997 has more information.

Greetings
Stefan


signature.asc (204 bytes) Download Attachment

Re: [Kde-games-devel] Palapeli -> kdereview

by Albert Astals Cid-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

A Dimarts, 10 de novembre de 2009, Stefan Majewsky va escriure:
> Hi,
>
> I've moved Palapeli to kdereview. Palapeli is a jigsaw puzzle game, which
>  I'd like to move to kdegames for release with KDE 4.4. Documentation is
>  included, but translations have not yet been moved. I do not know if this
>  is necessary. If yes: Could someone with experience please do this?

This was done by Chusslove.
 
> So long for the administrative notes. I'll post a follow-up message in a
>  few minutes with technical notes.

A comment on code, you have one or two places where do you things like

QList<int> pieceIndices = pieces.keys();
foreach (int index, pieceIndices)
{
  if (!pieces[index].save(cachePath + QString("%1.png").arg(index)))
  {
    std::cerr << "Could not save piece image no. " << index << std::endl;
    return 1;
  }
}
 
That is asking for the keys of a map and then iterating them to access the map
values, this is highly inefficient both in memory and time and you should use
a QMap::const_iterator in these cases

Albert

>
> Greetings
> Stefan
>


Re: [Kde-games-devel] Palapeli -> kdereview

by Stefan Majewsky :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Am Dienstag 10 November 2009 19:57:15 schrieb Albert Astals Cid:

> A comment on code, you have one or two places where do you things like
>
> QList<int> pieceIndices = pieces.keys();
> foreach (int index, pieceIndices)
> {
>   if (!pieces[index].save(cachePath + QString("%1.png").arg(index)))
>   {
>     std::cerr << "Could not save piece image no. " << index << std::endl;
>     return 1;
>   }
> }
>
> That is asking for the keys of a map and then iterating them to access the
>  map values, this is highly inefficient both in memory and time and you
>  should use a QMap::const_iterator in these cases
Fixed in r1047398, thanks for the hint.

Greetings
Stefan


signature.asc (204 bytes) Download Attachment