This add support for Seabear's new import format that is used by H3 and
T1. In the future also the Hudc should switch to the new format. The
main difference to the old one is that time stamps are no longer
recorded in the samples, but intervali is specified in the header.
The header contains other useful information as well that we should
build support for. E.g. surface pressure, gas mixes, GF, and mode might
be useful additions later on.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We need to take both \r\n and \n new line formats into account before
failing Seabear validity check on import. (Seabear file has empty lines,
if import file does not have one -> return.)
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
When an user opened the "Save as" dialog and pressed the
cancel button a null string was returned. Therefore the
file_save_as function returned an error which was lately
shown when the file_save function was called.
Now the function checks if the cancel/exit button was
pressed and returns.
Fixes#844
Reported-by: longjohnsilver
Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
test case:
1 - make sure that you DO NOT have anything selected on the 'Dive list;
2 - in the menu bar, click on 'Log'->'Re-plan dive';
3 - crash!
Fixes#858
Signed-off-by: Marcos CARDINOT <mcardinot@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The current code is dereferencing the null pointer 'profWidget'.
It can cause a segmentation fault.
Signed-off-by: Marcos Cardinot <mcardinot@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Even that most (or all) tables have the remove button at the section 0, the method defaultColumnWidth should not assume that it will always be true.
This patch will consider the title width of each section, instead of using a static width (which cause problems when the language is not en).
Signed-off-by: Marcos Cardinot <mcardinot@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Instead of create an uuid for every imported dive, check if it exists. If not
create a new one.
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Update the documentation with dependencies for cross-building on Linux
to Windows for OpenSuse platform and correct some building instructions.
Moreover fix the windows building script to use the architectural specific
binary.
Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
When loading an image by filename and by hash fails, try to interpret
the filename as URL and download the image.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Segfault did appear when picture had some gps coordinates but
there was no dive site assigned to the dive.
Signed-off-by: Jan Darowski <jan.darowski@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Coming back from a dive site edit we must not call refreshDisplay() or
otherwise the edits on the displayed_dive are overwritten.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Otherwise it will show outdated information. If the user edits the
location name and then clicks 'manage' we need to make sure that the
correct site is shown.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The char pointer was out of scope by the time we created the dive site.
Also remove the misleading comment above - it really makes sense to do
nothing in that function.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Added label in the ShiftImageTimesDialog which appears when
not all of the selected images have timestamp in the checked range.
Made cancel button in this widget actually work.
Signed-off-by: Jan Darowski <jan.darowski@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Seperated getting image timestamp from picture_load_exif_data() and
ShiftImageTimesDialog::syncCameraClicked() into picture_get_timestamp()
and seperated checking timestamp from dive_create_picture() to
dive_check_picture_time().
Signed-off-by: Jan Darowski <jan.darowski@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Field name changes should change all the occurrences... We ended up with
field index of -1 for average depth due to mixing field names.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
As flo269 suggested in bug #507, a full view of Earth would be better
when a dive has no coordinates.
Fixes#507
Reported-by: flo269
Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This adds the ability to choose either to export photos or not.
Patch is attached.
--
regards,
Gehad
From 6476e1227b72d8297f9aecc2e6cc6f70d07f87ae Mon Sep 17 00:00:00 2001
From: Gehad elrobey <gehadelrobey@gmail.com>
Date: Fri, 13 Mar 2015 15:31:24 +0200
Subject: [PATCH] Make exporting photos with HTML optional
Add the option to enable/disable exporting photos with the HTML.
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
profilewidget2.cpp:1398:25: warning: the omitted middle operand in
?: will always be 'true', suggest explicit middle operand [-Wparentheses]
profilewidget2.cpp:1403:39: warning: comparison between signed and
unsigned integer expressions [-Wsign-compare]
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Points (handles) from the last dive ADD operation remain on
the profile unless we clear them.
fixes#846
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The point graphics are allocated but doens't seem to be
deleted anywhere. We attempt to fix that in clearHandlers().
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
With no V2 question shown
- parsing fails when a V2 file is loaded
- parsing succeeds when a V3 file is loaded
- import of CSV file succeeds
With V2 question shown
- parsing succeeds when a V2 file is loaded
Finally compare the output of reading in the various files with reference
output included in the sources.
My guess is that this test might be a bit fragile, but hey, it's a start.
(reminder: the tests only get built when using cmake)
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
In commit 0ed4356fc2 ("Display slowness warning before opening a V2
file") I changed the xml parser to abort if it detects an V2 XML file so
that the main application can show a warning message (and eventually, a
few choices for the user) before parsing and processing older XML files.
The input that gets pre-processed by XSLT files claims to be V2 XML and so
the parser aborts - yet the code to show a warning and restarting the
parse isn't present in this code path, so XSLT based imports always fail.
This hack works around this by temprarily setting the variable that claims
that the warning has been shown to the user.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Given that we might be adding a gas change event at t = 0 we need to check
for both that and t = time_or_first_sample.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
t = 0 isn't really special here. We shouldn't allow two gas changes at the
same time, period.
We also can do away with the special handling to mark the dive list
changed and replot things if a gas change gets removed. That's done at the
end of this function either way.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Remove the existing gas change events @0:00 when new
one is added @0:00.
Signed-off-by: Yousef Hamza <jo.adam.93@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
some photos can be missing due to permission issues during exporting.
There are 3 cases:
-All photos are missing, the photo view must disapear.
-Some photos are missing, these photos must not be shown.
-No missing photos, all the photos must be viewed.
at loading try to get all the existing photos by GET. missing photos
must be marked for later removal. After all asynchronous GET requests
are received, remove all missing photos then finally show them all.
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Report start cylinder pressure from the samples with empty value.
Must search for the first nonzero value.
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Value of He must be showed in trimix dives, also fixes the format of the
dive events table. Gas change should be something like O2: 50 - He 0
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>