Commit graph

290 commits

Author SHA1 Message Date
Martin Měřinský
9c2619ea3b For About UI window layout, use SetFixedSize.
Window is resized according to its content.
There is no need for user to resize this window.
2017-03-07 21:45:05 -08:00
Stefan Fuchs
e34e2693ea Enable bottom pO2 option also for recreational dives in planner
Bottom pO2 gas option in planner should be always enabled because
also recreational dives can use nitrox and produce "high pO2" warnings.

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-03-07 16:21:28 -08:00
Lubomir I. Ivanov
e8c918622f Printing: support the "Border width" setting for templates
Going to "Template -> Edit" now has a field to enter the
border width (in pixels as only that makes sense in CSS as a flexible
unit, TMK).

This field modifies the template_options.borderwidth Grantlee
property which is part of the bundled templates already
and allows the users to modify the borders of tables.

The C++ implementation was missing, while the HTML (template)
implementation was already in place. Overlooked during GSoC.

Reported-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-03-06 20:08:39 -08:00
Martin Měřinský
831fe3d7f9 fix: User survey UI.
Enable window resize (Lay Out in a Grid).
Center first label and it's text.
2017-03-06 06:40:00 -08:00
Dirk Hohndel
d36f056bde Get initial depth/duration correct when manually adding dive
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-03-04 12:16:49 -08:00
Dirk Hohndel
b60b7c108e Enable manual setting of duration
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-03-04 12:16:49 -08:00
Dirk Hohndel
03eef5b0c2 Implement manual setting of depth
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-03-04 12:16:49 -08:00
Dirk Hohndel
74b542ee60 Initial response to entering duration or depth
This marks the UI as modified and updates the maxdepth of the dive; it
ignores changes to the duration, doesn't modify the profile, so it's
nowhere near ready.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-03-04 12:16:49 -08:00
Dirk Hohndel
ba570c9eea For manually added dives, show depth and duration
So far this is purely informational, you can't edit this.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-03-04 12:16:49 -08:00
Dirk Hohndel
05b53d6204 Add depth and duration fields to maintab
And hide them for now. This doesn't change anything visible, it's just
putting in place the pieces for later use.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-03-04 12:16:49 -08:00
Martin Měřinský
59d18a00db divecomputer > dive computer 2017-03-04 12:08:17 -08:00
Martin Měřinský
67bba5d1c2 cu ft > cuft 2017-03-04 12:08:17 -08:00
Martin Měřinský
46e956aede ppO2 > pO₂ 2017-03-04 12:08:17 -08:00
Stefan Fuchs
7eda24d6b1 Correct "set-point" -> "setpoint" and window title setpoint change
Change 2x "set-point" to "setpoint".
Correct window title for "Add setpoint change" window.

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-03-04 12:04:20 -08:00
Jan Mulder
0f56a1e4bf Add 4 file types op file-open logbook menu filter, consistency
4 file types (that are very rarely used), did showup in the
import-import dive logs menu (e.g. the file filter), but were
missing from file-open logbook file type filter.

Just added them to the file-open part to be more consistent.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-02-25 09:18:53 -08:00
Jan Mulder
7165cb473a Correct file list in file-open filter box
Some missing ;; caused the filter on filetypes in open-open logbook to be garbled.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-02-25 09:18:53 -08:00
Dirk Hohndel
5b8bde8e1e Bring back style sheet HTML for planner output
This is a partial revert of commit 4f2a7dc972 ("Remove default
stylesheet from planner output").

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-24 01:06:09 -08:00
Robert C. Helling
0b770b1379 Menu keyboard shortcuts in translations
It seems that in the .ui file, keyboard shortcut strings need
the  notr="true" attribute to make them appear also in translations.

I found this on http://www.qtcentre.org/threads/62774-Translation-of-Shortcuts

Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-02-23 03:13:00 -08:00
Stefan Fuchs
b39b641a05 Translate names of additional dive events and nicer format info box text
Enable translation for a few additional internal dive events.
Ensure that all event names in datatrak.c are collected for translation.
Ensure that for gaschange in profile info box the "cyl." string is also translated.

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-02-21 13:11:19 -08:00
Jan Mulder
5c89115efe Fixes cylinder table headers not translated
The cylinder table was constructed very ealy from the contructor of the
planner, so early that the tr() functions are not registered. This fix
instantiates the cylinderModel from the maintab (as it is done
with, for example, the weightsModel) and lets the planner user
this instantiated (and proper translating) cylinderModel.

Fixes: #206

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-02-21 07:28:15 -08:00
Martin Měřinský
74b1f7ac5e facebook > Facebook 2017-02-21 07:03:10 -08:00
Martin Měřinský
e7467a43eb Remove space from the beginning of the line. 2017-02-21 07:03:10 -08:00
Martin Měřinský
f5a1a3e00a missing dot 2017-02-21 07:03:10 -08:00
Stefan Fuchs
4f2a7dc972 Remove default stylesheet from planner output
Remove the default stylesheet ("Courier" 13pt) from the planner output QTextEdit.
Remove the content of the html property of the QTextEdit because we overwrite it when doing setHtml.
After printing copy the original dive notes string displayed_dive.notes back to the QTextEdit

Advantages:
Display is according to font settings.
ctrl - mousewheel for zoom always works.
Drawbacks:
Printing font is same as display font but can be adjusted by zooming before.

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-02-20 09:42:29 -08:00
Dirk Hohndel
d5ecc96ed6 About dialog: hook up Credits button 2017-02-18 16:22:39 -08:00
Dirk Hohndel
53d0eecb94 About dialog: add Credits button
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-18 13:51:40 -08:00
Miika Turkia
4375a87598 Include geolocation info on export XML (divelogs.de)
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2017-02-18 10:48:33 -08:00
Anton Lundin
78059d4010 Update altitude limits on unit change
The limits set in diveplanner.ui is intended for the unit set there,
meters. If we move between units we need to update the limits to.

This fixes #201

Signed-off-by: Anton Lundin <glance@acc.umu.se>
2017-02-14 07:29:52 -08:00
Dirk Hohndel
08c42813e5 Revert "In statistics, ignore gas use of planned dives"
This reverts commit 1d8662006c.

Mistakenly pushed to master

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-03 07:31:03 -08:00
Robert C. Helling
1d8662006c In statistics, ignore gas use of planned dives
When merged with real dives, those would double count otherwise.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-02-02 12:37:24 -08:00
Joakim Bygdell
b0ec7146a0 Ignore double clicks on the divelist
Fixes #170 on GitHub

Simple catch function for double click events in the divelist,
prevents users from trying to edit the divenumber ithe wrong way.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-01-28 07:20:03 -08:00
Robert C. Helling
dbf1390094 Only set surface pressure when it has a value
When replanning a dive, do not set the surface pressure when it is 0.
Same for salinity.

This closes #161 .

Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-01-18 06:50:01 -08:00
Anton Lundin
4714f50eae Notify Ostc 4 users about new firmwares
This adds support for notifying Ostc 4 users about new firmwares when
they download dives from their computers, gives them the option to
trigger the upgrade flow.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
2017-01-12 14:15:53 -08:00
Anton Lundin
a5232a30b0 Document potential bug source
Signed-off-by: Anton Lundin <glance@acc.umu.se>
2017-01-12 14:15:53 -08:00
Robert C. Helling
f3cf9525de Images from web currently only works for single pictures
so we should not suggest otherwise by plural form.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-01-12 14:06:54 -08:00
Robert C. Helling
db17adfb28 Make the URL dialog contain QLineEdit
as otherwise pressing RETURN does unexpected things.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-01-12 14:06:54 -08:00
Robert C. Helling
0f58510ce0 Provide an error message when downloadig image from web fails.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-01-11 05:43:14 -08:00
Robert C. Helling
935734100f Rename prefs.deco_mode to prefs.planner_deco_mode
This is to avoid confusion with planner.display_deco_mode.
When accessing the "current deco mode" use the decoMode()
helper function.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-01-06 20:43:23 -08:00
Dirk Hohndel
b2cc840ebf Facebook integration: change the menu entry to disconnect
This way the menu entry becomes the togglee it appears it was designed to be in
the first place.

This closes #129

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-01-01 22:24:48 -08:00
Dirk Hohndel
a63505dde9 Facebook integration: actually call the disconnect callback
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-01-01 22:21:47 -08:00
Dirk Hohndel
7e98016832 Facebook integration: whitespace cleanup
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-01-01 22:20:28 -08:00
Dirk Hohndel
c39fbea0ee Facebook integration: keep the connections QMenu around
This way we can change the text, later.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-01-01 22:19:08 -08:00
Henrik Brautaset Aronsen
ba23989e6b Update from 2016 to 2017. Happy new year!
Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-01-01 10:28:25 -08:00
Dirk Hohndel
f9d9e0324d Mac: more generous margins for table columns
Fixes #974
Fixes #873

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-01-01 14:23:49 +02:00
Miika Turkia
8766054581 Hooking up av1.xslt for log import
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2016-12-31 09:56:08 +02:00
Robert C. Helling
529a4d499b Start transition from QWebKit to QWebEngine
This removes all references to WebKit if cmake option USE_WEBKIT is enabled.
For the user manual it changes it to WebEngine (seems to work for me).

Similar for the Facebook connection (minus a reference to a cookie jar).
This I could not test at the moment, as I wrote this on a train.

Printing does not work, it is a null operation at the moment. Currently,
large parts of of the printing code are commented out as there is no direct
way to access page elements in WebEngine. It seems this needs to be done
via Javascript (with a callback invoked). There is new functionality in
WebEngine to render a view to a PDF file but this needs more work (and
probably some thoughts towards page breaks).

Signed-off-by: Robert C. Helling <helling@atdotde.de>
2016-12-30 19:43:00 +01:00
Anton Lundin
b511eb104a Document quirks with Ostc 4 versions
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-12-28 22:40:18 -08:00
Anton Lundin
e5fd59feca Notify all OSTC users about bluetooth prep
Use more general wording about bluetooth preparations, because nowadays
there are more computers than the Ostc Sport which use bluetooth.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-12-28 22:40:18 -08:00
Anton Lundin
edce764686 Check for firmware updates on new devices to
The list of OSTC devices have grown, and this updates our lists of for
which devices we should check for firmware updates.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-12-28 22:40:18 -08:00
Dirk Hohndel
754112beb4 Renumber ui: make it obvious which dives get renumbered
Using the menu entry or Ctrl-R is designed to renumber all dives, but
using the context menu renumbers only the selected dives. With this
change it becomes more obvious to the user what's happening.

Fixes #942

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-12-27 13:10:18 -08:00