<div dir="ltr">sorry for the late reply<div class="gmail_extra"><br><div class="gmail_quote">On Sun, Dec 16, 2012 at 11:46 PM, Albert Astals Cid <span dir="ltr"><<a href="mailto:aacid@kde.org" target="_blank">aacid@kde.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">El Dilluns, 17 de desembre de 2012, a les 02:52:57, Viranch Mehta va escriure:<br>
<div class="im">> I was planning to make a review request(?) for the same after my patch to<br>
> libkdegames for QtQuick support is accepted. Unfortunately that seems to be<br>
> taking some time for me.<br>
<br>
</div>What's wrong?<br></blockquote><div><br></div><div style>The QtQuick port includes a CanvasItem QML component to show theme sprites from SVGs in QML views using the KGameRenderer object of the game. Since QML conponents need to have a default constructor, I had to set the renderer object statically in the CanvasItem after the renderer object is passed to the QML view (KgDeclarativeView).</div>
<div style><br></div><div style>This created problems when we needed to have multiple KgDeclarativeViews with multiple renderer objects. As a result, I decided to create a Renderer QML component that would represent a KGameRenderer object and that Renderer QML component can be used to specify the KGameRenderer object to use in each of the CanvasItems (via the "renderer" property) used in the game, eliminating the need for setting things statically.</div>
<div style><br></div><div style>Also, for asynchronous loading of theme sprites, CanvasItem component has to be a subclass of KGameRendererClient (and reimplement receivePixmap to show the sprite on the view), which needs KGameRenderer object in its constructor. But we want to set the "renderer" after the CanvasItem has been constructed. So I'll have to change the CanvasItem to load the sprite synchronously which doesn't need KGameRenderer at construction time.</div>
<div style><br></div><div style>All this transformation is kind of huge and complicated for me, plus the d-pointer thing is also new for me. So need time to figure it all out.</div><div style> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im"><br>
> I'm not sure if taking up KBreakout's QtQuick port before the patch is the<br>
> right way to go or how to take things further.<br>
<br>
</div>Does KBreakout's QtQuick port need libkdegames QtQuick support?<br></blockquote><div><br></div><div style>For now the components needed (discussed above) are put in KBreakout's source itself. Here, there's no question of multiple declarative views, so the above problem is irrelevant for KBreakout. Also, the components carry a libkdeclarative dependency from kdelibs, if it matters.</div>
<div style><br></div><div style>Cheers,</div><div style>Viranch</div></div></div></div>