Commit graph

8514 commits

Author SHA1 Message Date
Miika Turkia
0d2d91a28c Cobalt import: use find or create divesite
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-24 13:20:40 -07:00
Miika Turkia
c2b45ab1e2 Divinglog import: find or create divesite
We obviously should lookup if the dive site already exist before
creating a new one.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-24 13:20:31 -07:00
Dirk Hohndel
a05e37188b QML UI: make sure the dive list is empty before loading dives
When testing subsurface-mobile on the desktop from an account that had a
default file set up in the Subsurface preferences that file would already
be loaded creating rather confusing output.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-24 13:18:30 -07:00
Dirk Hohndel
7e7dcb2451 QML UI: sort by date, not by date string
Just a quick bit of cleanup to separate date (the sortable, numeric value)
from the date string that we want to display (but not sort by).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-24 11:17:48 -07:00
Dirk Hohndel
0029844b1c Merge branch 'devel' of https://github.com/gracie89/subsurface 2015-07-24 09:44:47 -07:00
Rick Walsh
292982cdd5 Spell rebreather with an h
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-24 09:43:24 -07:00
Miika Turkia
25ea932e81 Update user manual to reflect new way of DivingLog import
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-23 13:57:24 -07:00
Rick Walsh
361ddd9634 Planner: correct output of planner mode
Previously we used strncat to output VPM mode without correctly defining the
length of the string, and didn't do anything for recreational mode.  This
resulted in the output being junk recycled from the previous temp string.

We could use strncat if the string length were defined, but using snprintf will
make it simpler to include the VPM conservatism when that has been implemented.

Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-23 08:12:29 -07:00
Miika Turkia
aa4ed491fd Divinglog import: fix maximum depth
Max depth is recorded in floating point in metadata.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-23 06:30:39 -07:00
Grace Karanja
e93bb9230f QML UI: Add download from divecomputer window
Add a window to be used when downloading from dive computers.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-07-23 14:46:52 +03:00
Dirk Hohndel
9a68e356af Make password change asynchronous
This isn't perfect (if you make multiple requests things could go badly),
but it's better than just slapping the new password into the settings,
even if the update failed.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-22 15:06:57 -07:00
Miika Turkia
aa9c2b7384 Add sample pressure to be auto-filled on Seabear import
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-22 11:57:47 -07:00
Miika Turkia
fed9aa8086 Include debug printout for easier manual testing
When Subsurface is run with high enough verbosity level, generate
command line to test Seabear import manually with xsltproc.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-22 11:54:12 -07:00
Miika Turkia
2192443a1e Fix Seabear CSV import
It seems that adding parameters to the Seabear import has resulted in
the parameters to be missed. And this led to parsing error / recursion.
This patch tries to tackle the problem by introducing dynamic parameter
counter to the mix.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-22 11:51:31 -07:00
Miika Turkia
d1d12ad1db Clean up some parameters on CSV import
We do not really need the buffers when doing CSV import. Instead we use
dynamic memory allocation for the values. Note that Seeabear part is not
tested as it that import is not working for me anymore.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-22 11:22:33 -07:00
Miika Turkia
f4799e67b8 Always use "csv" parsing for Seabear
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-22 11:22:12 -07:00
Miika Turkia
0a69c35501 Strip unit from Seabear sample interval value
XSLT parsing treats this as numeric value, thus we need to strip out the
" s" part.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-22 11:22:05 -07:00
Miika Turkia
b98396e10f Fix Seabear import if line ends with NL
We need to start second search from the start of the buffer if \r\n
search returns nothing.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-22 11:21:59 -07:00
Miika Turkia
c9a98a4f7b Add a known type for second DC on APD import
This patch adds importing of sensor values from the second DC on APD log
import.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-22 11:21:50 -07:00
Miika Turkia
ac4871c699 Import sensor values for autodetected APD files
If APD Log Viewer format is automatically detected, we should set the
sensor values to be imported properly. These need to be added to the
firstline and since we convert the number 2 from column headers to
subscript, this step must be skipped for the APD import.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-22 11:21:43 -07:00
Miika Turkia
bf45eddceb CSV import test wrong values
We need to test for the sensor values on CSV import, not the po2.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-22 11:21:34 -07:00
Miika Turkia
6ab87a7420 Clean hard coded values on divelog CSV import
Hard coding the values of known imports is quite awkward if we add
these. Thus switching to use enum and names instead.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-22 11:21:16 -07:00
Miika Turkia
2d2d890ac7 Increase the recursion for Seabear CSV import
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-22 11:21:02 -07:00
Dirk Hohndel
ce008f52db Cloud storage: enable password update
This now allows the user to set a new password for the cloud service.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-22 11:10:40 -07:00
Grace Karanja
b0df506a8c QML UI: Sort dives by date
Sort the dives by date, with the latest one appearing before the
others.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-07-22 19:09:49 +03:00
Dirk Hohndel
3ba3de8daf Add UI for cloud password change
This isn't hooked up yet, just the UI elements.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-22 07:34:36 -07:00
Grace Karanja
ab44c78993 QML UI: Move DiveDetails to the StackView
Add a DiveDetails.qml to hold the dive details, and display it in
the stack view when the user taps on a dive.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-07-22 09:53:19 +03:00
Grace Karanja
ea11eff279 QML UI: Implement saving of cloud password
If the user ticks the 'Save Password' box, then we save the password
for future use.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-07-22 09:53:19 +03:00
Miika Turkia
b28517b9b0 Add setpoint support for CSV import
The import of setpoint values is tested with Seabear data.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-21 07:34:24 -07:00
Miika Turkia
2fc54b6855 Add setpoint support on CSV import (XSLT parsing)
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-21 07:34:13 -07:00
Miika Turkia
19b54dc9ef Default to first tab on export
The divelog export dialog was changed to default to the HTML export when
changing the layout to resemble other dialogs (commit 42acaa40).
However, the default tab should be the first one with most of the export
formats and options.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-21 07:33:31 -07:00
Tomaz Canabrava
8856753faf Use correct colors on selection
I was wondering why the colors where wrong on mac, it took
me a while to find the correct spot to fix. It seems that
the Brush is not used to paint the fonts, but the Pen is.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-20 21:43:20 -07:00
Tomaz Canabrava
e8d4bdff59 Try to fix paint issues on windows
Davide complained about a flickr on windows, I think it
has to do with the QPainter now knowing the right
size of it's paint rect. this should fix it.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-20 21:43:03 -07:00
Tomaz Canabrava
ae03ece7fa Code uneeded because the drawControw does this by itself
Removing dead code. the call above this does that already.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-20 21:42:44 -07:00
Guillaume GARDET
73ac9848cb Documentation: update french translation of user-manual
Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-20 10:37:40 -07:00
Miika Turkia
4b09cd469e Add tooltip for geolocation lookup
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-20 10:37:30 -07:00
Dirk Hohndel
43798702ff Only enable Bluetooth support if building against Qt5.4 or newer
Also remove the quick hack from commit 947fda14c5 ("Bluetooth support:
quick build fix for Qt5.2"). I should have thought this through before
pushing that commit, but oh well.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-20 09:35:00 -07:00
Dirk Hohndel
947fda14c5 Bluetooth support: quick build fix for Qt5.2
The InvalidBluetoothAdapterError error code wasn't introduced until Qt5.3,
so let's not test for it on older versions of Qt.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-20 07:09:07 -07:00
Dirk Hohndel
e3a8ff7493 Merge branch 'custom-print' of github.com:neolit123/subsurface 2015-07-20 06:14:19 -07:00
Joakim Bygdell
7baa18db5f Enable Android build on Mac
This Changes the NDK, SDK, JAVA_HOME and ant to the appropriate versions
and locations when the script runs on a Mac.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-20 05:52:11 -07:00
Claudiu Olteanu
6608b4c7a9 Update the message shown on pairing erorrs
Advice the user to use his operating system for the pairing
step if the remote device requires a custom PIN code.

Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-20 05:52:10 -07:00
Claudiu Olteanu
5fd0c7dd43 Fix typos on Bluetooth selection widget
Fix "lable" typos from Bluetooth selection widget.

Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-20 05:52:10 -07:00
Claudiu Olteanu
aaf61c52d8 Hide the local BT combobox if there is only one device
If there is only one local Bluetooth adapter, then hide the
selection combobox and the label.

Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-20 05:52:10 -07:00
Claudiu Olteanu
8c373f419d Use SPP's uuid to connect to a device on Apple platforms
Use the uuid of the Serial Port Profile service to connect to a remote
Bluetooth device on OS X (and iOS) platforms with a Qt version greater
than 5.5.0.

In the future the same section should be used for BT connectivity on
Linux platforms. Currently there is a problem with the SDP discovery
and it doesn't work as expected.

[Dirk Hohndel: modified OS check for consistency]

Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-20 05:51:38 -07:00
Claudiu Olteanu
8d2b6142c6 Don't close the BT selection Widget if the local BT adapter is invalid
Don't close the Bluetooth selection widget if the default local
Bluetooth adapter is invalid. Maybe there is a problem with the default
Bluetooth device and the user has another one (a BT dongle) which can be used.

If the selected device is invalid then update the UI information,
disable the available buttons and announce the user about the problem.
Also move the device changed logging message before we call the
update information method. In this way the logging message with
the problem will not be overwritten.

Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-20 05:39:43 -07:00
Claudiu Olteanu
5ccf3e81eb Log errors which occur during Bluetooth device discovery
Register to the signal emmited when an error occurs during
Bluetooth device discovery and log a description of the
error which can be used to identify problem's cause.

Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-20 05:39:43 -07:00
Claudiu Olteanu
0cf5214c15 Reinitialize the BT discovery agent when a new adapter is selected
Reinitialize the Bluetooth device discovery agent when the user
selects a new local Bluetooth adapter using the address
of the selected device.

Before this patch the agent was always using the local default
Bluetooth adapter.

Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-20 05:39:43 -07:00
Claudiu Olteanu
b5ac3a3fa8 Add combobox for Bluetooth local device selection
Add a combobox which can be used to list/select the available
local Bluetooth devices. In this way, if a user has more
than one local Bluetooth devices (integrated, dongles, etc.)
he can choose which one he wants to use.

Before this patch, only the default local Bluetooth device
could be used.

Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-20 05:39:43 -07:00
Claudiu Olteanu
000c202d7d Don't block the save button for Bluetooth device selection
After commit 619e97ee4f ("Stop the SDP agent if the Clear/Save button
was pressed") we don't need to block the save button anymore for scanning
completion because the SDP agent will be stopped manually if the Save
button was pressed.

Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-20 05:38:56 -07:00
Gehad elrobey
599920c6cf Printing: export grayscale filter value to template
Export grayscale value to Grantlee template, So we must declare
print_options as QMetatype.

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-07-20 15:29:05 +03:00