Commit graph

5638 commits

Author SHA1 Message Date
Dirk Hohndel
a4d1163d21 Add the last couple of changes before the beta
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-11 17:05:52 -07:00
Tomaz Canabrava
ece93107d9 Better default font for printing.
use setPointSize instead of setPixelSize to make it device independent,
also reduced a bit the size of the font.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-11 17:02:24 -07:00
Tomaz Canabrava
8cd4a5f3d1 Render the table print in curves.
We can use QPicture to record the painting done by a QPainter and it will
be saved in vector format, then we can simply paint that.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-11 17:01:59 -07:00
Tomaz Canabrava
e18f4dfdee Code cleanup: removed bogus animation functions
All animations are now on the Animations namespace, which resulted in a
bit of code cleanup, which is nice.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-11 17:01:12 -07:00
Tomaz Canabrava
2171b981ac Correctly disable all animations
This seems to be needed for the correct print of the profile,
What was happening on the print code was that the profile even in print
mode was doing animations, and we were getting a frame of it and trying to
print it.

Also, a bit of code cleanup.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-11 17:00:40 -07:00
Tomaz Canabrava
3fa908b242 Add a horizontal spacer to make the searchbar layout better
Just a horizontal spacer added to the .ui

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-11 17:00:23 -07:00
Tomaz Canabrava
bd993a4135 Use a layout to lay down the search and the help
The old layout tried to add the search on top of the help view, which
didn't really work because of the way that the QWebView rendered: we got
garbage after a scroll with the find opened. So now I'v created a QWidget
and layed down the QWebView and the search bar vertically.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-11 16:59:14 -07:00
Tomaz Canabrava
af9d62bac3 Fixed input in the DivePlanner table
Based on Glance's idea on rewritting the Delegates, but
we don't need to redo the wheel as Qt already gives us
the correct Delegate, we just need to set some boundaries
on it before returning.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-11 16:58:42 -07:00
Anton Lundin
3dbc5bfeaa planner: Correct pO2 comparison
Don't compare pO2 with a bool, compare it with the result of the ?:
expression instead.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-11 16:58:24 -07:00
Tim Wootton
44a554d53a Makes profile button tool-tips consistent
Toggle seems to fit all these scenarios ok.

Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-11 16:58:02 -07:00
Tim Wootton
d69d1cdfcd web service not web-service
web service not web-service to match the others

Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-11 16:55:53 -07:00
Dirk Hohndel
de958c27dd Latest translation source
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-11 13:18:04 -07:00
Miika Turkia
e65c4ac55e Add support for decimal comma on UDDF import
Gas changes generated by Xdeep can contain mix information with decimal
comma instead of decimal point. Thus we need to convert the comma to
point before performing mathematical operations on it.

Fixes #612

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-11 12:08:03 -07:00
Miika Turkia
964401c374 Add image support to UDDF export
This patch adds image support to UDDF export. As far as I can tell from
the UDDF specification, the images can only be added to notes field, so
that is what we do here. (buddy and owner can also have image tags, but
that is irrelevant for Subsurface currently.)

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-11 12:07:43 -07:00
Tim Wootton
745c9a130c "non-used" just didn't sound right to me.
Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-11 10:44:49 -07:00
Tim Wootton
9b5048034f profile capitalisation
Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-11 10:44:41 -07:00
Tim Wootton
38c402d9ad dive list context menu capitalisation
Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-11 10:44:35 -07:00
Tim Wootton
9dd484b63f Misc UI capitalisation consitencies and other text changes
Capitalisation consitencies
A typo correction
A readability improvement (IMHO)

Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-11 10:44:09 -07:00
Dirk Hohndel
fbd00c6b0d Planner: add event that explains when planner turns red
I don't know why the plot_info was walked backwards - for our purposes
walking forward needs to make a lot more sense. And the event nicely goes
away when the diveplan gets modified and the displayed_dive gets reset.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-11 10:26:22 -07:00
Dirk Hohndel
6c9aaf406a Planner: fix calculation when it is safe to surface
We were comparing with a negative depth which apparently confused the
algorithm.

Fixes #611

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-11 10:10:15 -07:00
Tomaz Canabrava
9661926131 It's safe to delete NULL pointers
Small code cleanup, it's safe to delete null pointers.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-11 09:58:55 -07:00
Tomaz Canabrava
040e172d33 Read the preferences upon initialization for the show/hide pictures
Forgot to add this one.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-11 09:57:27 -07:00
Tim Wootton
3a16a64616 misc capitalisation and spelling
Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-11 07:06:26 -07:00
Tim Wootton
402198871b divelistview capitalisation consitency
affects mainly capitalisation on the dive list context menu

Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-11 07:05:59 -07:00
Tim Wootton
fbb01e37d3 webservice capitalisation consitency
Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-11 07:05:38 -07:00
Tim Wootton
da51b1b3ac shiftimes capitalisation consitency and title
Makse capitalisation consistent.
Makes title more specific

Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-11 07:05:17 -07:00
Tim Wootton
9b6d72e8b4 shifimmagetimes capitalisation consitency and title
Makse capitalisation consistent.
Makes title more specific

Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-11 07:05:10 -07:00
Rick Walsh
62c09bc099 Corrects start and end pressure in HTML export
The start and end pressures were reported the wrong way.

Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-11 06:59:07 -07:00
Gehad elrobey
e5c5ee74f0 HTML: fix profile labels
Fix labels view in dive profile.
Add Jqplot css file to the exports.
The css files fix the view and enahnce the plot.

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-11 06:59:00 -07:00
Gehad elrobey
266e3a6cdd HTML: add empty values of pressure cylinders
When the dive cylinder (start pressure or end pressure) is not set,
enter the values of the pressure in the first and the last samples
instead. Use the first / last non-zero values.

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-11 06:58:53 -07:00
Tomaz Canabrava
b9d04c0cf4 Show/Hide pictures working.
This code hoocks the pictures with the preferences change.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-10 19:59:54 -07:00
Tomaz Canabrava
a00d8101c5 Fix memory leak on the Export Dialog
The export dialog was being created but never free'd.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-10 19:59:45 -07:00
Tomaz Canabrava
31e0ec8696 Macro to simplify the creation of toggle buttons on the Profile
The new macro hides all 5 lines of code from the old code to just one,
since we already have 15 buttons and more are comming, and *every*
code is just the same, it's a logical change that will make us reduce
now 75 lines of code to just 15, in the future this can be bigger.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-10 19:59:39 -07:00
Tomaz Canabrava
dd94831d90 Correctly sets the 'enabled' flag on the picture button
Forgot to add this one, oops.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-10 19:59:27 -07:00
Tomaz Canabrava
503a150af0 Added the toggle picture button and hoocked it up
This patch adds the toggle picture button and hoocks
it up with the rest of the code. I'v also changed a call
from ProfileWidget because it caused errors on the ui
generated code, where it would try to call an still-to-be
instantiated object.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-10 19:59:23 -07:00
Tim Wootton
8940f29ead Prefer "temp." vs "temp" and sometimes "temperature"
For consitency in the UI
There are plenty more of these to find, and once in a while
"Temperature" looks more apropriate, like in a title, but most
of the time "temp." works best.

Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-10 16:30:56 -07:00
Tim Wootton
25114a4e84 preferences capitalisation consistency
Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-10 16:30:39 -07:00
Tim Wootton
70bec60983 plannersettings capitalisation consitency
Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-10 16:30:14 -07:00
Tim Wootton
5538fd4baa mainwindow capitalisation consistency
Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-10 16:30:05 -07:00
Tim Wootton
e418f7d871 downloadfromdivecomputer capitalisation consitency
Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-10 16:29:24 -07:00
Tim Wootton
7680863c0e diverplanner capitalisation consitency
Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-10 16:29:01 -07:00
Tim Wootton
91ead05dbf divelogimportdialog capitalisation consitency
Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-10 16:27:50 -07:00
Tim Wootton
2db9c97530 Add diveloexportdialog explaination strings for translation
Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-10 16:26:54 -07:00
Tim Wootton
8e7b7fafda divelogexportdialog capitalisation consistency
Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-10 16:26:41 -07:00
Tim Wootton
5c5168cf17 maintab capitalisation consistency
Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-10 16:26:30 -07:00
Tim Wootton
85a98636c1 divecomputermanagementdilog capitalisation consitency
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-10 16:26:20 -07:00
Tim Wootton
d2d6b7937e Implements consistent capitalisation and minor tweaks to survey text
Makes capitalisation consistent
Replaces Tech diver with Technical diver
Adds title to survey dialog (was "dialog")

Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-10 16:24:55 -07:00
Henrik Brautaset Aronsen
a99349814c Use gasmix getters in diveplanner.cpp as well
Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-10 16:19:06 -07:00
Robert C. Helling
6fa996a883 Use user entered pO2 limits for high pO2 warnings.
Furthermore, replaced gasmix accessors instead of .permille directly (think: air!)

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-10 13:43:24 -07:00
Anton Lundin
86d66d3c9d Limit the scope of gasidx in add_plan_to_notes
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-10 13:37:27 -07:00