Commit graph

5785 commits

Author SHA1 Message Date
Joseph W. Joshua
e54d7d9178 Backup basic settings as XML
This patch enables XML backup. We can now save the settings
to an XML file. Currently this backs up just the basic stuff
such as custom text, language and brightness.

Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Signed-off-by: Thiago Macieira <thiago@macieira.org>
2014-08-13 10:48:14 -07:00
Joseph W. Joshua
3534e29ae2 Port writing of date and time to new classes
After splitting dive computer configuration classes, the date/time
setting had not been ported. This adds the same to the classes.

Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Signed-off-by: Thiago Macieira <thiago@macieira.org>
2014-08-13 10:48:14 -07:00
Joseph W. Joshua
20eb62a98a Polish up on classes
This patch polishes up on all classes added for dive computer
configuration to give a clean workflow. The classes can now
write and read data from the OSTC 3.

Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Signed-off-by: Thiago Macieira <thiago@macieira.org>
2014-08-13 10:48:11 -07:00
Joseph W. Joshua
4fc16b1674 Move divecomputer configuration code to different files
This splits the code in configuredivecomputer.cpp into multiple files.
The read and write threads are moved to configuredivecomputerthreads.h/cpp,
and the device details class is moved to devicedetails.h/.cpp

Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Signed-off-by: Thiago Macieira <thiago@macieira.org>
2014-08-09 12:06:42 -03:00
Joseph W. Joshua
2432350064 Add brightness setting
Adds a setting to control the device's brightness. Currently I
have only the OSTC 3. Will add more afterwards.

Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Signed-off-by: Thiago Macieira <thiago@macieira.org>
2014-08-09 12:01:56 -03:00
Joseph W. Joshua
a7a74ae9a6 Improve writing of device name to dive computers.
Improves the writing of device name to the dive computer. The
code has been updated to use a switch statement.

This will make it easier to add new devices in the future.

Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Signed-off-by: Thiago Macieira <thiago@macieira.org>
2014-08-09 12:01:56 -03:00
Joseph W. Joshua
ee2403d63c Improve writing of date and time to dive computer
Improves writing of date and time to the dive computer. This
has been tested using the Heinrichs Weikamp OSTC-3.

Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Signed-off-by: Thiago Macieira <thiago@macieira.org>
2014-08-09 12:01:56 -03:00
Joseph W. Joshua
a08d239af5 Change dive computer family detection
Following suggestions on the mailing list, this changes the
method used to detect the dive computer family. Detection is
now done using: dc_device_get_type.

Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Signed-off-by: Thiago Macieira <thiago@macieira.org>
2014-08-09 12:01:56 -03:00
Joseph W. Joshua
3e127a059f Create class to write settings to dive computer
Adds a class to write settings to dive computer, and modifies
the existing ones to integrate it.

Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Signed-off-by: Thiago Macieira <thiago@macieira.org>
2014-08-09 12:01:56 -03:00
Joseph W. Joshua
a7c9b25b05 Read basic details from dive computer
Added classes for reading data from dive computer. This is
at the basic level and I will expand it as I go along.

Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Signed-off-by: Thiago Macieira <thiago@macieira.org>
2014-08-09 12:01:54 -03:00
Joseph W. Joshua
791fbee260 Load vendor list and product list
Using code from 'downloadfromdivecomputer' class, this code
loads the vendors and products to the respective comboboxes.

Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Signed-off-by: Thiago Macieira <thiago@macieira.org>
2014-08-09 11:59:15 -03:00
Joseph W. Joshua
ec02737eda Create Dive Computer configuration dialog
Create a dialog for reading and writing settings to and
from dive computers, with a menu entry in MainWindow to
open the dialog.

I will build up on this dialog and change it as needed.

Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Signed-off-by: Thiago Macieira <thiago@macieira.org>
2014-08-09 11:50:14 -03:00
Dirk Hohndel
af1d77056e Change version to 4.2
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-08 11:39:19 -07:00
Dirk Hohndel
a64dfab6e6 Add latest html files for user manual
These are used when building from source without asciidoc installed.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-08 11:37:09 -07:00
Dirk Hohndel
35c0e4d483 Pull latest translations from Transifex
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-08 11:31:57 -07:00
Salvador Cuñat
1baa248a9e Update spanish translation of user manual to english c1026f5
And fixes a little typo.

Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-08 11:17:28 -07:00
Dirk Hohndel
827d4740c3 Better User Agent for Subsurface
This one is less verbose and very easy to parse. It's guaranteed to have
five components, separated by ':' with no other ':' in the string:

Subsurface:<version>:<PrettyOSName>:<appCpuArch[/osCpuArch]>:<UILang>

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-08 11:13:05 -07:00
Dirk Hohndel
a9f59c0cb3 Revert "Don't translate components of the version"
This reverts commit 6fdbf2069d.

That was actually the wrong thing to do, now that I think about it.
Instead we should show the translated version on screen and send a
compact, easy to parse variation of this as the User-Agent header.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-08 10:44:06 -07:00
Dirk Hohndel
4a125384ac Fix possible crash attempting network connection
If we didn't get back a JSON encoded string (i.e., if the response
contained no '"') we would access a QList past its boundary.

I'm somewhat hopeful that this is a last second fix for an annoying bug
I've been trying to figure out for a while.

See #514

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-08 10:39:46 -07:00
Dirk Hohndel
6fdbf2069d Don't translate components of the version
When transmitting the Subsurface version string we always want to use the
English terms, not the localized terms.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-08 00:31:18 -07:00
Willem Ferguson
9170fbc383 User manual: Delete images using dustbin icon
Madification in text to reflect change in UI after the dustbin icon
has been moved in thumbnails of photos.
Two images in the manual were replaced.

Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-07 23:54:22 -07:00
Miika Turkia
d06292be7f Improve wording on ReleaseNotes
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-07 22:05:41 -07:00
Miika Turkia
5f87aba037 Improve wording on README
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-07 22:05:04 -07:00
Dirk Hohndel
a22544f49a Include SupportedDivecomputers.txt with the bundled docs
After all, it's referenced in the ReleaseNotes.txt and the README

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-07 13:55:22 -07:00
Dirk Hohndel
7129115999 Improve generation of list of supported dive computers
Get it straight from the libdivecomputer sources used...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-07 13:53:09 -07:00
Dirk Hohndel
5ea2c6c237 Update ReleaseNotes and README for the upcoming release of 4.2
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-07 13:16:46 -07:00
Tomaz Canabrava
efa069d93b Paint the middle of the trashbin white.
Fixes #697

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-07 13:14:49 -07:00
Tomaz Canabrava
44f59b6022 Move the Trash bin to the topRight on the pictures
It was too easy to remove a picture by mistake, not anymore.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-07 13:12:32 -07:00
Sergey Starosek
fddad4e414 Update russian translation of the user manual
Aligned with english version c1026f5975

Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-07 11:22:48 -07:00
Salvador Cuñat
1f585f3e7c Update spanish translation of user manual to english 150783f
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-07 11:22:40 -07:00
Dirk Hohndel
ee77398eb8 Reload the dive list after accepting changes
So far we only did it when we added a dive or modified a manually added
dive. But the reality is that an edit of any dive could cause changes that
require the dive list to be reloaded.

Fixes #698

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-07 10:23:08 -07:00
Sergey Starosek
f5d9882573 Update russian translation of the user manual
Aligned with english version  150783f180

Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-07 08:00:28 -07:00
Willem Ferguson
c1026f5975 User manual: Add text explaining delete of photos from the Photos tab
This text addresses issues about the deletion of photos using the
Photos tab. It also deals with interpreting information regarding
photos laocated on an external drive that is not connected to the PC.

Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-07 08:00:15 -07:00
Tomaz Canabrava
68af9f0afb Delete pictures from the Widget by pressing delete
Select the picture, press delete, profit.

[Dirk Hohndel: removed the stray hunk that snuck into this patch]

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-06 18:32:28 -07:00
Dirk Hohndel
b0addb4567 Show the cross hair only when planning or adding a dive
In normal profile mode it's rather redundant and clatters the profile.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-06 12:33:36 -07:00
Robert C. Helling
150783f180 If planner SAC rates are only in l/min don't claim otherwise in the manual
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-06 12:26:33 -07:00
Dirk Hohndel
4c252d8e23 Remove unused static function
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-06 10:59:26 -07:00
Dirk Hohndel
98e374e65a Fix order of initialization warning
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-06 10:54:37 -07:00
Dirk Hohndel
66bb17e602 Fix uninitialized variable warning
Reading the code we should never be able to access breakcylinder without
having initialized it first, but this seems like a really cheap fix.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-06 10:51:53 -07:00
Dirk Hohndel
8092c0fdcd Attempt to hack around the problems with Swedish date localization
When trying to shorten the long date format into a "medium" length date
format we are messing up Swedish dates. This should fix the issue. Not a
great solution but should be good enough for 4.2

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-06 10:48:01 -07:00
Dirk Hohndel
158a853d97 Remove left overs from time zone designation in Windows/Spanish
We remove the time zone designation when showing times (as all our times
have no timezone). But the Spanish localization on Windows shows the time
zone in parenthesis - and the existing code then left those parenthesis
behind which looked very strange.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-06 10:23:33 -07:00
Linus Torvalds
3aaf8b1f5a Make gas use statistics be coherent and more complete
The gas use logic in the dive statistics page is confused.

The SAC case had a special case for "unknown", but only for
the first gas. Other gases had the normal empty case.

Also, the logic was really odd - if you had gases that weren't used (or
pressures not known) intermixed with gases you *did* have pressure for,
the statistics got really confused.

The list of gases showed all gases that we know about during the dive,
but then the gas use and SAC-rate lists wouldn't necessarily match,
because the loops that computed those stopped after the first gas that
didn't have any pressure change.

To make things worse, the first cylinder was special-cased again, so it
all lined up for the single-cylinder case.

This makes all the cylinders act the same way, leaving unknown gas use
(and thus SAC) just empty for that gas.

It also fixes the SAC calculation case where we don't have real samples,
and the profile is a fake profile - possibly with gas changes in between
the fake points. We now make the SAC calculations match what we show -
which is admittedly not at all necessarily what the dive was, but at
least we're consistent.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-06 09:14:34 -07:00
Dirk Hohndel
d982096144 Don't make the preferences dialog so huge
Let Qt figure out a good size instead.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-06 07:51:12 -07:00
Dirk Hohndel
74e7b8e879 Don't show a SAC of 0.0l/min (or cuft/min)
When we have no data about the gas consumption it makes no sense to show a
SAC of 0. Instead we should show either "unknown" or nothing.

Fixes #693

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-06 07:39:19 -07:00
Dirk Hohndel
eb63ccfed5 Don't list gases that weren't used in profile print
If the divecomputer adds additional, unused cylinders to the dive, they
would be listed in the profile based printouts. Given that the field is
named "Gas used" that seems wrong.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-06 07:08:31 -07:00
Robert C. Helling
71bed5022c Don't zoom the profile when the left button is pressed
This prevents zooming out to more than max in the planner. Using a Mac
MagicMouse it happens at times that the finger slides on the mouse while
dragging a waypoint which can result in zooming out further than max.

Fixes #695

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-06 06:21:24 -07:00
Dirk Hohndel
9d801c663f Only show libdivecomputer "unlikely gas" warning once
Fixes #696

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-06 06:19:31 -07:00
Willem Ferguson
b0ead31934 User manual, critical typo
Correction of a critical typo in the user manual

Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-06 06:07:00 -07:00
Willem Ferguson
8cea20a684 User Manual: Minor updates to text with 4 image replacements
Minor grammatical and stylistic text adjustsments, following quite a
few changes to the text by several contributors over the last two weeks.

Four images are replaced to reflect the latest UI, and also to
reflect the Gnome 3 rendering. These relate to
the specification of cylinder gas in the Equipment Tab.

Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-06 06:05:55 -07:00
Miika Turkia
4b9b19cec6 Fix compile warning
warning: format not a string literal and no format arguments

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-06 06:03:33 -07:00