Added a Delegate for editing Cylinders

Now when you edit 'Type', a drop-down list will appear
and will enable you to choose from it's contents.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Added the trash.png file that was missing.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Merge branch 'comboBoxDelegate' of https://github.com/tcanabrava/subsurface
Removed unused debug, and set the correct data on the delegates.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Removed the unused add cylinder and add weigthsystem dialogs.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Merge branch 'comboBoxDelegate' of https://github.com/tcanabrava/subsurface
Get the math right for cylinder model setData function

This is a fun one.

We only want to mark the divelist changed if the user actually changed
something. So we try really hard to compare what was entered with what was
there and only if it is different do we overwrite existing values and
record this as a change to the divelist.

An additional challenge here is the fact that the user needs to enter a
working pressure before they can enter a size (when in cuft mode). That is
not really intuitive. We work around this by assuming working pressure is
3000psi if a size is given in cuft - but then if the user changes the
working pressure, that changes the volume. Now going back and changing the
volume again does the trick. Or enter the working pressure FIRST and then
the volume...

This also changes the incorrect MAXPRESSURE to WORKINGPRESSURE and uses
the text WorkPress in English (Gtk code used MaxPress which was simply
wrong - this is just the design pressure or working pressure, not some
hard maximum. In fact, people quite commonly "overfill" these tanks.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Small fixes to the model

Prevent a crash when no cylinder type description is set.

Correctly calculate the cylinder volume.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>