Commit graph

4733 commits

Author SHA1 Message Date
Miika Turkia
2b559225d6 Quote header line properly on CSV export
Let's make the export consistent by quoting the header line the same way
the sample rows are quoted.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-26 17:17:02 -07:00
Miika Turkia
85a3f10508 Use proper export text instead of save
When exporting UDDF logs the file name selection dialog should talk
about export, not save. This patch changes that text

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-26 17:16:58 -07:00
Gehad
1306c0fecb Fixing Hotkeys inconsistency for divecomputer/pref/numbering windows
Fixing the Hotkeys inconsistencies in subsurface, All the popups should
react to 'esc' and 'ctrl-w'/'cmd-w' as 'cancel'. also 'ctrl-q'/'cmd-q'
should quit subsurface.

Fixes #489

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-25 13:24:39 -07:00
Gehad elrobey
b4a04074c2 Closing shortcuts for shift times windows
Adding the ability to close the shift times window, also Quit subsurface
with this window in front.

See #489

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-25 10:52:09 -07:00
Dirk Hohndel
155eac11d2 Ctrl-W and -Q support for GPS, divelogs.de, divecomputer and CVS import
Getting closer to consistent behavior.

See #489

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-25 10:47:44 -07:00
Dirk Hohndel
461872b7ea Print dialog: make Ctrl-Q and Ctlr-W work
All these recent commits should have included:

See #489

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-25 10:27:44 -07:00
Dirk Hohndel
5eeb9ebb5d Quit Subsurface with about window in front
Add ability to quit Subsurface with a Ctrl-Q shortcut even if the about
window is active.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-25 10:21:55 -07:00
Gehad
e253ec66d6 Closing about window by shortcut
This adds the ability to close the about window with the ctrl + w
shortcut.

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-25 09:03:11 -07:00
Salvador Cuñat
48b8cbadf7 User manual: some changes regarding the companion app
Subsurface companion is, basically, the same from last Subsurface release,
it's only been added with the map feature which is depicted here.

Distance between positions takes precedence over time between them, so you
can have positions faster than one each period set in the "Min Duration"
setting.  Actually this setting seems useless as you won't have a fix each
period if distance is under "Min distance".

Lesser changes in manual involving Background Service, the dificulty on
matching times and little personal recomendations.

[Dirk Hohndel: minor language changes]

Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-25 09:02:23 -07:00
Miika Turkia
5ac851c464 Quit Subsurface with yearly stats window in front
Add ability to quit Subsurface with a Ctrl-Q shortcut even if the yearly
statistics window is active.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-25 08:49:14 -07:00
Miika Turkia
fcaf30081f Close yearly statistics with shortcut
This enables closing the yearly statistics window with esc or ctrl+w
keys.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-25 07:20:33 -07:00
Dirk Hohndel
126106f9b0 Quit Subsurface with user manual window in front
Add ability to quit Subsurface with a Ctrl-Q shortcut even if the user
manual window is active.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-25 07:19:18 -07:00
Robert C. Helling
b068ae6019 Close user manual window shortcut
Add ability to close the user manual window with a Ctrl-W shortcut.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-25 07:19:18 -07:00
Dirk Hohndel
0aa8b7f47d Start towards 4.1
Update version numbers, README / ReleaseNotes

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-25 07:19:18 -07:00
Dirk Hohndel
0be8512ab0 Add small helper to determine if dive computer has HR data
Currently unused, but requested for a future feature.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-25 07:19:18 -07:00
Tomaz Canabrava
0785a7f0ca Better handling of mouse on the delegates ( Equipment Edition )
This adds more handling of missing actions for the mouse on
the equipment edition. It complements the stuff talked about
on bug 359, but it's a different issue. 359 seems already fixed.

See #359

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-25 07:19:18 -07:00
Tomaz Canabrava
6fe692bde6 Fix 'cancelling divecomputer download'
When a download is canceled, discard the partially downloaded dives.

Fixes #341

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-25 07:19:18 -07:00
Tomaz Canabrava
6378bfd91e Save latitude and longitude on XML even if location not set
This bug don't exists when saving to git storage, only when saving XML.
The latitude and longitude were being discarded if the location name was
not set and this breaks some users workflow. Not nice.

This should fix the final missing part for bug #440

Fixes #440

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-25 07:19:18 -07:00
Gehad
e088067ef1 Fix a minor bug in the tags widget.
Using the auto-completer while the tags widget is 'empty', always picked
the first choice.

Write some letters and remove them in an empty tags widget, the complete
list of tags will appear - now if you try to choose any tag with the
keyboard arrows it will choose the first one. also if you tried choosing
it by mouse it will be inserted twice.

This is fixed by removing the unneeded else part.

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-23 07:22:03 -07:00
Dirk Hohndel
d461780369 Windows out of tree cross build: stage package in correct folder
When doing an out of tree build you don't want to stage the package with
the source but under your current directory. So let's make sure we
distinguish between source and target here... and instead of putting
things into packaging/windows they now end up in staging which is much
more consistent. And to make my life even easier, the installer .exe ends
up in the base dir in which you build the package.

Also, we link statically against libdivecomputer, so don't pack the dll.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-21 12:16:56 -07:00
Dirk Hohndel
986309b108 Windows cross build: use the correct objdump
This one was silly but took me a while to track down.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-21 11:08:10 -07:00
Dirk Hohndel
4c8369a7ba More cross building stuff
This is all mostly to make my life easier.
I'm not thrilled with the marble changes - as Linus pointed out before the
way we do these "LIBxxxDEVEL" changes is broken as it will still first
link against any library installed in the system. But since I have removed
any globally installed copies of these libraries this actually works for
me and it does help when experimenting with different build options for
the main libraries that we depend on.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-21 08:54:04 -07:00
Willem Ferguson
24792f402d User manual: Replace some graphics
1) Two of the major screen images were replaced to reflect the current
   screen layout with the new features of the profile toolbar.
2) The heart rate button is depicted and desribed.
3) Minute changes to the text of the manual to accompany the above changes.
4) The Uwatec Galileo image is re-inserted in the icons folder. Somewhere
   it got lost.

Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-21 08:36:03 -07:00
Dirk Hohndel
01a185979e Out of tree cross build for Windows
This way I can have a different directory from where I build Windows
binary without interfering with my native build in the source directory.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-19 11:46:50 -07:00
Dirk Hohndel
1b070de1aa More translations
I am not the author of these changes, just pulling them from Transifex.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-19 11:42:22 -07:00
Gehad
3a8620e68c Change the default font on Windows to Calibri
Changing the default font on Windows to Calibri instead of Sans to fix the
subscript issue.

Fixes #461

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-19 11:40:36 -07:00
Dirk Hohndel
e05c9e3716 More translations
I am not the author, just pulling them from Transifex.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-18 13:29:07 -07:00
Dirk Hohndel
d191f5af6f Remove unused variables and fix signed/unsigned mismatch
The depth types are unsigned for dive plan datapoints.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-18 13:06:21 -07:00
Dirk Hohndel
72be8260b4 Update translations
I am not the author of all these changes, just pulling them from
Transifex.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-18 12:48:16 -07:00
Dirk Hohndel
0a018f30de Fix crash when manually adding a dive
When a manually added dive is saved we cancel the plan. In that process
we throw away the cylinders which triggers a redraw of the profile. Which
tries to access the diveplan and its data points that have already been
freed. BOOM.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-18 10:21:58 -07:00
Robert C. Helling
cb4daa85c3 Comments added to planner
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-18 10:01:46 -07:00
Lakshman
e871169e4c Fixed mismatched connections
Fixed connections to call drawProfile() in diveplanner whenever cylinder
table widget is edited.

Signed-off-by: Lakshman Anumolu <acrlakshman@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-17 22:39:36 -07:00
Yosef Hamza
3027701a14 Correctly edit air/water temp in dive struct
When changing the values of air/water temp after the first time and save,
it will be reset the intial value.
This is fixed by removing the "select_dc" (which makes the change to the
dive struct instead).

Fixes #457

Signed-off-by: Yousef Hamza <jo.adama.93@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-17 17:51:22 -07:00
Tomaz Canabrava
55d010bad8 Moved code around to make possible to compile the C part alone.
The C code should be compilable without the need to compile the Gui part,
too. This is expecially good for unit testing as we can test all the
algorithms without a window appearing out of nowhere.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-17 08:46:29 -07:00
Tomaz Canabrava
9598462830 Removed the globals 'userid' and 'save_userid_local' variables
This is a preferences setting, it should belong to the preferences
structure.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-17 08:37:31 -07:00
Tomaz Canabrava
f14c14c383 Mark a lot of TODO's where I think it should be moved to C code.
This marks a lot of todo's where I think there's core stuff being mangled
on the interface - we should remove this from the interface to make
testing and maintenability easier.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-17 08:33:51 -07:00
Dirk Hohndel
1a1cbc296b Quick whitespace cleanup
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-17 08:06:11 -07:00
Robert Helling
9ddef367b5 Improvement for various bits of the planner
Rewrite of the actual planner logic. Now ascend to the next potential stop
depth. There the state is cached and we try to ascend to the next stop
depth. If we hit the ceiling while doing that we go back to the cached
state and wait there for a minute. Then we try again. Then loop.

Converted all depth related variables from unsigned int to int. During
planning, in a time step the current depth can temporarily be negative and
comparisons of a negative int with an unsigned it have not the result I
expected ( (int) -2 < (unsigned int) 3 turns out to be false). And we
don’t really need the 32nd bit that unsigned buys us for depths.

Deco stops are now shown in the same table as manually entered stops in
boldface (I removed the second table to save screen estate).

The gas shown in the table is still misleading as it means the gas used on
the segment leading up to that event.

The update of the profile only works partially upon changes in the list of
available gases.

Treatment of various gases is basically there but needs some more love.

The ascent velocity is now provided by a function that takes the current
depth as argument. Currently it always returns 10m/min but that will later
be variable (and hopefully user configurable).

The profile is not redrawn while deco is computed (avoiding an infinite
recursion).

The table got a new column for the duration of a segment while the old
“duration” column was renamed “Runtime” to reflect what it actually shows.
Currently, only the run time but not the duration are editable.

All deco gases are used from the depth where their pO2 is 1.4bar. This
should become more flexible.

Calculation of the pressure drop in cylinders without configured volumes
is suppressed. This solves a problem with the planner crashing when saving
a dive where not all cylinders had been manually given a volume.

[Short rant break: Treating 0/0 as air bites back at so many places. E.g.
Cylinder data is initialized with memsetting the whole structures to 0.
Then later suddenly this totally unconfigured cylinder is being treated as
it would contain air. Maybe at some point this was a feature. But it lead
to a naughty bug which took me over an hour to resolve. We should
seriously reconsider this choice and better move to 209/0 being air if
changing this everywhere is not too much trouble]

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-17 07:29:44 -07:00
Gehad Elrobey
8380f09619 Renaming the prefs struct members to be consistent with the QSettings.
-Renaming prefs members for consistency.
-Changing references of QSettings to the prefs structure instead.
-Removing unused functions in pref.h were left over from an old version.
-Changing the data-type of bool members to short for consistency with other members.

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-16 13:09:55 -07:00
Andrey Zhdanov
4bd4c01108 UI adjustments in Print Dialog Window
- move buttons to the bottom of the window
- use QDialogButtonBox that allows to follow platform-dependent button layout
- enlarge window size to not to crop content
- change "Close" button action from "accept" to "reject"

Signed-off-by: Andrey Zhdanov <andrjufka@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-16 12:17:49 -07:00
Willem Ferguson
1b6d4f55df Use Luisa's new icons
Move the heart rate graph icon up in the toolbox with the cluster of
buttons that control graphs

Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-16 12:10:41 -07:00
Luisa Pires
a8aa3a2f00 New icons
- Replace the current text-based heart rate icon
- Replace the DC-reported ceiling icon

Signed-off-by: Luisa Pires <luisapiresdesign@gmail.com>
Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-16 12:10:28 -07:00
Lakshman
c6295b77fa Test cases for unit conversion
Added more test cases for unit conversion

Signed-off-by: Lakshman Anumolu <acrlakshman@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-16 08:36:38 -07:00
Miika Turkia
54af66bdb3 Information on writing test cases
This information is mainly from Tomaz on IRC with references added to Qt
documentation on the subject.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-15 11:03:38 -07:00
Lakshman
2e80d79396 Corrections to unit tests
Make the initial unit tests actually pass

Signed-off-by: Lakshman Anumolu <acrlakshman@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-15 09:57:28 -07:00
Dirk Hohndel
f7a327077b Simplify code
This seems like a rather obvious optimization...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-14 23:21:09 -07:00
Dirk Hohndel
e5967dd193 Make red ceiling work
The existing code for toggling the DC reported ceiling in red or "surface
color" clearly had never been tested.

This seems to create a reasonably attractive implementation - not exactly
what we had in the past, but good enough.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-14 22:52:22 -07:00
Linus Torvalds
a3aacfc6c2 git-save: improve commit authorship data
We used to always just commit as "subsurface@hohndel.org" because
libgit-19 doesn't have the interfaces to do user name lookup.  This does
better if you have libgit-20, using "git_signature_default()" to get the
actual user that does the saving.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-14 16:07:59 -07:00
Tomaz Canabrava
7e1d8724c5 Add the option to specify the LIBDCDEVEL path.
Use cmake .. -DLIBDCDEVEL="../your/library" to specify
where the libdc is, or leave it blank if you have it
installed on the system. you can change the location later
by running ccmake.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-14 14:49:45 -07:00
Tomaz Canabrava
7b60f96734 Use a list of files instead of filtering for *.c
While filtering for *.c / *.cpp is much smaller, it has the
disvantage of getting garbage on some computers as the devs
tends to create test files around.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-14 14:35:38 -07:00