fundamental design issues with trips and dives
Berthold Stoeger
bstoeger at mail.tuwien.ac.at
Fri Nov 8 13:07:03 PST 2019
On Donnerstag, 7. November 2019 23:02:17 CET Linus Torvalds wrote:
> On Thu, Nov 7, 2019 at 12:14 PM Berthold Stoeger
>
> <bstoeger at mail.tuwien.ac.at> wrote:
> > It doesn't have to. Just like you defined a proxy model on top of the
> > DiveListModel, one could implement a proxy model on top of the tree model
> > that "linearizes" it.
>
> Maybe we should do that in general, even for the desktop case.
>
> I don't think there is any major reason why the model should contain
> all the dives. In many ways it would be much better if the model only
> contains the *visible* dives, and we'd have a totally flat model,
> where a trip (whether it's a collapsed header only, or the header for
> a list of dives that has been exposed) is just a special model entry.
My idea would be to not store any dives at all in the model. Ideally, the
model would be a simple glue layer between Qt's widgets and the core. If I
remember correctly, we're already quite close to where this is possible. The
QTreeView does lazy evaluation: It will not access child nodes of non-expanded
trips.
Berthold
More information about the subsurface
mailing list