This patch generates a waypoint for events occurring between profile
samples. It approximates the depth of the crafted waypoint linearly
between the recorded sample depths.
Fixes#385
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Dive with test events, can be used to test approximation of depth when
exporting dives.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Bookmark with compass heading is named 'heading' and should use the
bookmark icon.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
I never imagined that people would want to track more than 4
weightsystems, but we just had an enhancement request from a user who
tried to enter a 5th system. Let's hope 6 is enough for everyone.
Fixes#383
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
And prevent the user from editing equipment in trip edit mode (those edits
are both meaningless and of course will be ignored once we save the
changes to the trip).
Also moved some code for setting up tanks, weights, tags, etc, into the
"this is not a trip-edit" part of the updateDiveInfo() function.
Fixes#392
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Regardless of whether the user clicks in the info tab, makes a change to
equipment or starts by editing the profile (i.e., clicking on the little
penguin), we should get into the same state and behave the same way.
This means that when editing a manually added dive we are always in
editMode == MANUALLY_ADDED_DIVE - and editMode == DIVE means we are
editing a dive that came from another source.
Fixes#379
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This patch disables/enables the DC device node based on what type of
transport the selected DC uses. The only time the device node field is
used is if the selected DC uses a serial transport type. IrDA and USB type
transports do not use the device node.
Signed-off-by: Benjamin Fogel <nystire@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We want to install the Subsurface icon so it can be used e.g. in menus.
(Commit ee5d8e3c moved the icons to resources, but the application icon
is special case, that should be installed globally.)
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Use QStringList::contains instead of iterating the list.
Signed-off-by: Patrick Valsecchi <patrick@thus.ch>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
MANUALLY_ADDED_DIVE is a different flavor of ADD mode (in both cases we
are in "planner mode"), so bail out for that as well.
See #379
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
UDDF export saved events only if they occurred at exactly same time as a
profile sample. This patch will include events between samples as well.
This assumes that profile samples are recorded in even intervals.
Fixes#385
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
1) Text about libdivecomputer log and dump files
2) Text about coordinate formats acceptable
3) Text about CSV import
4) Minor reorganisation of TOC
Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Seems there is a different way to state O2 percentage in DivingLog.
This patch includes that format along with the previously seen one.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Seems that we can detect the unit of samples from DivingLog import when
comparing the maximum dive depth to the maximum recorded sample depth.
If sample is bigger, it is recorded in imperial. Of course this relies
on the assumption that the max depth of dive is recorded in metric unit,
but that seems to be the case, at least in the sample received.
It really does not make any sense to have both units in use for one dive
without any info on the unit used. But since that is the case, let's try
to cope with it.
Fixes#316
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
As an aside, our resolution is great and certainly high enough for the
real world, but it's easy to get into situations where we don't display
the exact same degrees / minutes / seconds as the user entered...
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
QList is optimized for storing pointer-sized items, thus
a QVector is the better choice for everything else.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Thise files dates back from the beginning of the Qt port and
were never used anyway...
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
deleting a null pointer is valid, so we just delete it
instead of checking if it exists.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Code cleanup, don't use if ( thing() ) set false,
but set !thing() instead.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This patch fixes my last annoyances with dark themes
on subsurface. It changes the background color of the
edited info tab to a darker yellow if the theme is
dark, and a light yellow if the theme is light.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The old code used a QString instead of a const QString&, wich
mean that each foreach step the string was copied.
added a break on the if-found-true to stop the foreach, since
we already found it.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
After change to include XSLT files in resources, the import quit
working (even though the files and templates were found properly). This
patch uses include statement instead as it seems to work in our case.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This allows user to view any file on CSV import dialog, not only the
ones ending with .csv. Of course, the default still shows only the .csv
files and user needs to change the filter to view the rest.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The previous implementation only accepted a decimal point. We now support
both point and comma, regardless of locale.
This also removes a debug message left behind in the previous patch.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This adds support for two more GPS coordinate formats and also fixes a
couple of issues with the previous implementation.
We used to only support full degrees and decimal minutes. We now also
support fully decimal and degrees, minutes and decimal seconds.
The previous implementation would color the input field red if either it
couldn't parse the string, or if it was able to parse it but it was the
same as the previous location. That's misleading.
The previous implementation also changed all gps coordinates to the new
coordinates in a multi-dive edit - instead of just changing the ones that
are the same as the master dive.
Fixes#387
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Correct error in manual
Add some short text in sections dealing with equipment.
[Dirk Hohndel: clean up whitespace & regenerate the html file]
Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Removing the offending tags in Documentation/user-manual.txt makes it
build.
Signed-off-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This way when building Subsurface asciidoc is not necessary at all - except if
you want to work on the user manual and want to see the result of your work.
Previously the build wouldn't fail without asciidoc, but there would be no
working user manual when pressing F1 from within the application. This solves
the problem by shipping the HTML file with the sources.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Why calculate the number of entries in the zip downloaded from Divelogs.De
if you don't do anything with that number?
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
None of these are actual bugs. But none of the fixes are harmful, either.
And much as I hate adding the 'default' clauses, I'd rather not have the
build output cluttered by invalid warnings.
The exception is the fix in divelistview.cpp - while I don't think it is
possible for this function to be called with no dive selected,
initializing pd to NULL is cheap insurance in case that does happen for
some weird reason.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Keys up and down to increase / decrease stars
and also fixed focus policy for it.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We don't need to keep the array of zip_source structs. We just need the
latest we created so we can add to the zip file.
Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This is so we can mark the error messages for translation.
Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This is a cleaner approach, according to the discussion in the mailing
list. It is also better because we can use QTemporaryDir in Qt 5.
Finally, it avoids having to remember to free it at every point.s
Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>