[Kde-games-devel] Review Request: Porting Bomber from KGameCanvas to QGraphicsView
Parker Coates
coates at kde.org
Tue Mar 13 15:43:18 UTC 2012
> On March 12, 2012, 7:01 p.m., Stefan Majewsky wrote:
> > trunk/KDE/kdegames/bomber/src/bomberwidget.cpp, lines 356-357
> > <http://svn.reviewboard.kde.org/r/6908/diff/2/?file=47695#file47695line356>
> >
> > You're looking for QGraphicsItem::setZValue.
>
> Mehmet Emre wrote:
> I've used removeItem and addItem instead of setZValue because if I'd use setZValue then I'd find a way to make sure that m_overlay's Z-Value is greater than all of the other items' Z-Values.
Typically we just use an arbitrarily large zValue for this kind of thing, like 1000, which is unlikely to be exceeded by a scene that contains significantly less than 1000 items. This allows you to do multiple "layers". Background stuff starts at -1000, main content at 0 and overlays at 1000, for example.
- Parker
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://svn.reviewboard.kde.org/r/6908/#review10721
-----------------------------------------------------------
On March 13, 2012, 9:28 a.m., Mehmet Emre wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://svn.reviewboard.kde.org/r/6908/
> -----------------------------------------------------------
>
> (Updated March 13, 2012, 9:28 a.m.)
>
>
> Review request for KDE Games.
>
>
> Description
> -------
>
> I've ported bomber to QGraphicsView as requested here: http://techbase.kde.org/Projects/Games/Porting. I've made some modifications on the classes below:
> - Explodable
> - BomberBoard
> - BomberGameWidget
> - Building
>
>
> Diffs
> -----
>
> trunk/KDE/kdegames/bomber/src/board.h 1284898
> trunk/KDE/kdegames/bomber/src/board.cpp 1284898
> trunk/KDE/kdegames/bomber/src/bomberwidget.h 1284898
> trunk/KDE/kdegames/bomber/src/bomberwidget.cpp 1284898
> trunk/KDE/kdegames/bomber/src/building.h 1284898
> trunk/KDE/kdegames/bomber/src/building.cpp 1284898
> trunk/KDE/kdegames/bomber/src/explodable.h 1284898
> trunk/KDE/kdegames/bomber/src/explodable.cpp 1284898
>
> Diff: http://svn.reviewboard.kde.org/r/6908/diff/
>
>
> Testing
> -------
>
> I've done these tests and solved the problems that I've bumped into:
> - Played bomber's first two levels.
> - Paused the game
> - Changed settings during the game and while game is paused.
>
>
> Thanks,
>
> Mehmet Emre
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-games-devel/attachments/20120313/9f97fe4a/attachment.html>
More information about the kde-games-devel
mailing list