About Weights and Cylinders ( Qt Model )

Dirk Hohndel dirk at hohndel.org
Fri Apr 12 12:18:58 PDT 2013


Tomaz Canabrava <tcanabrava at kde.org> writes:

> Hullo,
>
> I`m searching how the Cylinders and Weights are stored on the system, but
> I`m unable to find. It seems that by `add_cb` function, it`s currently
> added only in the view, but I think that`s wrong ( not the code, but my
> understanding of it. )
>
> Anybody experienced with the C part can give a quick Cylinder-review?

dive.h defines the cylinder_t and there's an array of eight
(MAX_CYLINDERS) of them in struct dive. That's where all the cylinder
data is stored - everything else is just for Gtk

similarly weightsystem_t and the array of them in struct dive.

in other words, all the data is in struct dive :-)
we simply hand around pointers to the one that is being handled (usually
called cylinder_t *cyl)

Does that help?

/D


More information about the subsurface mailing list