aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2014-07-18Fixed memleakGravatar Tomaz Canabrava
The model was not being deleted when the table was, and thus we recreated it for every print. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-18No need to delete a QPointerGravatar Tomaz Canabrava
QPointer is a smart pointer, it will delete itself when the refcount == 0. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-18Save / Restore the QPainter before operations.Gravatar Tomaz Canabrava
I don't know if this fixes anything, but it is asked of us to do that by the Qt docs. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-18Added a HTML Displayable DelegateGravatar Tomaz Canabrava
Added a HTML delegate to show rendered HTML on print. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-18Use get_gas_at_time in active_o2Gravatar Anton Lundin
active_o2 is now just a wrapper to return the o2 part of the active gas at a certain time. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-18Convert get_gas_from_events to get_gas_at_timeGravatar Anton Lundin
This converts the get_gas_from_events to a get_gas_at_time function that actually maps our events to what cylinder and thus gas we are breathing at that time. [Dirk Hohndel: fixed to actually use the gas that was looked up (and make things compile)] Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-18Use more of our propper types in the plannerGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-18Correct usage of current_dive to displayed_diveGravatar Anton Lundin
current_dive is the selected dive, and displayed_dive is the one we are currently drawing. They are quite often the same one, but not in the case of adding a dive for example. This fixes potential null pointer dereferences in the case of a blank divelist, and makes sure we use the correct data in the case of adding and planning dives. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-18Use "6m" and "20ft" instead of "6m/20ft".Gravatar Henrik Brautaset Aronsen
Get rid of unit type shortcut in planner. Also use "to" instead of "-" in ascent rate intervals. Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-17Replace cylinder_is_used with is_cylinder_usedGravatar Anton Lundin
is_cylinder_used uses get_cylinder_index as underlaying function that does the right thing with with respect on how to find the closest matching cylinder, and handles both types of gaschange events correctly. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-17Rename is_gas_used to is_gas_usedGravatar Anton Lundin
This function operates on cylinder ids, so its actually about cylinders not gases. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-17Statistics: change our notion of "bogus SAC rate"Gravatar Dirk Hohndel
With a pSCR it is entirely possible to have a SAC rate below 2.8l/min. Since we still don't want to include SAC rates of 0 let's change the cutoff to 0.1l/min. Fixes #624 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-17Accept negative pressure readingsGravatar Robert C. Helling
Sometimes the planner can produce negative pressures (i.e. when the cylinders are not properly configured) or when the usser ignored gas management (for whatever reason). When such a dive gets saved and reread we should not display a further "Strange pressure reading" warning on the command line. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-17Planner: correctly deal with units in Ascent/descent ratesGravatar Dirk Hohndel
This adds two changes a) it uses rint() to make sure we don't truncate the displayed values b) it moves the update of the displayed values into a helper function that is also called whenever the settings change Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-17Planner: Ascent/descent rates are stored in mm/s not in m/minGravatar Robert C. Helling
So should be defaults. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-17Update spanish translation for user-manual.txt to 82fc95dGravatar Salvador Cuñat
[Dirk Hohndel: added the html.git file] Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-17Hide gachange events in the first 30 secondsGravatar Anton Lundin
Back in 4.0 we hide all gaschange events during the first 30 seconds, not just gaschange events on second 0. Eg, the OSTC3 emits its gaschange event on the first sample, which can be 2, 10 or 30 seconds into the dive. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-17Use get_cylinder_index instead of get_gasidxGravatar Anton Lundin
Replace get_gasmix_from_event and get_gasidx with get_cylinder_index. get_cylinder_index actually knows about both types of gaschange events and the difference between them. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-17Add missing struct keyword in DivePlotDataModelGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-17Use plot_data cylinderindex instead of event dataGravatar Anton Lundin
For the info box, we can't use the event data, because its not 1:1 mapped to whats in the cylinder and what we actually switched to. Use the plot_data here we already calculated what we are switching to. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-16Store drop_stone_mode, bottomsac, decosac in prefsGravatar Gaetan Bisson
The values for drop_stone_mode, bottomsac, and decosac are typically the kind of personal data specific to a diver that is unlikely to change from one dive plan to the next. This patch stores/restores them to/from the preferences file. For this, it adds bottomsac and decosac to the prefs structure; drop_stone_mode was already there, though not stored/restored. Signed-off-by: Gaetan Bisson <bisson@archlinux.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-16User manual: add latest html files to git treeGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-16User manual: Updated textGravatar Willem Ferguson
This patch contains some updates to the user manual to reflect the new images that were submitted previously. The updates include: 1) Moving the "Load Photos" section to the section daling with the input of dive information (photos qualify as additional dive information). 2) Changing the wording around the new button in the tool bar. Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-16Planner: don't track cylinder pressure if working pressure is 0Gravatar Dirk Hohndel
The pressure graph will go from 0 to negative - one could make a weak argument that this would at least tell you how much pressure you'd need in the cylinder to start with, but that's kinda lame. Fixes #615 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-16Translate velocity units in planner settingsGravatar Sergey Starosek
Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-16Pick the correct timezoneoffset for the day in questionGravatar Dirk Hohndel
Calculating the timezoneoffset for the current date really makes no sense whatsoever when displaying a time that isn't "now". Fixes #605 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-16Desselects the trip before dive add / plan, and reselects it on cancelGravatar Tomaz Canabrava
When we had a trip selected, we ignored that and simply called the DiveAdd functions, but the mainTab code that deal with selections to show one or more dives or trips asked how many trips were selected to the DiveList, and since a trip was selected things go kabum. Fixes #606 Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-16Force replot of selected_dive when canceling planGravatar Tomaz Canabrava
The profile was still the planner one, so we need to force a replot. Fixes #621 Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-16Use 'this' instead of ::instance() when iside of same class.Gravatar Tomaz Canabrava
Do not use MainWindow::instance() inside of a non-static mainWindow method, that's just bogus. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-16Fixed creating recursion on the connectionsGravatar Tomaz Canabrava
Ugh. Each time you wanted to change a cylinder, a new connection was being created on this object, delaying the correctly setup of the item. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-16Complete the name of the first Cylinder on editGravatar Tomaz Canabrava
When you entered part of the name of a cylinder this was being treated as a new cylinder, and not selecting the first one. Fixes #628 Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-16Added a 'use default file' button on preferences.Gravatar Tomaz Canabrava
Added a 'Use default file' button on preferences in a way that doesn't clutters the interface. Fixes #630 Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-16Fix saving and storing the dive plan notes when there's html on itGravatar Tomaz Canabrava
We save an HTML table-based plan, so we need to get the text as html, not plaintext. Fixes #634 Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-16Pull latest translationsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-16Date picker l10n for profile and plannerGravatar Sergey Starosek
- set application-wide locale from preferences - use custom date format for display Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-16Rely on QNetworkReply finished() signal instead of AccessManager oneGravatar Tomaz Canabrava
The access manager is only one, while we can make requests from different parts of the application, so relying on the manager finished() signal to see if something was done or not was a not very good move. The QNetworkReply is created when a get() is invocked on the AccessManager and that's unique. connect it's finished() signal instead. bonus: code cleanup. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-16More source string updates for translationsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-16More strings to translate for statistics tabGravatar Sergey Starosek
Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-16pN2 » pN₂, pO2 » pO₂Gravatar Henrik Brautaset Aronsen
Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-16Add latest text strings for translationsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-16Translations: get hemisphere letters translated againGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-16Convert ternary "?:" into if for translation tools to workGravatar Dirk Hohndel
It seems the translation tools don't like the ?: in the argument - can't blame them. So use an explicit if clause instead. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-16Run convert -strip against all .png filesGravatar Dirk Hohndel
Just in case... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-16Fix libpng warning about unrecognized profileGravatar Sergey Starosek
During Subsurface startup there are several warnings reported: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited The reason is explained at https://wiki.archlinux.org/index.php/Libpng_errors Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-16Set proper gas type on UDDF importGravatar Miika Turkia
Use type 25 on UDDF import when the gas mix contains some helium. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-16Replacement figures for user manualGravatar Willem Ferguson
Replacement figures for user manual Here are 12 replacement figures for the user manual to bring the figures in line with the current UI. This relates to the updated profile toolbar and manual dive profile entry. I did not change any text of the manual. That will happen tomorrow evening. Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za> From 85413b967c02738d47f0b7779613f33cc7898c17 Mon Sep 17 00:00:00 2001 From: Willem Ferguson <willemferguson@zoology.up.ac.za> Date: Wed, 16 Jul 2014 07:26:43 +0200 Subject: [PATCH 4/4] Replacement figures for user manual Here are 12 replacement figures for the user manual to bring the figures in line with the current UI. This relates to the updated profile toolbar and manual dive profile entry. I did not change any text of the manual. That will happen tomorrow evening. Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-16Index used cylinder properly on divelogs.de exportGravatar Miika Turkia
The wrong O2 percentage was due to not referring to the correct cylinder but grabbing any o2 value in any cylinder. While fixing this, I noticed that also end pressure was missing the cylinder selection, so fixing that as well. Fixes #626 Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-16Small update to CodingStyle documentGravatar Dirk Hohndel
Mention variable declarations (they should be at the beginning of code blocks). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-16Disable DC shortcuts on closing data fileGravatar Sergey Starosek
Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-16Suppress XML preamble in CSV exportGravatar Sergey Starosek
To obey <xsl:output omit-xml-declaration="yes"/> element one should rely on libxslt to do its job instead of writing document himself. Discussion on this subject can be found at http://comments.gmane.org/gmane.comp.gnome.lib.xslt/3839 Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>