[Aptitude-devel] aptitude-qt code design

Daniel Burrows dburrows at google.com
Thu Jun 10 20:13:14 UTC 2010


On Tue, Jun 8, 2010 at 1:58 AM, Sune Vuorela <nospam at vuorela.dk> wrote:
>
> On 2010-06-07, Daniel Burrows <dburrows at google.com> wrote:
> >> Example of displaying package list:
> >> 1) The view is created
> >> 2) The widget is asking model what should be displayed on the list
> >> 3) The model ask the service for the informations
> >> 4) Informations are displayed on the list
> >
> >   I don't understand what happens in step 3.
>
> Qt's model-view things is a bit hard to wrap your hed around first time
> you have to do it, but basically, it is a class to make some arbitrary
> structure or collection fit in one of Qt's view classes.

  [snip]

  Interesting; it sounds like the Qt model is pull-based (the GUI requests
data from the backend).  Other MVC systems I've seen might have had
the potential to be pull-based, but in practice people seemed to just use
the built-in implementation of the model as a go-between (so the backend
pushed into it rather than directly responding to GUI requests).

  This might have implications for the code I was looking at to partly
abstract table formatting -- if I want it to be usable from Qt, some design
changes could be in order.  I'll just write up what I have right now, and then
maybe you guys can tell me how it should change to support a Qt frontend.
(hopefully I can get around to that by next week sometime)

  Daniel



More information about the Aptitude-devel mailing list