aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2015-01-14Turns out the manifest doesn't allow a dash in the nameGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-14Change the name of the Android appGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-14Ignore QWebView in AndroidGravatar Joseph W. Joshua
Ignore QWebView instances in the preferences dialog when compiling under Android, as QWebView is not yet supported under Android. Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-13Dive download UI: sort the dive computer dropdownGravatar Dirk Hohndel
I could have sworn we did this at some point. The vendors are already sorted, but the products for each vendor should be sorted, too. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-13Attempt a better layout for the download dialogGravatar Dirk Hohndel
This seems to work well and provides a lot less wasted space. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-11Dive d/l selection UI: clear table when retryingGravatar Dirk Hohndel
After a partial download (because the user hits cancel or because there was an error, if the user hits Retry the list of dives downloaded so far should be cleared because we will simply try to re-download the same dives again. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-11Don't use current_dc unless you know there's a current_diveGravatar Dirk Hohndel
This will crash if for some reason current_dive is invalid. And in general, when displaying information, we want to use the correct dc in the displayed_dive, not the current_dc, which references the current_dive... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-10Refactor dctype -> divemodeGravatar Robert C. Helling
... and repair a failed rebase (sorry). Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-10Replot after changing divetypeGravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-10Add preferences field for default set-pointGravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-10Add setpoint events according to divetypeGravatar Robert C. Helling
When changing to a CCR dive, add a setpoint change to the default setpoint at the beginning of the dive. Otherwise add an explicit setpoint change to 0 . Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-10Maintab combobox to set dive typeGravatar Robert C. Helling
still needs some work Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-10Prepare for PSCR calculationsGravatar Robert C. Helling
Calculations for passive semi-closed rebreathers are pretty much like OC except the pO2 is lower bey a certain (SAC dependent) factor. This patch introduces the corresponding calculations in case dctype == PSCR which is so far never set and there is currently no UI for these calculations. As pO2 is SAC dependent it takes a certain attempt at getting it and drops to defaults from the prefs otherwise. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-10Rebreather type selector UIGravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-10Small adjustment to the Mac build instructionsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-09Dive d/l UI: redo the states, the flow, the buttonsGravatar Dirk Hohndel
This is bigger and more invasive then I wanted, but it's hard to break it down into smaller pieces. Here's what it does: The former "Download" button becomes the "Download", "Cancel download" and "Retry" button. So this button controls your interaction with the dive computer. The other two buttons are now purely "OK" and "Cancel" for the dialog. "Cancel" discards what happened (much easier now that we download into a different table), and "OK" adds the dives that were selected in our selection UI (by default all downloaded dives) to the real dive_table. And while redoing all this, I also redid some of the state machine underlying the dialog. The biggest change that the user will see is that partial downloads (after canceling or after an error) will still offer the dives that were completely downloaded up to that point in the selection menu. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-09If we can't find the dive, simply return no dataGravatar Dirk Hohndel
This seems better than forcing a crash or accessing random data. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-09Now use our table when downloading from the dive computerGravatar Dirk Hohndel
We pass a different table to libdivecomputer (and the uemis code) and have that table filled. And then we simply copy the dives from that table into the real dive_table when the user accepts the download. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-09Add a private table for downloaded divesGravatar Dirk Hohndel
This still isn't actually used, just puts it in place. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-09Add more infrastructure for a separate dive tableGravatar Dirk Hohndel
This will allow us to download the dives from the dive computer into a separate table just for that purpose and not into the main dive_table. I really dislike the code that's in place that dates back to the very earliest code written for Subsurface. Dumping the dives straight into the main dive_table seems really stupid to me. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-09Dive d/l selection UI: remove setData() methodGravatar Dirk Hohndel
Since we now track all clicks on the row, having the setData() actually neutralized the action that we took on the clicked() signal. Now you can select / deselect a dive, regardless where in the row you click. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-09Dive d/l selection UI: fix the row count rangesGravatar Dirk Hohndel
Yet another bug because the indices are inclusive. We need to start off with the last being smaller than first and we need to adjust the row count. It might be easier to just fix thing to make last be exclusive... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-09Dive d/l selection UI: update checkmark state correctlyGravatar Dirk Hohndel
This fixes the issue where there was no visual feedback when clicking on the second or third column in the grid. It would actually change the checked state of the checkmark internally (and you would see the new state once you clicked on another dive), but it wouldn't give immediate visual feedback. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-09Dive d/l selection UI: the indices are inclusive, allocate enough spaceGravatar Dirk Hohndel
The array we allocated was one entry too small. On the flip side, let's just make sure we cannot call this with a negative range. That would be bad, too. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-09Dive d/l selection UI: only allow one download for nowGravatar Dirk Hohndel
We may reconsider this as this might replace the Retry function that's currently completely broken. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-09Dive d/l selection UI: don't setup the model if there are no divesGravatar Dirk Hohndel
Setting things up for zero dives will cause all kinds of weird corner cases. Just don't do it. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-09Don't use the result of unsupported libdivecomputer callsGravatar Dirk Hohndel
We report a bug if this is not unsupported and not successful. And then use the result. Hello? So if this is not supported, we still use the result? Oops. This has been around for a long time. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-09Repair minor bug in CCR setpoint graphGravatar Willem Ferguson
Correct minor malfunction with CCR setpoint display. It was showing even when the po2 display was turned off. This patch ensures that the setpoint graph only shows when the po2 toolbar button is activated (and in addition the appropriate checkbox in the Preferences). Signed-off-by: willem ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-08Remove unused headersGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-08Only suggest OSTC3 fw upgrade on newer versionGravatar Anton Lundin
Previous code suggested a "upgrade" if your firmware where other than whats parsed from the autofirmware call. This switches that logic into only suggesting firmware upgrade if the found firmware is newer than the firmware your device runs. The previous logic was very annoying if you have a device running a development version of the firmware. If you have taken that step of the guided path, you shouldn't be told to "upgrade" to something older every time you download from your computer. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-08Remove stray debug printsGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-08Include the right class, not QDebugGravatar Anton Lundin
QTextStream gets pulled in by QDebug, but this includes the right header instead. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-08Adjust array size to fit all csv paramsGravatar Anton Lundin
Back in e544796199eb ("Add missing divemaster field to the manual import"), divemaster field got added without extending the array length. This corrects that. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-08No need for a new variableGravatar Dirk Hohndel
We already have provider in a local variable. The lookup and "model" variable is redundant. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-08Use setEnabled() instead of setDisabled()Gravatar Dirk Hohndel
I don't like mixing setEnabled() and setDisabled()... let's just always use setEnabled(). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-08Dive d/l selection UI: hook up select / unselect allGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-08Dive d/l selection UI: add select all / unselect allGravatar Dirk Hohndel
This isn't hooked up, yet. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-08Dive d/l selection UI: allow clicking anywhere in a rowGravatar Dirk Hohndel
It seemed silly to only be allowed to click the tiny checkbox. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-08Dive d/l selection UI: fix more array access errorsGravatar Dirk Hohndel
The checked array is zero based, reflecting the rows shown. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-08Dive d/l selection UI: brute force size optimizationsGravatar Dirk Hohndel
This is horrible, but it gets something in place and hopefully we can clean this up soon. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-08Give reasonable names to layoutsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-08Dive d/l selection UI: show reasonable column headersGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-08Random whitespace cleanupGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-08Dive d/l selection UI: fix check if things were checkedGravatar Dirk Hohndel
Math is hard. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-08Dive d/l selection UI: close the dialog when doneGravatar Dirk Hohndel
This is where we need to call accept() Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-08Dive d/l selection UI: Only show checkbox on the first columnGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-08Dive d/l selection UI: disable OK until things are downloadedGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-08Fix missing return valueGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-08Dive d/l selection UI: show useful data in a useful formatGravatar Dirk Hohndel
We don't get location data from the dive computer (at least not from 99.99% of the dive computers today). And we really need to show the data in a human readable format. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-08Dive d/l selection UI: don't close the dialog when we're done downloadingGravatar Dirk Hohndel
The whole point is that we then want to pick and choose which dives to add to the divelist. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>