[Kde-games-devel] kwin4 porting to QGraphicsView (was: KGame/KPlayer API usability in kdegames)

Dmitry Suzdalev dimsuz at gmail.com
Wed Jul 12 22:36:14 CEST 2006


On Wednesday 12 July 2006 20:51, Martin Heni wrote:
> Yet another idea (again without testing it): It could work if you also
> derive your own MouseIO class from the KGameMouseIO and emit the signal
> from there. At this point you have the KGameIO pointer (that is "this").
> You then connect the QGraphicsView (Yes indeed I did not mean QGameView) to
> your MouseIO. Then you connect your MouseIO to whatever you want.
> Obviously you would get the same behaviour by just omitting the IOs
> classes. But keeping them gives you another advantages, like the
> exchangeability etc.
Nice idea, thanks! It looks good and I'll try it tomorrow :).

> Another option would be to check with Trolltech whether it is possible to
> have the events in a new release or whether they left them out on purpose.
Ok, maybe I'll drop them a mail. I need to subscribe to qt-interest for that, 
right?

> I think the keypoint besides an upgrade of the library is the missing
> documentation. If someone wants to work on this: I think we still have some
> old and basic documentation somewhere. Maybe this can still be found.
> Unfortunately, I have no time in doing the docs myself. The little time I
> have I need for porting and improving LSkat and KWin4 for KDE4 (btw very
> good if you also do the KWin4 porting! Maybe I need not do much there after
> all!!)
Currently, the port of KWin4 which I am trying to make is in compilable state. 
The only serious issue is this MouseIO one :).
If you interested there were minor ones such as:
There's no direct QCanvasSprite alternative now.
Instead I derived KSprite from QGraphicsPixmapItem. It doesn't support frames 
concept, so I added corresponding functions by hand (as it was done in one of 
Qt porting examples).
Another drawback is that QGraphicsPixmapItem doesn't support pixmap hotspots.
In kwin4 they were loaded from sprite config file. At the moment I just 
harcoded them in sprite positioning code as a workaround...

Do you mind if I'll send you a patch for review once I finish porting?
Or better send it here to the list? Or both? Or whatever else? :)

Cheers,
Dmitry.


More information about the kde-games-devel mailing list