CCR Patch: Adapt pressure interpolation for CCR

This patch adapts pressure interpolation (function pr_interpolate_data)
in order to process CCR diluent gas as well. A flag diluent_flag is
added to the variables for calling this function indicating whether the
gas being worked with is diluent gas or not. This is necessitated by
the fact that the diluent gas storage is separate from that of the other
gases. The data used for interpolation are selected from the appropriate
array, depending on nthe value of diluent_flag.

In function fill_missing_tank_pressures, diluent_flag is set to 0
in order for the code to work with the current CCR adaptations.

The above constitutes no. 1 of a four-part set of patches that allows
pressure calculations for CCR gases. There will be CCR functionality
only after the whole set of patches is complete.

Signed-off-by: willem ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Add uncompressed Poseidon CCR XML dive log to the directory subsurface/dives.

This file is not in the original unformatted style of Posedon
but in an intermediate XML for developing the Qt interface.
At the end of development this file will be replaced by the
original unformatted dive log.

Signed-off-by: willem ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
HTML: Save divecomputer data to the HTML exports

Save divecomputers data to the JSON files. and show them in the HTML
dive detailed view.

Fixes #711

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Add gaspressures to cmake

Ignoring the fact that cmake is a disgusting pile of crap, let's at least
track the files in our project for the people who want to use it.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Default font: more fine tuning

In order to get rid of the old default font on Windows (Calibri) we are
going to near ridiculous length. The reason for this is that we in the
past always saved the default font in the settings (how stupid was that!)
and so now even with a new default font in place, since there is an
explicit font in the settings we take that instead of the default.

Instead of requiring our existing users to use a registry cleaner to get
the correct default font on Windows 7 and later (the VAST majority of our
Windows users at this stage), we simply explicitly ignore that old default
font.

There is one very nasty side effect. A user cannot set Calibri as their
font of choice on Windows 7 or later (because we always force them back
onto Segoe). Given how much nicer Segoe looks I think this is an
acceptable flaw - let's hope this doesn't come back to bite me in the
future.

At the same time this changes the default font size handling. We try to
get the default font size of the OS so the app looks "right". This seems
to not give me the expected result on Linux with KDE, but maybe I'm doing
it wrong? Looks good when testing on Windows.

See #712

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Don't set up fonts twice

Turns out that the mainwindow reads the settings and sets up things -
except that this has already happened in the constructor of the static
PreferencesDialog. So only keep those parts that aren't handled there.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Use one consistent font size throughout the app

Let's see how much people notice it / hate it.

Fixes #712

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Preferences: only save settings that are changed

This continues the effort started earlier to only save things that aren't
the default.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Define PATH_MAX if it's not defined

Fixes FTBFS on Hurd.

[Dirk Hohndel: changed PATH_MAX to 4096 for consistency with Linux]

Signed-off-by: Salvo 'LtWorf' Tomaselli <tiposchi@tiscali.it>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Use compilation flags.

This makes qmake aware of CFLAGS, CXXFLAGS, LDFLAGS, CPPFLAGS.

This is helpful to easily add flags to the compilation (such as
hardening flags).

Signed-off-by: Salvo 'LtWorf' Tomaselli <tiposchi@tiscali.it>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Updated translations

The change in the French translations fixes the bug where Subsurface
couldn't find images when run in the French locale - the problem was an
incomplete translation string.

Fixes #708

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
HTML: export valid JSON.

Remove the trailing commas from the exported JSON file as some json
parsers just don't like it. The file 'file.json' is valid acording to
the JSON spesification.

Note: its a javascript file containing a JS variable 'trips' and not a
JSON file. Because loading a pure JSON file from local disk is not
accepted by the web-browsers itself. Actually I think changing the file
extension to .js is now makes more sense.

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
HTML: Changing the files extensions to js

These are actually javascript files containing js objects and not json
files.

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
CCR patch: Adapt pressure interpolation for CCR (2)

This is the second pathch in this series of four, allowing the calculation
of cylinder pressures for CCR equipment.

Change function fill_missing_tank_pressures in order to enable working
with the diuent gas, comprising a complete set of pressures kept separate
from all other tank pressures.
Flag diluent_flag indicates calculations for the diluent cylinder.

[Dirk Hohndel: serious whitespace cleanup]

Signed-off-by: willem ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Fix water temperature on Suunto SDM import

Seems that Suunto stores temperature value of 0 when there is no
temperature reading (I guess). Thus this patch ignores temperature
samples that are zero. Otherwise, Subsurface looks into the samples and
grabs the lowest number as water temperature.

See #720

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Latest Portuguese translations

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Revert hacks now that we use Qt5 on Mac

Commits a24eb8ac120bf and 0b0860d24a81b introduced a nasty hack that was
needed back then to make tank and weight selection work on the Mac. But it
caused other unpleasant issues (as mentioned in the commit messages).

I re-tested this with the current Qt5.3 based builds on Mac and this hack
is no longer needed.

Fixes #638

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
QT += concurrent is a Qt 5 thing

In Qt 4, QtConcurrent is part of QtCore.

Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Redesign Dive Computer configuration dialog

The dive computer configuration dialog was a bit cluttered. This
change adds a tabbed interface separating the basic settings from
the gas, dilutent and set point settings

Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Fix typos

Reported-by: Davide DB <dbdavide@gmail.com>
Signed-off-by: Florian Klink <flokli@flokli.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>