summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2014-02-23User correct branch name for MarbleGravatar Dirk Hohndel
Oops, that was the tag, not the branch. Reported-by: Darren Hart <darren@dvhart.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-23Make sure that there are plot_info entries for eventsGravatar Dirk Hohndel
We use the plot_info as basis for our dataModel in the new profile. In order to be able to place events at the right spot we need to have a plot_info entry when the event happens. So let's add interpolated entries not only based on time but also whenever there's an event between them. This should address Robert's comment in commit 0474fe70fc47 ("New profile: add image pixmaps for image events"). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-23Don't try to setup event if it is NULLGravatar Dirk Hohndel
This also fixes the whitespace in a function that I instrumented to figure out what's going on. I restored it to its original state, but I couldn't leave the whitespace unfixed... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-23Don't try to set visibility of events before they have been addedGravatar Dirk Hohndel
Admittedly this code doesn't do anything useful right now, but at least have it not to anything useful in the right spot. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-23Add resource for flag iconGravatar Dirk Hohndel
This has been broken in the old profile for a while (as we use the flag icon there by name). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-22New profile: add image pixmaps for image eventsGravatar Robert C. Helling
For reasons that I don’t understand, the image is only shown if the event happens to be at the same time as a depth sample. This is, however, not specific to these image events, it seems to apply to all events. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-22User manual: update html fileGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-22User manual: gps coordinates are tied to location namesGravatar Dirk Hohndel
While it seems obvious that you need a named dive site in order to track its coordinates, apparently people try to have no location name but distinct coordinates which at this time we do not support. See #440 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-22User manual: Give credit where it's dueGravatar Dirk Hohndel
Willem has been maintaining the user manual for quite a while and at this point is the main author, so he should be listed first. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-20Clear edit mode for manually added divesGravatar Miika Turkia
Edit mode must be cleared for manually added dives as well when one hits cancel or save. Fixes #437 Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-19Implement the rest of the heartbeat.Gravatar Tomaz Canabrava
The only thing that was missing was the size of the vertical axis. I'm setting a small line on the bottom of the temperature axis, since both have blue color, this will not make people think one is the other. TODO: change the color to red. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-19New profile: partial addition of heartrateGravatar Dirk Hohndel
This was done during an IRC hacking session with Tomaz. It compiles, it shows something but not the right graph. Committed here so Tomaz and I can continue to work on it. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-19Only recalculate the tooltip if time has changedGravatar Dirk Hohndel
Small optimization, but seems to make sense. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-19Convert more TRUE/FALSE to stdbools true/falseGravatar Anton Lundin
In Qt5, Qt doesn't define TRUE/FALSE anymore, so we need to stick to stdbools to have Qt5 builds working. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-18Implement the '...' search button for Uemis dive computersGravatar Dirk Hohndel
Right now the search button isn't connected for any device (clearly an oversight). At least for the Uemis I think I have a sane implementation of what that should do. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-18Add an assertion to prevent MainWindow from being recreatedGravatar Thiago Macieira
Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-18Make lastUsedImageDir static to prevent a crashGravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-18Updated the included user-manual.htmlGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-18User manual: Style and grammar updatesGravatar Willem Ferguson
This is an edit for style and grammar for the manual section dealing with downloads from DC. This section has also been expanded to cover all the controls in the downloads panel. Signed-off-by: Willem Ferguson <willem@willem-Precision-M4700.(none)> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-18Use DateTimeOriginal on image importGravatar Miika Turkia
Some digital cameras do not set the DateTime exif field bat use DateTimeOriginal. If the first option is not found, use the second one to try to detect the moment when the image was shot. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-18Fix compile errorGravatar Miika Turkia
I get compile errors from these lines. Removing the class name from the calls allow me to compile the current master. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-17Code cleanupGravatar Dirk Hohndel
We called the helper functions way too often. Whitespace / coding style adjustments. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-17Don't use the same variable for new and old profileGravatar Dirk Hohndel
This will make no difference when we remove the old profile, but for now I worry that this could cause us trouble. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-17Don't return a stack variableGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-17Make part of the context menu work (gas change event)Gravatar Tomaz Canabrava
The code of the context menu and the gas change event callback is mostly the same as the old profile, with minimum modifications, as this changes the order of the code on the callback to make it a bit saner (declare variables first, call code later). This also fixes a bug on the model that was not cleaning itself in the correct way after a call to clear. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-17Missing initializerGravatar Dirk Hohndel
This was causing us to access uninitialized memory at times. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-17Compute dive computer/camera time offset from sample pictureGravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-17Store camera time offset in preferencesGravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-17Fix missing air temp on divelogs.de exportGravatar Miika Turkia
Fixes #439 Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-16Whitespace cleanup for parse-xml.c and save-xml.cGravatar Dirk Hohndel
This is looking really good. Done using our whitespace tool. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-16Continue to improve whitespace cleanup helperGravatar Dirk Hohndel
The more I try the cleanup helper, the more corner cases I find... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-16Allow backups for .ssrf files as wellGravatar Dirk Hohndel
In commit 102bf768944b ("Rename old 'xml' file as 'bak' file when saving") Linus forgot about our other standard filename extension... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-16Rename old 'xml' file as 'bak' file when savingGravatar Linus Torvalds
If you use the standard naming convention and end your subsurface filename in ".xml", we will now save away any previous xml file as a "bak" file before writing a new one. This can be useful for: - recovering from mistakes that deleted old dives - seeing what changed (ie you can do things like "diff -u xyz.bak xyz.xml") after doing some operation and saving the result. However, this does only a single level of backups - if you save twice, you will obviously have lost the original. I'd strongly encourage some external backup system in addition to this very simplistic backup. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-16New profile: some more slight rearrangementsGravatar Dirk Hohndel
This is just an attempt to not have the time markers and dive computer name printed right on top of each other. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-16Fix missed "+0.5" rounding - use rint() insteadGravatar Linus Torvalds
In commit 23baf20f569f (Use "rint()" instead of rounding manually with "+ 0.5") I had missed this one remaining place where we rounded things by adding "+0.5" and then truncated. Fix that up. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-16micro-optimisation: avoid division in main strtod() loopGravatar Linus Torvalds
Division is expensive, so replace it with multiplication instead. But don't multiply by 0.1 (inexact in floating point), multiply by 10 and then do one division at the end. Make sure the final division is at the very end, so that the result isn't immediately used. That allow the division to overlap with the function return overhead, hiding it further. This is silly, but while thinking about different file formats and doing profiling of loading big files, it turned out that "strtod_flags()" actually showed up in profiles. Not very high, but at more than 1%. This makes the common case (no exponent) use only addition and multiplication until the very end, and makes the division be the very last thing it does, which minimizes the data dependencies on the division. For my stupid test-case, it cut the cost of strtod_flags() in half according to the profile. The half a percent speedup on loading time isn't really noticeable or even measurable outside of profiling startup costs, but rather than carry this along in my tree or just throw it away, I'm sending it out to see if anybody cares. Note that we could avoid the final division by instead multiplying "decimal" with 0.1 rather than multiplying by 10 (and switching the sign test over), but that's a fundamentally inexact operation in binary floatig point, so doing the "multiply by tens for decimals" ends up keeping everything exact as long as possible. For our use, we probably really don't care, but whatever. End result: this should not only speed things up immeasurably, it *might* also make things more precise at a level that we really don't care about :^p I'm really selling this piece of crap, aren't I? [Dirk Hohndel: sorry - had to pull the full email into the commit message this is so good, you couldn't make it up] Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-16Fine tune positioning of temperature and tank pressure linesGravatar Dirk Hohndel
Maybe not yet perfect, but better. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-16New profile: improve mean depth lineGravatar Dirk Hohndel
Show decimal depth and make the line length more appropriate for the dive profile shown. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-16Clean up some warningsGravatar Dirk Hohndel
Unused variables, more initialization order complaints. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-15Math is hard. Let's go shopping.Gravatar Dirk Hohndel
Alternatively, we could use fabs() to determine the absolute value of floating point arguments. The author of commit b6a30dcdd3225 ("Improve floating point equality test") clearly has a rather loose definition of "improve". And the maintainer who accepted that patch shares the blame... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-15Remove some unused variablesGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-15Fix z-value of the PartialPressure gas graph over the timeAxisGravatar Tomaz Canabrava
Fiz zvalue of the partialPressure Gas Graph over the TimeAxis, and also corrects the position of the PartialPressure gas graph. It now no longer appears to 'float' over the TimeAxis, now it's on the very top of it. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-15Make it possible to hide some of the grid lines.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-15Better setup of the defaults for the grid.Gravatar Tomaz Canabrava
This patch creates better defaults for the grid lines, size, position and z-level. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-15Create the grids.Gravatar Tomaz Canabrava
Create the grids, and the way that they move is fabulous <3 Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-15Change the axis update method to move the lines.Gravatar Tomaz Canabrava
Change the axis update method to move the lines alongside the texts. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-15New template-based-function: remove the uneeded items on a QList.Gravatar Tomaz Canabrava
This function is for non-duplication of code for different QLists, since I now have Texts and Lines, I needed to make the code in a way that it worked without dupplication. It's a pretty standard use of templates, I think that even the C guys will not be offended by it. :) Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-15Remove the class 'CartesianPlane'Gravatar Tomaz Canabrava
This class was pratically a re-do of the axis, I'll do the axis to plot the lines when it feels like it. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-15Move the events when a partial pressure graph is enabled / disabledGravatar Tomaz Canabrava
The events were static on the canvas even if the profile changed its size because of a toggle of the partial pressure gas. This patch makes events move on the canvas to their correct place. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-15If the depth is zero, dont show it.Gravatar Tomaz Canabrava
The first depth label of its axis is always zero, do not show it. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>