Commit graph

7425 commits

Author SHA1 Message Date
Tomaz Canabrava
a5448ef729 Remove dead code.
This code used to trigger the edit mode a long time ago
since now I'm re-reading the code to implement the
same stuff on the Location edit mode, I realized that
this is not needed anymore.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-10 07:46:50 -07:00
Tomaz Canabrava
53d20f5b8a Do not show the Edit mode message when entering location management screen
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-10 07:46:30 -07:00
Anton Lundin
deb2caf3e0 Import subsurface-android build script
Over one year ago i started with a crazy idea, "Wouldn't Subsurface on
android be nice?" when i read about Android support in Qt.

After playing around with it and doing some quite ugly hacks i got it to
build and run.

Now are all the patches upstream and this imports the quite crude build
script, for others to continue on.

This is a squash-import of what have have happened in
https://github.com/glance-/subsurface-android during 2014.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
CC: Joseph W. Joshua <joejoshw@gmail.com>
CC: Venkatesh Shukla <venkatesh.shukla.eee11@iitbhu.ac.in>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-09 12:53:01 -07:00
Joakim Bygdell
20a82e2b21 Improve gas accounting in the panner
When using gasmixes where the difference is less than 2% the planner can't
caclulate casconsumptions correctly. This sets the minimum gasdifference
to 1%.

Fixes #795

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-09 10:39:50 -07:00
Anton Lundin
237043d6ba Fix building with NO_PRINTING for Android
Back in 4867ee8ad8 ("Move the Profile out
of the mainwindow.ui") the way to access the PlannerDetails object
changed.

This does the corresponding change to the NO_PRINTING block, making it
build on Android again.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-09 09:44:00 -07:00
Miika Turkia
724772ef68 Include upper case extensions on import dialog
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-08 12:55:47 -07:00
Miika Turkia
a22adb8334 Ignore buddy pressures in Liquivision import
Since we do not currently handle buddy pressure properly, let's just
ignore that information for now. Unfortunately, this information is lost
in this case, but if we include it, the pressure graph is going to be
bogus.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-08 12:55:37 -07:00
Miika Turkia
0ebfcfdf68 Fix a crash on Liquivision import
Without the patch, there is a crash if the dive does not have a
location.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-08 12:55:22 -07:00
Robert C. Helling
c67812acc3 Add explicit setpoint change at t=0 when planning CCR dives
As we now have the logic that there is always an explicit setpoint at
t=0sec for CCR dives, also the planner should honor that.

This fixes a bug that when planning a CCR dive we later add a
setpoint change this influenced the ceiling _before_ the
setpoint change.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-08 12:54:39 -07:00
Grace Karanja
182fe790c9 Add ability to undo renumbering of dives
Expand the undo feature by storing a list of renumbered dives' ids
and numbers so that the original numbers can be restored if needed.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-28 12:44:14 +01:00
Gehad elrobey
0995a800d9 HTML: Add Max. depth to dive view.
Add Max. Depth feild to the expanded and main dive views.

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-28 12:43:17 +01:00
Gehad elrobey
100f4ee1a4 Show notification message while logs are converted from v2
This is another long operation that needs showing a notification about
importing the old format log files

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-28 12:42:50 +01:00
Gehad elrobey
90d68ead31 Show translated String.
Translated notifications are always better.

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-27 06:31:12 +01:00
Gehad elrobey
f61b59d961 Change the references to ShowError to the new notification object.
Showing an Error message is better called from the Notification Object,
So for consistency old references to showError is replaced by calling
the notification object.

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-27 06:31:10 +01:00
Gehad elrobey
59ab849854 Creating a Notification widget in the Main Window.
The main error message bar can be used to show exporting information and
other notification.

So a new Notification handler object is created in the main window
<NotificationWidget> that inherits <KMessageWidget> that shows different
type of notifications, ex. (Warning, Error and information)

Also this class contains a QFutureWatcher object that is set to handle
the QFuture variable returned from the exporting thread. this will allow
the UI to be updated when the thread finishes execution.

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-27 06:31:06 +01:00
Robert C. Helling
e6482bbdc8 UI to learn hashes of local image files
This addes a menu entry for the user to select a directory that is recursively
traversed to look for image files and compute the hashes of those images (for
those images to be available to be displayed in dives according to their hash values).

This traversal and hash computation happens in and independend thread and so far
the only feedback to the user is that upon completion the dispayed images are updated.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-27 06:30:49 +01:00
Robert C. Helling
b02bf002a6 Add hashes to images
Upon successfull reading an image file, this computes a SHA1 hash of the
image and saves it with the picture tag in the log file. When a file is
not successfully loaded (for example because the log was created on a
different computer) we look up the hash in a dictionary that maps hashes
to local file names.

That dictionary (actually two for both directions), is loaded on startup
and saved upon destruction of the main window.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-27 06:29:44 +01:00
Lubomir I. Ivanov
ea00fdb36a qt-gui.cpp: fix imcomplete type error
qt-gui.cpp:44:2: error: incomplete type 'QTextCodec' used
in nested name specifier

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-26 11:30:04 +01:00
Dirk Hohndel
0ed4356fc2 Display slowness warning before opening a V2 file
This is somewhat invasive as aborting the XML file read requires us to
report things up the recursive parsing chain.

What we really need to do here is to ask the user how they want to use the
data from reverse geo lookup. But for now we only warn about the fact that
this can take a while.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-25 10:05:37 +01:00
Patrick Valsecchi
d15641a6fa Cmake build now contains icons
Fixed the icon problem Dirk found.

We really should choose between qmake and cmake. I wouldn't care about
cmake if qmake was building the UTs...

From 8eeea28a523fd6ef588d81b82ab904d4512b3d7a Mon Sep 17 00:00:00 2001
From: Patrick Valsecchi <patrick@thus.ch>
Date: Tue, 24 Feb 2015 09:06:37 +0100
Subject: [PATCH 3/3] Cmake build now contains icons

Signed-off-by: Patrick Valsecchi <patrick@thus.ch>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-24 11:41:39 +01:00
Patrick Valsecchi
1c55f47662 Fix Ubuntu compilation error.
Ubuntu has git minor version 20 which has less parameters in
git-remote-fetch.

From ac9516984e4fbc787635b0dfd76649c8e43fab83 Mon Sep 17 00:00:00 2001
From: Patrick Valsecchi <patrick@thus.ch>
Date: Tue, 24 Feb 2015 08:45:21 +0100
Subject: [PATCH 2/2] Fix Ubuntu compilation error.

Ubuntu has git minor version 20 which has less parameters in
git-remote-fetch.

Signed-off-by: Patrick Valsecchi <patrick@thus.ch>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-24 11:41:11 +01:00
Patrick Valsecchi
e64501574b Fixed cmake build.
Non parallel build was broken because qthelper.cpp was depending
indirectly on a QT generated file and no cmake dependency was enforcing
the file to be generated before. I've removed the not needed #include
that was introducing this dependency.

In cmake, {FOO STREQUAL ""} is TRUE only if FOO is defined and
empty. Fixed a couple of bad usages.

Made the required libraries actually required in cmake.

From ef5ab90f258c5754d3022a023c28050cbafed3d5 Mon Sep 17 00:00:00 2001
From: Patrick Valsecchi <patrick@thus.ch>
Date: Tue, 24 Feb 2015 08:38:49 +0100
Subject: [PATCH 1/2] Fixed cmake build.

Non parallel build was broken because qthelper.cpp was depending
indirectly on a QT generated file and no cmake dependency was enforcing
the file to be generated before. I've removed the not needed #include
that was introducing this dependency.

In cmake, {FOO STREQUAL ""} is TRUE only if FOO is defined and
empty. Fixed a couple of bad usages.

Made the required libraries actually required in cmake.

Signed-off-by: Patrick Valsecchi <patrick@thus.ch>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-24 11:40:54 +01:00
Dirk Hohndel
ddc01e39e7 Move helper functions around
We had a ton of helper functions in qt-gui.cpp which really didn't make
much sense. So I moved them all into qthelper.cpp.

Also moved the UserAgent helper that didn't belong in the UpdateHandler to
begin with - that's a generic helper used in many places...

With this we can successfully build using cmake again.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-23 09:31:08 -08:00
Dirk Hohndel
62999c866f Add LIBGITDEVEL support to CMakeLists.txt
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-23 09:31:08 -08:00
Dirk Hohndel
cd545e1075 Add new files to CMakeLists.txt
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-23 09:30:56 -08:00
Dirk Hohndel
cae00d9858 Add LIBMARBLEDEVEL support to cmake
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-23 09:17:20 -08:00
Patrick Valsecchi
ce79b9ffa4 Add support for more GPS coordinate formats.
As requested in the user forum and in the mailing list, now support:
 - 46.473881 6.784696  (format used in XML files)
 - 48 51.491n 2 17.677e

I was not able to handle the XML format in a generic way without making
the code too ugly. So I've added an exception.

Signed-off-by: Patrick Valsecchi <patrick@thus.ch>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-23 05:37:34 -08:00
Miika Turkia
0f6f1c7ccf Include DC information on Cobalt import
Note that I use the serial number as device ID as is done with the
Suunto DM5 import.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-22 10:02:41 -08:00
Miika Turkia
f9cb443c73 Ignore deleted dives on Cobalt import
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-22 10:02:31 -08:00
Dirk Hohndel
6dc2d7ba18 Start building packages for vivid
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-22 08:38:58 -08:00
Dirk Hohndel
b9aa52e6b0 Update Qt4 patch
This time really just the patch

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-22 08:31:55 -08:00
Dirk Hohndel
2866a604b4 Revert "Update Qt4 patch"
This reverts commit 762315e7ee.

Oops, this was supposed to update the patch, not update and apply it.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-22 08:30:34 -08:00
Dirk Hohndel
df73f328f8 More flexibility when linking statically against libgit2
Allow static or dynamic linking against libssl and libcrypto.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-22 08:11:16 -08:00
Miika Turkia
44b4ae00ed Discard deleted dives on DM5 import
I had some double profiles with slight differences in them, until I
realized that this was caused by including deleted dives in the import.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-22 07:48:33 -08:00
Miika Turkia
ad5503fec5 Clean DM5 sql query
We don't use the data coming from DiveMixture so removing the join. The
join did also generate extra rows of the same dive (with differing gas
info).

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-22 07:48:22 -08:00
Miika Turkia
27d0cd68fc Import DC info properly from DM5 log
Using serial number as device ID here for simplicity. We also need the
DC info for the divecomputer tag per dive. And it seems that serial
number is in SerialNumber, SourceSerialNumber or both.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-22 07:47:54 -08:00
Miika Turkia
5330a612c5 Support for gas changes in DM5 import
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-22 07:46:44 -08:00
Salvador Cuñat
3610c7b3b7 merge conflicts
Backport to 4.4.1 because of unresolved merge conflicts from f1f0294

Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-22 07:46:28 -08:00
Miika Turkia
a76d5fb966 Fix surface pressure on DM5 import
Seems that DM5 uses pascal as pressure unit for surface pressure.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-22 07:46:14 -08:00
Guillaume GARDET
fc0d2a3fdb Documentation: Merge/update french user-manual translation
Update french translation of user-manual.

Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-20 02:55:26 -08:00
Dirk Hohndel
762315e7ee Update Qt4 patch
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-19 21:52:41 -08:00
Dirk Hohndel
6a2efd9ff6 The callback function has to return 0 or sql processing fails
Which means we report an error even if there wasn't a problem.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-19 19:52:58 -08:00
Dirk Hohndel
4682002474 Braces are better than indentation to scope if / if / else
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-19 19:47:06 -08:00
Miika Turkia
1301cb9664 Use 12 liter default on DM5 import
As the comment says, default to 12 liters if cylinder size is zero.
This is done only when cylinder has start pressure given.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-19 19:45:32 -08:00
Miika Turkia
5d18876e78 Support multiple cylinders on DM5 import
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-19 19:45:25 -08:00
Dirk Hohndel
f1f02941c7 Merge branch 'v4.4-branch' back into master
The manuals all will need a careful read.
The changes to use lsb-release and the PCLinuxOS specific files got lost
because I didn't want to try to rewite this in the middle of a merge.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>

Conflicts:
	Documentation/50-pot/subsurface-manual.pot
	Documentation/fr/po/subsurface-manual.fr.po
	Documentation/user-manual.txt
	Documentation/user-manual_es.txt
	Documentation/user-manual_fr.html.git
	Documentation/user-manual_fr.txt
	Documentation/user-manual_ru.html.git
	Documentation/user-manual_ru.txt
	file.c
	qthelper.cpp
	subsurface.pro
	subsurfacesysinfo.cpp
	xslt/DiveLog.xslt
2015-02-19 19:44:37 -08:00
Miika Turkia
554b652d25 DiveLog import: Only include weight when available
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-18 11:11:03 -08:00
Miika Turkia
541ec4fcac Add some extra data for DiveLog import
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-18 11:10:54 -08:00
Miika Turkia
b87eb78192 Add serial number to DiveLog import
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-18 11:10:38 -08:00
Miika Turkia
f7365015ff Include Boat in DiveLog import
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-18 11:10:32 -08:00