Re: [gluon] Fwd: Gluon: gamesmodel

[ Thread Index | Date Index | More lists.tuxfamily.org/gluon Archives ]


On Sun, Feb 6, 2011 at 1:51 PM, Shantanu Tushar Jha <jhahoneyk@xxxxxxxxx> wrote:
> Kindly CC the ML ...
>
> ---------- Forwarded message ----------
> From: Shantanu Tushar Jha <jhahoneyk@xxxxxxxxx>
> Date: Sun, Feb 6, 2011 at 5:19 PM
> Subject: Re: Gluon: gamesmodel
> To: Laszlo Papp <djszapi@xxxxxxxxxxxx>
>
>
> Um, is it really a good idea to do something UI specific in a model (storing
> and returning a widget in the model) ?
> Imo model should only be concerned about the data.

Unfortunately, I cannot inherit your model implementation because it
contains two basic methods you had to reimplement that I also need to
reimplement. (But this also means that there is no code duplication).
I think the current model implementation has bottlenecks regarding the
performance. (fex. it always builds the project by a data method call
and not just once in the constructor involving the low-level dir
manipulation all the time).

My approach and design are a bit different, closer to the ghns,
knewstuff3 ui way. (They did not put this into the lib either because
it is quite standalone dependent - standalone related model, view,
delegate)

This way I do not need to return the elements separately in fact, just
to build a gamesviewitem list in the ctor of the model and then just
asking the widget that the update widget "draws". The current way now
always asks the data and builds all the time.

This is a good example what I I am proposing:
https://projects.kde.org/projects/kde/kdelibs/repository/revisions/master/entry/knewstuff/knewstuff3/ui/itemsmodel.h
(Also the own delegate:
https://projects.kde.org/projects/kde/kdelibs/repository/revisions/master/entry/knewstuff/knewstuff3/ui/itemsviewbasedelegate.h#L40).

I have already started the implementation and I am ready with the
model and view. Let me show you the final result when I am ready with
the own delegate. ;)

Thank you in advance !

Best Regards,
Laszlo Papp

---
+----------------------------------------------+
Gluon is a high-level game development library for the KDE desktop enviornment.
http://gluon.tuxfamily.org/
http://gitorious.org/gluon



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/