Commit graph

7099 commits

Author SHA1 Message Date
Tomaz Canabrava
3d8e2d0643 Skeleton code for the model that has the columns information
Just the skeleton, then start doing stuff.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-06 19:34:51 -08:00
Tomaz Canabrava
48775c530e Clean a lot of code for a new and improved CSV import dialog
This mostly cleans out stuff that is going to be uneeded.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-06 19:34:45 -08:00
Anton Lundin
37830bdb53 Always show deco gas as dive gas
This unifies how we prints Nitrox deco gas dives with Trimix deco gas
dives.

Reviewed-By: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-06 15:04:10 -08:00
Anton Lundin
ae6f5f0a5a Remove unused imports
These doesn't exits in Qt for android to...

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-05 19:37:53 -08:00
Anton Lundin
48b091c369 DLF import: Document unknown fields
Signed-off-by: Anton Lundin <glance@acc.umu.se>
2015-01-05 14:09:48 -08:00
Anton Lundin
ea7f861d3d DLF import: Decode and import ceiling information
This imports the ceiling information as stopdepth, our way of showing a
ceiling.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-05 14:08:55 -08:00
Anton Lundin
ac6e84c4fd DLF import: Decode and import temperature
These decodings and constants makes the numbers line up perfectly with
the numbers presented on wetnotes.com.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-05 14:08:42 -08:00
Anton Lundin
11542d84f7 DLF import: Decode and import NDL and TTS
The units of these values are guessed, but these values makes they match
up well with the values we calculate ourself.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-05 14:08:06 -08:00
Anton Lundin
5e56bbf2aa DLF import: Decode ppO2
This decodes the ppO2 value stored in the DLF files. It looks like the
DiveSoft Freedom computers always stores the ppO2 value, even for OC
dives.
This import only stores the ppO2 value from CCR and PSCR dives, where
these values comes from sensors and makes sense to store.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-05 14:07:54 -08:00
Anton Lundin
6f3ef2a964 DLF import: Restructure depth decoding
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-05 14:07:38 -08:00
Joakim Bygdell
4b98d17800 Give oxygen a proper colour in the tankbar
Oxygen should be representad by its own solid green colour not the yellow/green of nitrox.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-05 13:30:47 -08:00
Joakim Bygdell
88d806f218 Use correct name for oxygen
When O2 is 100% we should use oxygen instead of EAN100.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-05 13:30:19 -08:00
Miika Turkia
344e517956 Need to warn about some more characters on CSV import
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-05 11:36:53 -08:00
Dirk Hohndel
65eed80e37 Don't always show the setpoint graph
We need to use the same conditional here as we do earlier in the code.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-05 11:14:59 -08:00
Willem Ferguson
0de3bc8452 Display CCR setpoint values on the po2 graph
When a CCR dive is viewed and the toolbar button for PO2 is activated,
both the PO2 (green line) and the O2 setpoint (red line) are shown.
This allows evaluation of the PO2 in the CCR loop with respect to the
pre-configured O2 setpoint.

The setpoint graph can be disabled from the Preferences/Graphs tab
by checking the appropriate checkbox.

Signed-off-by: willem ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-05 09:18:06 -08:00
Miika Turkia
27bfbee4e8 Caveats of CSV import added to documentation
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-05 09:14:08 -08:00
Miika Turkia
4dff1e7b93 Indentation fix for Subsurface CSV import
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-05 09:13:40 -08:00
Miika Turkia
182ea3ea6c Support for multi-line notes on SubsurfaceCSV import
This patch only implements the feature, indentation fix is to follow.
This ensures that the actual change can be more easily reviewed.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-05 09:13:35 -08:00
Joseph W. Joshua
a409c73195 Various capitalization fixes
Fix various discrepancies in the capitalization format, as we are using
'down format' for titles and actions.

Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-05 09:06:35 -08:00
Miika Turkia
c00a5614f3 Add required empty fields on CSV export
We need to have empty field printed for every value on the CSV export.
Hopefully this is enough.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-05 09:06:05 -08:00
Miika Turkia
9e2e62ec4f Initialize edit hack variable
The accepting mode variable must be initialized to false to allow
editing of dive data.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-04 23:19:52 -08:00
Miika Turkia
48b88f6aca Do not add uninitialized setpoint or ndl
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-04 23:11:03 -08:00
Joseph W. Joshua
d39eb81bfb Fix Capitalization
Capitalize the word Facebook in 2 occurences in socialnetworks.cpp

Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-04 22:56:33 -08:00
Dirk Hohndel
c8768194df Update strings and translations
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-04 17:56:27 -08:00
Anton Lundin
6b17f20081 Close two compiler warnings about reordering
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-04 17:52:21 -08:00
Joseph W. Joshua
7f407095aa Fix spelling error
Fix small spelling error in configure dive computer dialog.

Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-04 17:51:52 -08:00
Miika Turkia
fdd152af71 Make sure we do not fall back to edit mode on accept
On Ubuntu 14.04 the edit mode does not exit successfully when applying
the changes. It instead jumps back to edit mode (even though hiding the
option to apply/discard changes again). So let's just have a flag to
prevent faulty behavior.

Fixes #786

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-04 10:53:10 -08:00
Dirk Hohndel
f7b3c8b496 The margin between toolbar and profile looked strange
Especially on Mac where there is already a lot of padding around the
action buttons.

Also made the spelling of the zeroMargins variable more consistent.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-04 08:05:30 -08:00
Dirk Hohndel
87d67157a3 Latest strings and translations
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-04 07:45:14 -08:00
Dirk Hohndel
317bbe4425 Fix incorrect name for layout
If I want to use the names to make more sense out of the layouts, I might
as well name them correctly...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-04 07:42:28 -08:00
Dirk Hohndel
e02a6b9c42 Make text in user survey follow our capitalization conventions
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-04 07:42:08 -08:00
Dirk Hohndel
371c91f5ea Attempt to move the more frequently used toolbar actions to the top
This is highly dependent on the user, I guess. So I may be totally off
here. But the previous order was pretty much random (and even tried to
push one button in there twice in a row)...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-04 07:31:22 -08:00
Dirk Hohndel
a308d2b7b4 Fix toolbar icon size issue
Instead of messing with the margin (which didn't work, anyway), we need to
set the size of the icons. Apparently on Linux this was implicitly done,
but on Mac it didn't scale the icons and provided space for the largest
one (and we have a couple that are twice as big as the others).

What we really need are scalable icons that allow us to set the icon size
relative to the font size. But for now this solves the ugliness on Mac.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-04 07:15:23 -08:00
Dirk Hohndel
71f3a29819 Trip editing: zero out potential previous edits
This was silly; if we rely on this to be zero to indicate no change then
we better zero it out when we start editing.

Fixes #805

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-04 06:43:36 -08:00
Dirk Hohndel
6d1e44f05c Layout fine-tuning: remove the outermost margin around the window
That added visual distraction on some desktop themes.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-03 23:11:54 -08:00
Linus Torvalds
08d2ceb66b Extend SAMPLE_EVENT_GASCHANGE2 to have cylinder index in 'flags' field
A value of zero (which is the normal legacy one) remains "unknown", but
the divecomputer backend can now give both gasmix and cylinder number
this way.

Currently only the EON Steel backend does that, but it should be easy
enough to extend others too.

Also, fix the user-visible cylinder numbering in the cylinder change
tooltip to use a human-friendlier one-based numbering (ie first cylinder
is "cyl 1", not "cyl 0")

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-03 21:36:51 -08:00
Dirk Hohndel
92733049a7 Latest strings and translations
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-03 16:17:31 -08:00
Dirk Hohndel
ccfea0872d When editing trip data, only copy actual changes
We zero out the displayedTrip and only copy changed data into it; so a
NULL value is not deleted text, it means there was no change.

Fixes #805

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-03 16:06:00 -08:00
Dirk Hohndel
5cc261311e Fix the update check logic
Oops. That was supposed to do the opposite of what it ended up doing. The
goal was to NOT check for two weeks when the user updates to a new
version.
Instead it always checked when the user updated to a new version.
This mostly would hit developers...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-03 13:47:05 -08:00
Miika Turkia
09f5289271 Fix cross references in user manual
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-03 09:45:33 -08:00
Miika Turkia
4f17cd860f Interpolate running depth when necessary
The running depth must be interpolated when sample interval is more than
10 seconds.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-03 09:45:25 -08:00
Linus Torvalds
9a4cafd0f1 Fix gaschange tooltip information
The code tried to look up the cylinder index from the Qt data models,
which was not only horribly confusing, but was also buggy.  I think the
index ends up being off by one when the first cylinder change is hidden
(because it's at the beginning of the dive), but I can't make heads or
tails of that crazy code, so there might be something else going on.

Just remove all the crazy code, and use the event data directly.  Which
gas the gasmix and the (potential) explicit cylinder index already.
It's much more straightforward, and it just automatically gets the right
end result whether some other event is hidden or not.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-02 22:43:21 -08:00
Miika Turkia
c2b076548d Fix a crash when dive date is epoch
With a dive that's date is 1970-01-01, starting at 00:00 the assert
causes subsurface to crash when performing auto grouping. This happens
to be a perfectly valid date, and we might end up getting such dates
when importing dives from other software, so removing the assert.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-02 22:42:03 -08:00
Linus Torvalds
ddd0523bb4 git save format: Don't save redunant temperature sample data
The git sample loader will fill in temperature data from the previous
entry anyway, so saving repeated temperatures is just wasteful.

It turns out that commit 6cf3787a0e ("Remove code that zeroes out
duplicate oxygen sensor and temperature values") removed the explicit
redundant temperature removal in the dive fixup, which had hidden this
issue.

Cc: willem ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-02 22:39:17 -08:00
Dirk Hohndel
3212bfdf99 Small tweaks to the Mac package making scripts
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-02 22:26:36 -08:00
Dirk Hohndel
8a312616b0 Zero out the margins instead of just not changing them
At least on the Mac some objects appear to have generous default margins.
This creates a somewhat less wasteful layout. Still we have those massive
margins around the toolbar buttons.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-02 22:24:51 -08:00
Dirk Hohndel
7482e0540d Layout fine tuning. Exclude a few more layouts.
The goal is to have things look as consistent as possible - so if some
elements have another nested level of layouts, their margins need to be
zero.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-02 22:24:50 -08:00
Dirk Hohndel
bdaaf23a82 Remove margins from maintab.ui file
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-02 22:24:50 -08:00
Dirk Hohndel
17195e44a5 Remove all margins from mainwindow.ui file
And adjust them in code instead. This seems to look nice.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-02 22:24:50 -08:00
Dirk Hohndel
36ba5d3382 Give more layouts reasonable names
This time for the mainwindow.

This includes an adjustment in the C++ code where we actually referenced
one of those weird generic names.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-02 22:24:50 -08:00