summaryrefslogtreecommitdiffstats
path: root/qt-ui
AgeCommit message (Collapse)Author
2015-04-24Allow images to be added via the webGravatar Robert C. Helling
This adds a new divelist context menu entry which asks for a URL. The file is retrieved and if it is an image it is added to the cache and the url is associated to dives as with local files. NB this currently only works with URLs pointing directly to images. But it should not be too hard to add the possibility to add a direction via an html file and its image tags. To test: open dives/test43.xml and delete the image and then add the URL http://euve10195.vserver.de/~robert/wreck.jpg Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-24Cleaning up variable names in image loadingGravatar Robert C. Helling
Use more explicit variabel names and make the get timestamp function actually return the timestamp rather than getting a pointer argument Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-24Add suit field for CSV importGravatar Miika Turkia
Fixes #853 [Dirk Hohndel: fixed test compile] Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-23When deleting a cylinder, adapt gas changesGravatar Dirk Hohndel
When we delete a cylinder the gas changes in that dive may have to be adjusted. We didn't do this at all in the past. With this commit we should be doing this right for a single dive that is being edited. This does NOT handle multiple dives being edited at the same time (or more specifically - if you have multiple dives selected and delete a cylinder, the dives that had the same set of cylinders (other than the displayed dive) will get that particular cylinder deleted, but won't have their gas change events (and sensor data in the samples) adapted. Possibly we should simply prohibit deleting cylinders when more than one dive are selected. See #834 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-23Profile context menu: trigger editing of manually added diveGravatar Dirk Hohndel
Right now the way to edit the profile of a manually added dive is really counterintuitive: you have to first make some random change to the dive information, then the profile switches in to editing mode. This commit adds a simple context menu entry on the profile that is only shown when the a manually added dive is displayed. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-22Handle XSLT based imports correctlyGravatar Dirk Hohndel
XSLT conversions create V2 XML files, but we shouldn't abort when we parse those without having the user informed about the potential slowness - all XSLT based imports are slow, anyway. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-22When editing the location, make sure it gets applied to the divesGravatar Dirk Hohndel
Oops, that was embarrassing. Just setting it on displayed_dive doesn't gain us anything if it isn't transferred to the selected dives. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-22When remembering the selection, don't try to be too smart with tripsGravatar Dirk Hohndel
We assumed that a trip was selected when all of its dives were selected instead of just remembering if the trip itself was selected. I'm sure there was a reason for that but I cannot think of any. But a side effect is that if you have a trip with only one dive in it and have that one dive selected and edit it, after saving your changes you end up on the trip (which is now also selected) and are no longer on the dive. And that seems quite wrong. The new code simply remembers that the trip was selected. And selects it again if it was. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-20Uemis downloader: allow continuing download by clicking RetryGravatar Dirk Hohndel
When we run out of space in the Uemis filesystem we return an error. The user could reasonably unplug the SDA, insert it again and then retry to continue the download (that's what we tell them to do). In that case we need to make sure we start at the correct dive otherwise the same dives keep getting downloaded over and over again. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-20Download dialog: we can accept a partial download after an errorGravatar Dirk Hohndel
The dialog didn't accept "OK" and store the dives downloaded / selected so far if there had been an error. Especially with partial downloads from the Uemis SDA this is something that is quite reasonable to want to do, so allow exiting the dialog with OK even after an error. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-14Add ability to undo removing of dives from tripsGravatar Grace Karanja
Add the functionality to undo/redo removing of dives from trips. The code calling remove_dive_from_trip has moved to the UndoCommands class. Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-14Show error messages for incorrect edit invocationGravatar Gehad elrobey
Planned dives must be replanned while manually added dives must be edited. Show error messages to handle wrong user input. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-09Recmode: Allow the user to specify gas reserve.Gravatar Joakim Bygdell
Since most regulators have an intermediate pressure of 10bar the minimum value is 10 while the max is 99. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-05Shorten the first leg of the planner.Gravatar Joakim Bygdell
With the addition of gas reserves in recreational mode we need to make sure that the first leg is short enough that we have more gas left than the specified reserve even when using small cylinders like LP72. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-04OSTCTools-Add support to import .dive filesGravatar Salvador Cuñat
OSTCTools is a windows based software by Robert Angeymar which performs configuration upgrade, memory analysis and download tasks for H&W OSTC devices. Downloaded dives are stored in files (one archive each) with the raw binary data heavily padded at the begining of the file, and some other data not included in H&W dive header protocol as the device's serial number. The import function simply takes the raw data part of the file and lets libdivecomputer do the parseing. Then adds some additional info as OSTC reported dive number and serial device number. Please note that OSTCTools is *not* a real logging software, it simply gets the DC raw data, so there isn't any information about dive site, equipment and so. Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-02Checkbox and preference for safety stopGravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-02Introduce recreational planner modeGravatar Robert C. Helling
This adopts the planner to the needs of the recreational diver. Rather than immediately starting to ascent doing deco stops this mode, this mode stays at the last manually entered depth for the maximal time before mandantory stops appear (NDL). It does not change gas but keeps using the last used cylinder. TODO: * Grey out unused UI elements of the planner in this mode * Start ascent before gas runs out (or into reserve) * Do a 3min @ 5m safety stop. Fixes #840 Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-30Make the image hashing non-blocking againGravatar Robert C. Helling
...it had become blocking with 1e3700c1 Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-30maintab.cpp: fix editing dive profiles from tripsGravatar Lubomir I. Ivanov
Once a manually added dive is part of a trip and this trip is edited, applying the modifications leaves the dive profile in edit mode (e.g. points can be dragged and gas swapping can be applied). The issue can be viewed from another angle. Why enable profile edits of a manually added dive which is in a trip, while the trip is being edited in the first place? If there are more than one manually added dives in said trip we are enabled to edit one of the dive but probably it's not intended to modify all manually added dives after the changes are applied for the trip. This patch disables the functionality in question and it also... Fixes #864 Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-30Manual added dives edit button is missingGravatar Gehad elrobey
once the manual added dive is added it can't be edited directly, This can be fixed by adding an edit button to the log menu, this will be consistent with the plan/replan buttons. Fixes #847 Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-25Save more planner settings into prefsGravatar Gaetan Bisson
This adds to the prefs struct the variables last_stop, verbatim_plan, display_runtime, display_duration, and display_transitions from the planner so their values are saved from one session to the next. The widgets for some of those settings had default values in plannerSettings.ui; remove them since the new code in subsurfacestartup.c takes care of initializing them. Signed-off-by: Gaetan Bisson <bisson@archlinux.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-25MultiFilterInterface - initilize member + remove extra ;Gravatar Marcos CARDINOT
initialize member 'anyChecked' in the constructor Signed-off-by: Marcos CARDINOT <mcardinot@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-25DivePlannerPointsModel::recalc - initilizes memberGravatar Marcos CARDINOT
Non-static class member recalc is not initialized in the constructor Signed-off-by: Marcos CARDINOT <mcardinot@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-25DivelogsDeWebServices::multipart - initializes memberGravatar Marcos CARDINOT
Non-static class member multipart is not initialized in the constructor Signed-off-by: Marcos CARDINOT <mcardinot@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-23Import support for new Seabear formatGravatar Miika Turkia
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>
2015-03-21Implement handler for cancel button of Save As dialogGravatar Claudiu Olteanu
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>
2015-03-21GUI fix for OSX. Reduce the padding of the divelist header so that we don't ↵Gravatar Joakim Bygdell
obscure the first dive in the list. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-20Prevent crash when clicking re-plan without selected diveGravatar Marcos CARDINOT
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>
2015-03-19RulerItem2::settingsChanged() - NULL pointer dereferenceGravatar Marcos CARDINOT
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>
2015-03-19TableView - improving the column width calculationGravatar Marcos CARDINOT
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>
2015-03-19Fix a couple of typosGravatar Torstein Husebø
Signed-off-by: Torstein Husebø <torstein@huseboe.net> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-17Consistent variable names in UndoCommands classGravatar Grace Karanja
Implements a uniform variable naming scheme in the undocommands class. Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-17simplewidgets.cpp: fix a -Wreorder warningGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-17Create picture cache directory if neededGravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-16Use QUrl::fromUserInput for image filesGravatar Robert C. Helling
... as suggested by Thiago. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-16Load remote imagesGravatar Robert C. Helling
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>
2015-03-16Don't overwrite the displayed dive in the middle of editingGravatar Dirk Hohndel
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>
2015-03-16Make sure the dive site edit widget is current when switching to itGravatar Dirk Hohndel
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>
2015-03-16Correctly create a dive site with the name entered on the Notes tabGravatar Dirk Hohndel
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>
2015-03-15Added warning when not all images can be added.Gravatar Jan Darowski
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>
2015-03-15Refactored image timestamp checking.Gravatar Jan Darowski
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>
2015-03-15CSV import: average depth name fixGravatar Miika Turkia
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>
2015-03-15Change the zoom level on globe if no coordinates are setGravatar Claudiu Olteanu
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>
2015-03-14Make exporting photos with HTML optionalGravatar Gehad Elrobey
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>
2015-03-14Profile: fix a couple of warningsGravatar Lubomir I. Ivanov
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>
2015-03-14Profile: call clearHandlers() in setAddState()Gravatar Lubomir I. Ivanov
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>
2015-03-14Profile: fix potential mem leak in pointsInserted()Gravatar Lubomir I. Ivanov
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>
2015-03-14Revert 4f9705f3f5Gravatar Lubomir I. Ivanov
It solves #784, but introduces #846. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-11Better testing if the first gas is explicitGravatar Dirk Hohndel
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>
2015-03-11Don't allow two gas changes at the same timeGravatar Dirk Hohndel
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>