aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2015-08-09Fix bit shift on Suunto DB importGravatar Miika Turkia
Let's do the bit shift properly and not by block size. Fixes #906 Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-03Add FAQ item of missing logs to user manualGravatar Miika Turkia
[Dirk Hohndel: added corresponding entry to the FAQ] Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-03Decrease gaschange index even if we are already breathing the new mixGravatar Robert C. Helling
This fixes a bug where we would not do any gas changes at all if at the end of bottom time we were deeper than the MOD of the bottom mix. Instead we would constantly try to switch to that gas and find we are already breathing it. A test case would be a dive with air and EAN50 to more than 66m. That would have never switched to EAN50. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-03Divinglog import: ignore unsupported cylindersGravatar Miika Turkia
Subsurface supports currently 8 cylinders, thus we should not attempt to add more. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-03Add libgrantlee-dev fore Debian INSTALL instructionsGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-03Make debugging cleanerGravatar Robert C. Helling
Don't try to connect the globe when NOMARBLE is active. Check exisistance before trying to open an image file. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-31Another fix to build with NO_MARBLEGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-31Enable building with NO_MARBLE againGravatar Dirk Hohndel
This was broken in commit 7efa92406794 ("Transform GlobeGPS in a static instance() class"). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-31CSV import: imperial support for cylinder pressureGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-31CSV import: implement unit conversion for temperatureGravatar Miika Turkia
If input is in F, we need to convert it to C on import. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-31CSV import: fix imperial conversion for weightGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-31Fixed layout spacing issues.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-31Repopulate the labels on the globe after an editGravatar Tomaz Canabrava
Strangely, it still doesn't show the flag where it should be (but it shows just after a reselect, so it's mostly a cache issue somewhere) Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-31Paint the coords-widget yellow after clicking on the globeGravatar Tomaz Canabrava
When we clicked in the globe and changed programatically the text on the coordinates edit widget, the background was still white instead of the bright yellow that it should have to show that it was modified. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-31Save the gps edit into the current dive_siteGravatar Tomaz Canabrava
The accept method didn't save the gps edit even if we put correct text on it. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-31Change the coordinates via globe.Gravatar Tomaz Canabrava
Now when the user selects the dive site edit, the globe will enter in edit mode too. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-31Add a button to pick the coordinates via globe on the dive site editGravatar Tomaz Canabrava
It's a placeholder for now, but next commit will make it work. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-31Transform GlobeGPS in a static instance() classGravatar Tomaz Canabrava
This is needed to start easing the transition from the completely wrong and bogus MainWindow::instance()->globe() calls. this is still wrong, but with it I removed one level of indirection. I did that now because I wanted to not taint the location management when I use it to deal with the globe. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-31Correctly update the dive when the user edits dive_siteGravatar Tomaz Canabrava
We didn't correctly update the dive site as soon as the dive_site edit finished, and this time we are actually correctly updating things using signals instead of calling the mainwindow for everything. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-31Remove unused signalGravatar Tomaz Canabrava
And move things around, informationManagementEnded was a good name but endEditDiveSite is better. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-31Remove unused action on the mainwindow.Gravatar Tomaz Canabrava
The Manage dive sites action should be in the View menu because it makes more sense to "view dive site edit" Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-30QML UI: move back button back to the left and center textGravatar Joakim Bygdell
The top bars on the main page and dive details should be the same height and keep the same layout. [Dirk Hohndel: refactored Joakim's patch to work on top of what was already in master] Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-30RBT - Add load/save in git storage supportGravatar Salvador Cuñat
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-30RBT - Add save/load in xml file supportGravatar Salvador Cuñat
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-30Add support for RBT reported sample valueGravatar Salvador Cuñat
RBT (Remaining Bottom Time) is a value calculated on the fly by some air integrated divecomputers, for example Uwatec devices. This value is an estimation based in some heuristic around time function pressure gradients. This way, RBT would be the time a diver can spend at actual depth without running out of gas (taking account of ascent, deco, if required, and rock bottom gas reserve, if set). Older Uwatec devices just made the calculus and only stored alarm events if this time value reached zero, but modern devices store the value each sample, in minutes. It seems that Suunto Eon Steel is storing RBT values too, in seconds. Libdivecomputer has supported RBT for a while, but Subsurface just printed it to stdout and dropped it. This adds support for RBT value on subsurface sample structure and shows it in the profile's info box, right under TTS(calc), if selected, where these two values can be easily compared by humans. Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-30QML UI: make the top bars look the sameGravatar Joakim Bygdell
The top bars on the main page and dive details should be the dame height and keep the same layout. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-30QML UI: dynamic button sizesGravatar Joakim Bygdell
Butons are sized based in the text printed on them, we want our buttons to have a meaningful minimum size and a preferred size that is similar regardless of screen resolution. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-29QML UI: Fix incorrect sizing of dive profileGravatar Grace Karanja
This resizes the dive profile to always maintain an equal width and height, so that the sizing is the same in all devices. Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-29Printing: make better use of the space in Two Dives templateGravatar Dirk Hohndel
There was way too much wasted space and the profile ended up being unnecessarily tiny. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-29Printing: calculate a much more accurate font scale valueGravatar Dirk Hohndel
This simply uses the relative size of the profile. This can result in truly tiny text in print, but at least it's consistent and logical. We could add some minimum value there but I'm not sure that's the right answer, either. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-29Don't connect to the MainWindowGravatar Dirk Hohndel
We really shouldn't need to connect to the MainWindow in order to get the right scale for the fonts when printing. While printing likely will remain a desktop only function, this is just bad design. And making calls like this from the paint() function is a bad plan, anyway. So instead we make sure that every DiveTextItem knows what the printScale was when it was created (or actually, when the text was first set as they frequently get created before we have a scene which we use to get to the profile), and gets updated whenever that scale changes. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-29Profile: make sure text is scaled correctly when drawnGravatar Dirk Hohndel
We had all this wonderful code to scale the text correctly, except we went out of our way to make sure the code wouldn't be called unless something changed on this specific text item. But that's bogus because the scaling depends on external factors like the fontPrintScale. So instead of calling updateText() when attributes of this DiveTextItem change simply call it right before the DiveTextItem gets painted. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-29Make gradient factor text an independent item on the profileGravatar Dirk Hohndel
Having it as part of the DiveCalculatedCeiling class caused us to manage this text 17 times (and plotting it 17 times) which is rather silly. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-28Printing: fix dive lookup for profile generationGravatar Dirk Hohndel
The existing code (and templates) looked up dives by number and then used that as index into the dive table. This worked exactly in one case: if all dives were numbered consecutively starting with 1. While that is not an entirely unreasonable case, it's of course not an acceptable assumption to make. This commit adds the necessary changes to instead look up dives by their unique id. That's what it's there fore, after all. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-28Printing: add new default color schemeGravatar Dirk Hohndel
This is based on the Subusrface logo colors, keeping the hue and modifying the saturation and value in order to get what to me looks like a fairly pleasant color setup. This is an attempt to come up with a good default. By all means, this is supposed to be a starting point to make it better, not a decision on what the colors should be. I would however claim that they are better than the previously available options :-) I like the idea of basing this on our existing colors - but even that is up for modification if someone has a better proposal. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-28Seabear import: fix detection of empty linesGravatar Miika Turkia
The old code trusted in Windows new lines with length of 3. The new code strips out spaces and line ending chars resulting in empty line being of length 0. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-28Test case: Seabear new formatGravatar Miika Turkia
This validates Seabear import from H3 and T1 dive computers that use new CSV format to store the logs. The fields wary depending on the dive mode, thus we need to parse the field configuration during import. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-28Test dives for Seabear new format import comparisonGravatar Miika Turkia
This file contains imported dives from Seabear H3 and T1 dive computers. It is used for validating Seaber import from new file format. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-28Test dives for Seabear new formatGravatar Miika Turkia
These are test dives for Seabear H3 and T1 dive computers received from Seabear Diving Technology. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-28Merge branch 'custom-print' of github.com:neolit123/subsurfaceGravatar Dirk Hohndel
2015-07-28Printing: safer Template->Import|Export handlingGravatar Lubomir I. Ivanov
Check if the file string is empty and return, else process it. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-07-28Printing: rename templates to have spaces and capitalizationGravatar Gehad elrobey
This is easier to have user friendly names for the bundled templates. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-07-28Printing: select current template upon importingGravatar Gehad elrobey
When importing a template, make it the user currently selected template. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-07-28Printing: choose first template if selected template is not foundGravatar Gehad elrobey
If user selected template is not found, we choose the first template as a default choice. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-07-28Printing: don't name color templates with confusing numbersGravatar Gehad elrobey
Use the color_palette enum instead. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-07-28Printing: add the "Shades of blue" color themeGravatar Gehad elrobey
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-07-28Printing: add a "Flow" layoutGravatar Gehad elrobey
Print dives successively and fit as many as we can in the smallest number of pages. Some dives may be broken between pages. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-07-28Printing: clear all templates before insterting the new templatesGravatar Gehad elrobey
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-07-28Printing: support importing/exporting of templatesGravatar Gehad elrobey
Implement 'import/export' features, so it's easier to share customized printing templates. Also support deleting existing templates. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-07-28Printing: add "Import", "Export" and "Delete" buttons for templatesGravatar Gehad elrobey
Use the button group to import, export or delete a template from the printing_templates directory. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>