diff options
author | Tomaz Canabrava <tcanabrava@kde.org> | 2013-04-13 10:17:59 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-04-13 14:08:16 -0700 |
commit | 92397a2bad3d1a2bc261dee67d230e3caa13b8d8 (patch) | |
tree | 32d54729f32bd6b2f1be2eacf27717dd3bede5a0 /equipment.c | |
parent | 76f71b4ca07dbef1069aec3db1138c199927b1bb (diff) | |
download | subsurface-92397a2bad3d1a2bc261dee67d230e3caa13b8d8.tar.gz |
Started the real code on the Qt Interface.
1 - Open File already open files, it tries to not break the Gtk version,
but some methods on the GTK version still need to be called inside Qt
because the code is too tight-coupled.
2 - Close file already close files, same comments for the open file dialog
applies here.
3 - The code for adding new cylinders in the cylinder dialog is done,
already works and it's integrated with the system. There's a need to
implement the edit and delete now, but it will be easyer since I'm
starting to not get lost on the code.
4 - Some functions that were used to convert unities have been moved to
convert.h ( can be changed later, put there because it's easyer to
find something that converts in a convert.h =p ) because they were
static functions that operated in the GTK version but I need those
functions in the Qt version too.
[Dirk Hohndel: lots and lots of whitespace and coding style changes]
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'equipment.c')
-rw-r--r-- | equipment.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/equipment.c b/equipment.c index 2d90f7a52..a1d156f94 100644 --- a/equipment.c +++ b/equipment.c @@ -18,6 +18,7 @@ #include "display.h" #include "display-gtk.h" #include "divelist.h" +#include "conversions.h" static GtkListStore *cylinder_model, *weightsystem_model; @@ -70,7 +71,7 @@ struct ws_widget { }; /* we want bar - so let's not use our unit functions */ -static int convert_pressure(int mbar, double *p) +int convert_pressure(int mbar, double *p) { int decimals = 1; double pressure; @@ -86,7 +87,7 @@ static int convert_pressure(int mbar, double *p) return decimals; } -static void convert_volume_pressure(int ml, int mbar, double *v, double *p) +void convert_volume_pressure(int ml, int mbar, double *v, double *p) { double volume, pressure; @@ -724,6 +725,7 @@ static void fill_cylinder_info(struct cylinder_widget *cylinder, cylinder_t *cyl /* * Also, insert it into the model if it doesn't already exist */ + // WARNING: GTK-Specific Code. add_cylinder(cylinder, desc, ml, mbar); } |