Commit graph

4097 commits

Author SHA1 Message Date
Dirk Hohndel
e783493f8a Use helper function to display mean depth with correct unit
In commit 528d0ea0e7 ("Print numerical value of mean depth") Miika once
again forgot the three non-metric countries on this planet... :-)

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-06 21:02:19 +08:00
Miika Turkia
528d0ea0e7 Print numerical value of mean depth
This will print the numerical value of mean depth to the profile graph.

Fixes #405

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-06 20:50:58 +08:00
Miika Turkia
ffe53224a2 Fix typo
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-06 20:48:24 +08:00
Dirk Hohndel
04aa563cca Fix Uemis temperature conversion
In commit 3fd39a7a87 ("Remove some constants and use helpers instead")
Anton missed the fact that the Uemis gives temperatures in the handy unit
of "centi degree C". Now things work again.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-03 16:00:28 -08:00
Dirk Hohndel
32d26b751a Parse localized weight units
We have the wonderful Qt string functions. Let's use them to make the code
simpler and easier to read.

Suggested-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-03 11:22:37 -08:00
Lubomir I. Ivanov
a30a0910b4 Maintab: prevent a segfault in the 'Equipment' tab
When a dive contains no cylinders, clicking the '+'
button could SIGSEGV if current_dive->dc.model is NULL.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-03 10:56:29 -08:00
Miika Turkia
a62f68e905 Rename menu entry for log import
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-03 10:30:09 -08:00
Miika Turkia
b052b790df Refactoring import to DiveLogImportDialog
Changing the import stuff to DiveLogImport. Now we should have one
import function/dialog for importing divelogs instead of multiple menu
entries.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-03 10:30:08 -08:00
Miika Turkia
646c6ba58b Merging Import dialog
This patch merges import dialog with CSV import dialog. The aim is to
have only one import menu entry for log files. This menu entry pops up
an import dialog that has tabs for different types of imports (supported
dive logs and CSV configuration currently).

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-03 10:30:06 -08:00
Tim Wootton
65eb86f854 MainTab location coordinates displayed in ISO6709 format
changes the location coordinates display in the main tab
 to use ISO6709(2008) Annex D suggested format.

Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-03 09:18:45 -08:00
Tim Wootton
41876f974e Allow location coordinates in ISO6709 format
Allows location coordinates to be entered in ISO6709(2008)
Annex D format. e.g. 50°40'46,461"N 95°48'26,533"W
see http://en.wikipedia.org/wiki/ISO_6709#Representation_at_the_human_interface_.28Annex_D.29
for suggested format.

Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-03 09:18:27 -08:00
Dirk Hohndel
7771158c82 Prepare for 4.0.1 release
Small updates to README, ReleaseNotes, user manual.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-03 03:18:59 -08:00
Dirk Hohndel
e06f9c4e88 Translation updates
As always, I am not the author, these are from Transifex.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-03 02:52:42 -08:00
Dirk Hohndel
bc9b9287a4 Allow us to build for older versions of Mac OSX than we are running
This requires some serious hacking around with brew to get the libraries and
frameworks that we use to also be able to run on 10.5, but this is the part
that's needed in the Subsurface configuration.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-02 22:45:25 -08:00
Linus Torvalds
4cce5df7e2 Fix imperial cylinder sizes in equipment tab
The imperial cylinder sizes are not just in cubic feet: they are in
cubic feet of gas at STP. So the imperial/metric difference is not
just about converting blindly from liters to cubic feet, you also have
to take the working pressure of the cylinder into account.

This was broken by commit f9b7c5dfe9 ("Make units in cells
consistant in CylindersModel"), because those poor sheltered Swedish
people have never had to work with the wondrous imperial cylinder
sizing, and think that units should make _sense_. Hah.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-02 22:40:50 -08:00
Linus Torvalds
c49d3885f5 Allow the user to specify weight units explicitly
Instead of always assuming that all numbers are in the users locale
weight units, allow the user to say "kg" or "lbs" explicitly.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-02 21:17:51 -08:00
Linus Torvalds
cb53a78674 Make our 'ascii_strtod()' helper more generic
We'll want to do sane parsing of strings, but the C library makes it
hard to handle user input sanely and the Qt toDouble() function
interface was designed by a retarded chipmunk.

So just extend our existing hacky "ascii_strtod()" to allow a more
generic interface.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-02 21:17:41 -08:00
Dirk Hohndel
5511a0e14e Ignore units when entering values for equipment
Note that this is IMHO the wrong fix. Because we shouldn't just ignore the
units, we should do correct conversions.

Before this patch, if the user is in metric mode and then types in 4.5kg
or 10lbs for a weight, Subsurface ignores the entry and throws it away.
Very much not the expected behavior.

With this patch Subsurface will take the value, but ignore the unit and
assume that the user meant kg (since it's in metric mode). Still not
really the expected behavior for 10lbs (which is now 10kg), but if the
user typed 4.5kg (which admittedly is much more likely), then with this
change Subsurface will do the right thing.

Fixes #395

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-02 09:12:32 -08:00
Rodrigo Severo
2abd06e5fd Test dive for odd pressure profile
When near the surface the pressure doesn't change - and then there is a
sudden drop at the end.

Signed-off-by: Rodrigo Severo <rodrigo@fabricadeideias.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-01 09:48:15 -08:00
Rodrigo Severo
763c64d0da Typos on comments
Fixing 2 typos on comments.

Signed-off-by: Rodrigo Severo <rodrigo@fabricadeideias.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-01 09:44:51 -08:00
Dirk Hohndel
dcc143ae4f More translation updates
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-29 10:57:03 -08:00
Dirk Hohndel
33d6cc711f Fixed typo
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-29 10:55:48 -08:00
Dirk Hohndel
db73177936 Add simple glossary
This is mostly for translators

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-29 10:34:12 -08:00
Dirk Hohndel
f79cc7bd91 Fix typo
Reported-by: Peter Konings <peter.l.e.konings@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-29 09:20:26 -08:00
Dirk Hohndel
6082ddb1d5 Translation updates
As usual, I am not the author, just pulling them from Transifex.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-29 09:19:35 -08:00
Dirk Hohndel
63e4b804eb Strip the incorrect ICC profiles from png files
This was first reported by Benjamin Fogel who also sent a patch but that
patch was changing all pngs instead of just those affected.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-29 06:24:42 -08:00
Miika Turkia
54c8ae3a48 Update manual to reflect CSV import numbering
Patch f4db392a changed CSV import to use field numbers instead of
indexes. Thus removing the now incorrect description of numbering from
user manual. Note, that screenshot should be updated as well.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-29 04:24:07 -08:00
Miika Turkia
03666fb765 Use field numbers in CSV import instead of indexes
For the common user, a field number is more intuitive than field index.
So let's use that in numbering CSV import fields.

Fixes #388

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-29 04:13:18 -08:00
Dirk Hohndel
7c8a39015a Enable https for Windows binaries
This requires the ssleay32.dll and libeay32.dll to be copied into
packaging/windows, first.

Fixes #367

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-28 21:04:07 -08:00
Dirk Hohndel
90ff8e672b Update tank model with custom tanks used in XML files
Fixes #377

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-28 14:56:01 -08:00
Dirk Hohndel
a375159e6a Remove nonexisting member from header
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-28 14:55:23 -08:00
Miika Turkia
e72d001d3e Fix bookmark/gaschange setting for Ubuntu
On Ubuntu, new events have time zero. This is fixed by resetting
gc.rightx to maxtime at the end of plot function.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-28 10:25:18 -08:00
Miika Turkia
a18ada18e4 Remove unnecessary cylinder generation on UDDF
Nowadays cylinder tags are generated based on actual usage. This
includes all the required information on cylinders. Therefore generating
incomplete cylinder tags from all listed cylinders is not needed
anymore.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-28 07:43:50 -08:00
Miika Turkia
9731f85fc6 Cylinder support improved on UDDF import
This patch adds support for cylinders for UDDF version 3.2.1.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-28 07:43:34 -08:00
Miika Turkia
16d7f5e86e Support for multiple cylinders on UDDF export
Adding support for multiple cylinders on UDDF export. This also adds a
cylinder reference to the tankdata to enable mix lookups.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-28 07:43:21 -08:00
Miika Turkia
683227d2aa Generate UDDF waypoints for in-between events
This patch generates a waypoint for events occurring between profile
samples. It approximates the depth of the crafted waypoint linearly
between the recorded sample depths.

Fixes #385

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-28 07:43:18 -08:00
Miika Turkia
23786f0d4d Test dive for events
Dive with test events, can be used to test approximation of depth when
exporting dives.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-28 07:40:54 -08:00
Miika Turkia
3ddb03a27e Use bookmark flag when bookmark contains heading
Bookmark with compass heading is named 'heading' and should use the
bookmark icon.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-28 07:40:38 -08:00
Miika Turkia
a88f413f70 Add depth conversions to XSLT
Convert depth to and from mm.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-28 07:40:22 -08:00
Miika Turkia
abcc4d55bd Including alarms and bookmarks on UDDF import
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-28 07:40:17 -08:00
Dirk Hohndel
ba72f43e7f Allow tracking of more weight systems
I never imagined that people would want to track more than 4
weightsystems, but we just had an enhancement request from a user who
tried to enter a 5th system. Let's hope 6 is enough for everyone.

Fixes #383

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-28 07:33:09 -08:00
Dirk Hohndel
9bff4eda35 Clear equipment tab for trips display
And prevent the user from editing equipment in trip edit mode (those edits
are both meaningless and of course will be ignored once we save the
changes to the trip).

Also moved some code for setting up tanks, weights, tags, etc, into the
"this is not a trip-edit" part of the updateDiveInfo() function.

Fixes #392

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-27 17:31:23 -08:00
Dirk Hohndel
74faca5d43 Handle editing a manually added dive consistently
Regardless of whether the user clicks in the info tab, makes a change to
equipment or starts by editing the profile (i.e., clicking on the little
penguin), we should get into the same state and behave the same way.

This means that when editing a manually added dive we are always in
editMode == MANUALLY_ADDED_DIVE - and editMode == DIVE means we are
editing a dive that came from another source.

Fixes #379

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-27 17:12:38 -08:00
Dirk Hohndel
a35a28ab38 Fix warning about initialization ordering
I cannot tell what the potential impact of this might be, but the fix is
trivial.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-27 11:07:59 -08:00
Benjamin
31854f50a4 Disable DC device node if it is not needed
This patch disables/enables the DC device node based on what type of
transport the selected DC uses. The only time the device node field is
used is if the selected DC uses a serial transport type. IrDA and USB type
transports do not use the device node.

Signed-off-by: Benjamin Fogel <nystire@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-27 11:04:35 -08:00
Miika Turkia
55da333881 Install Subsurface icon
We want to install the Subsurface icon so it can be used e.g. in menus.
(Commit ee5d8e3c moved the icons to resources, but the application icon
is special case, that should be installed globally.)

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-27 10:55:40 -08:00
Dirk Hohndel
5fca06c9e6 Display warning that dives won't be downloaded when enabling libdc dump
The warning is only shown once per session.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-26 09:18:57 -08:00
Patrick Valsecchi
06875c7cbd Small code simplification
Use QStringList::contains instead of iterating the list.

Signed-off-by: Patrick Valsecchi <patrick@thus.ch>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-26 08:42:20 -08:00
Dirk Hohndel
3fb3bd60b6 Don't reset panels while editing a dive
MANUALLY_ADDED_DIVE is a different flavor of ADD mode (in both cases we
are in "planner mode"), so bail out for that as well.

See #379

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-25 13:06:29 -08:00
Miika Turkia
57f85a773a UDDF export: save events occurring between samples
UDDF export saved events only if they occurred at exactly same time as a
profile sample. This patch will include events between samples as well.
This assumes that profile samples are recorded in even intervals.

Fixes #385

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-25 12:47:02 -08:00