Commit graph

6308 commits

Author SHA1 Message Date
Tomaz Canabrava
7c5c38b154 Addded a min / max layout for the filter, and a filter count
But the filter count seems to be broken for some reason and
I really don't know why. It seems to work for tags, but
not for everything else.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-16 18:34:47 +00:00
Willem Ferguson
7967d2bec1 User manual: Using CCR equipment with Subsurface.
This is a first stab at some text detailing the import
and handling of CCR dives within Subsurface. Three figures
added.

Signed-off-by: willem ferguson <willemferguson@zoology.up.ac.za>Kind
regards,
willem

From da16229327331731794b356b8e8504a4cd160634 Mon Sep 17 00:00:00 2001
From: willem ferguson <willemferguson@zoology.up.ac.za>
Date: Sun, 16 Nov 2014 15:50:44 +0200
Subject: [PATCH] Update user manual with CCR instructions

This is a first stab at some text detailing the import
and handling of CCR dives within Subsurface. Three figures
added.

Signed-off-by: willem ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-16 17:18:18 +00:00
Dirk Hohndel
d84f76ae14 Revert "Save cylinder pressure from samples"
This reverts commit 763dfef315.

I didn't pay enough attention when accepting this - it saves redundant
data.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-15 09:40:53 -08:00
Dirk Hohndel
499d35f4ff More strings and translations
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-15 08:18:26 -08:00
Miika Turkia
5807e4589f Initial support for Suunto DM5 import
This implements import from Suunto DM5 database, but there is something
wrong with some of the sample dives in the database I received as
sample. It seems that we should detect missing/bogus data and treat it
properly as divelogs.de does with the same dives. Anyway, when we have
proper data, this import appears to produce sensible results.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-15 08:15:15 -08:00
Dirk Hohndel
ff193e309c Consistently have a space between file type and extension
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-15 08:01:12 -08:00
Dirk Hohndel
adabbb182d Updated strings and translations
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-15 06:46:23 -08:00
Miika Turkia
70939a1d84 Fix parsing of Windows new lines on Mk6 import
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-15 06:05:22 -08:00
Miika Turkia
744e14b450 Save the diluent pressures to XML
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-15 06:04:58 -08:00
Miika Turkia
763dfef315 Save cylinder pressure from samples
If start and end cylinder pressure is not explicitly set for secondary
cylinders, we must store the start and end pressures from the
sample_{start,end} attribute. Faulty behavior is obvious at least when
importing Poseidon logs.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-15 06:04:40 -08:00
Salvo 'LtWorf' Tomaselli
4ef35f0651 Mark string for translation
An error string was left untranslated.

Signed-off-by: Salvo 'LtWorf' Tomaselli <tiposchi@tiscali.it>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-15 06:02:30 -08:00
Dirk Hohndel
8d766e13e2 Make sure we always have copies of equipment descriptions
Having pointers copied around that might get freed elsewhere could be a
problem.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-14 13:45:54 -08:00
Tomaz Canabrava
1055b5afd3 Fix memleak on Pixmap cache
as we load dives and dives, new DiveEvents will be created
but the transparent pixmap never deleted, also this makes
the transparent pixmap only for the correct event, not for
all of them.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-14 13:45:54 -08:00
Dirk Hohndel
b800530bcd Don't show a pixmap for heading event
Some dive computers appear to have heading data in every sample. In order
to avoid a completely cluttered dive profile we no longer show a flag for
every heading event but instead show a basically transparent pixmap (which
is invisible to the user) that allows us to report the heading information
in the tooltip but leaves the profile uncluttered.

Fixes #586

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-14 10:39:18 -08:00
Dirk Hohndel
87575a24c2 First stab at README and ReleaseNotes for 4.3
It's never too early to start...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-14 08:57:31 -08:00
Miika Turkia
910d1cff74 Add .txt as dive log file
Add the .txt to the list of all dive log files as this is the file we
expect to be opened for Poseidon Mk6 log files.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-14 08:50:36 -08:00
Lubomir I. Ivanov
f602408dcd Print: support margin saving for older Qt versions
Seems like QMarginsF and QPageLayout were added quite
recently - in Qt5.3!

We attempt to support older versions by using something
found in the Qt4.7 documentation.

Patch also fixes small ordering issue where top / left
margins were swapped.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-14 08:49:53 -08:00
Dirk Hohndel
406ad7786e Latest strings and translations
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13 15:36:11 -08:00
Lubomir I. Ivanov
7ea728e95f Print: add the support to store margins and printer options
All the print options will be stored after the user closes
or "cancels" the print dialog.

There seems to be no good way to store the last
selected page size, because print dialogs are different and
some just list them as strings - A4, A3, etc.

The patch also applies the following changes:
- renames display.h's 'struct options' to 'struct print_options'
as these were really just for the print dialog
- the print_options dialog now stores more options as 'bool'
- demote PrintDialog's 'printOptions' to 'private'

Fixes #653

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13 15:05:11 -08:00
Dirk Hohndel
b2077dc9c0 Better menu entry for filter
This is no longer just a tag filter. Also, since we use this entry (and
its shortcut) like a toggle we should mark the menu entry accordingly.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13 14:27:30 -08:00
Dirk Hohndel
d765f7a991 When closing filter dialog via menu / shortcut, also reset them
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13 14:24:09 -08:00
Dirk Hohndel
2cd31a30f2 When closing the filter window also clear the filter
The tooltip already pretended that that's what it did...

Also make the tooltip wording consistent.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13 13:46:19 -08:00
Dirk Hohndel
ac9ead4571 Random whitespace cleanup
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13 12:52:35 -08:00
Dirk Hohndel
8086b39e11 Adjust the counter function for filter with "none of the above"
So this should count dives with neither buddy nor divemaster, without a
location, with no tags, etc.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13 12:45:32 -08:00
Dirk Hohndel
dae76cdc2d Add a function to count dives with a specific suit
Checking against the location field probably wasn't the best way to do
this...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13 12:35:12 -08:00
Tomaz Canabrava
01cd09c77a Fix use of QString
We should use references when we are not wanting to make a copy
of it.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13 12:10:21 -08:00
Tomaz Canabrava
e7e58bf9ea Fix QString use
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13 12:10:09 -08:00
Tomaz Canabrava
dee20906e3 Suits Widget created and working.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13 12:09:58 -08:00
Tomaz Canabrava
b7da2a9c44 This is already checked in doFilter
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13 12:08:48 -08:00
Tomaz Canabrava
462091b963 Create the doFilter for the Suits.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13 12:06:20 -08:00
Tomaz Canabrava
fdbdcaab80 Suits filterRow method done.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13 12:06:08 -08:00
Tomaz Canabrava
bfdd94ddc3 Suits update method done.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13 12:05:56 -08:00
Tomaz Canabrava
88d19bca6c Added skeleton of the Suits Filter.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13 12:04:44 -08:00
Tomaz Canabrava
16e44b31d3 Last one: Common 'data' method for StringList based Filters.
This is the last of the series of Macros that I'll do to ease
the creation of a QStringListModel based filter.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13 12:04:28 -08:00
Tomaz Canabrava
51f8010c9b Call all common methods once per class in an easy way.
New method to simplify the creation of 4 of the common
methods for each filter in an easy way. There are
a few other methods that I'm also thinking on how
to do this.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13 12:03:30 -08:00
Tomaz Canabrava
76e1fe3ee7 Create a common macro for flags
samething as the other commits, use common code.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13 12:02:50 -08:00
Tomaz Canabrava
dfb2575dff Clear filter is always the same for a filter based on stringlist
So, let's always use the same codebasee

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13 12:02:37 -08:00
Tomaz Canabrava
5346b78e6c More cleanup using Macros.
The setData of any filter based on a StringList with
checkboxes should be the same, so let's use the same
codebase for it.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13 12:02:24 -08:00
Tomaz Canabrava
dfea10fbb8 Create a CREATE_INSTANCE_METHOD macro
This is just to simplify the creation of more filters.
more macros will be used, because I tend to abuse them.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13 12:01:56 -08:00
Tomaz Canabrava
10fecefddd Move the filters code to it's own file.
We already have a bunch of filters, let's pack them together

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13 12:01:00 -08:00
Lubomir I. Ivanov
1481382617 windows.c: small cleaup in the wrapper functions
- use an already defined 'ret' value if available
- don't put free() calls in NULL check branches (saves a line)

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13 12:01:00 -08:00
Lubomir I. Ivanov
4096383fb5 Add subsurface_access()
For our usage the method will acept UTF-8 paths,
which are converted to UTF-16 on Win32.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13 11:58:59 -08:00
Dirk Hohndel
61dc19d2e0 Show the number of dives with given person / location in the filter panel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-12 16:02:37 -08:00
Dirk Hohndel
5a329ff262 Update translations strings
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-12 14:48:01 -08:00
Anton Lundin
a06befc007 Support different salinity in planner
Depth is often mentioned in a length unit, but what we care about is
pressure. When diving in fresh water the pressure is lower than the same
depth in salt water. This adds support for using different salinities in
planning.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-12 14:42:15 -08:00
Lubomir I. Ivanov
1617d437d4 profile.c: fix a bug in calculate_gas_information_new()
In a test case loading dives/test35.xml results in a infinite(-like)
loop (Note: possibly requires the partial pressure plots enabled).

calculate_gas_information_new() has an 'if' branch to
update the cylinderindex to a dive's diluent_cylinder_index,
but it does not consider that said index can be set previously
to -1.

This results in a random neighbour memory assigned as
&dive->cylinder[-1].gasmix and passed to fill_pressures(..).

Following the calculations in the function the He gas,
can receive a bad value (e.g. for the test case in the
E+6 ranges).

Said value is then used in DivePlotDataModel()::pheMax()
(defined by MAX_PPGAS_FUNC()) resulting in one of the loops
(the 3rd one) in DiveCartesianAxis::updateTicks() to
loop indefinitely.

Fixes #759

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-12 14:41:39 -08:00
Salvo 'LtWorf' Tomaselli
e024a5b207 Shows an error about wrong permissions
If an import fails, the permissions of the device are tested and an
error message that mentions permissions is shown to the user.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-12 14:41:27 -08:00
Dirk Hohndel
2295e0c21e Merge branch 'fixFilterSelection' 2014-11-12 14:10:49 -08:00
Dirk Hohndel
0b31854031 Deselect dives that are no longer shown as the dive list is filtered
This cleans up the way we ensure that all dives are handled as the dive
list is filtered.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-12 14:07:07 -08:00
Dirk Hohndel
0b7370adeb Another update to strings and translations
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-12 10:22:11 -08:00