Commit graph

13107 commits

Author SHA1 Message Date
Dirk Hohndel
3ee91dd06a Add Heinrichs Weikamp BLE dive computers for iOS
Not all OSTC 2, 3, and Sport support BLE, but newer models do.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-12-02 12:30:54 -08:00
Stefan Fuchs
de26a50ba3 In planner variations use variables for delta values
Plus a small layout change: Add a colon behind "Stop time".

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-12-02 20:48:02 +01:00
Stefan Fuchs
1bd2f3fe3e Planner variations stop time calculation cover all stops
Simplify the sum up of the deco stop times for analysis of
the planner variations.

Plus rename define for deco stop variations debug output

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-12-02 20:48:02 +01:00
Murillo Bernardes
8f3ac0402c iOS: check for UUID instead of physical address
on iOS the address we display on Connection is an UUID, not
a physical address.

This change the pattern (on iOS) used to enable bluetooth_mode.

Signed-off-by: Murillo Bernardes <mfbernardes@gmail.com>
2017-12-02 08:21:33 -08:00
Murillo Bernardes
5bd90821d0 iOS: save BT DeviceInfo on discovery
On iOS save all discovered devices. Later qt_ble_open queries this
list in order to actually connect to the remove device.

The Desktop code stores this data with the list items and only saves
when the "Save" button is clicked. This is not supported with the
current ConnectionListModel implementation.

Signed-off-by: Murillo Bernardes <mfbernardes@gmail.com>
2017-12-02 08:21:33 -08:00
Berthold Stoeger
137e83f7f2 Fix file:// handling for git access.
Currently, in is_remote_git_repository(), git URLs of the form
"file://..." are recognized as local and the "file://" prefix is
removed. The shortened URL is then processed as if it was a remote
URL, which of course has to fail. So far so good - this is not
a remote repository after all. But the removal of the prefix is
not propagated to the calling is_git_repository() function and
handling as a local git repository therefore fails likewise.

To fix this issue, move removal of the "file://" prefix one level
up to the is_git_repository() function.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2017-12-02 08:18:42 -08:00
Berthold Stoeger
136110784e On failed cloud save hide progress bar
The progressbar was not hidden on failed save to cloud. In return
remove an unnecessary variable on loading from cloud.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2017-12-01 16:39:58 -08:00
Robert C. Helling
c38e0f225f Remove unnecessary #include and correct whitespace
Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-12-01 15:47:51 -08:00
Robert C. Helling
511ee9ddeb Change #include line to make Linux builds happy
Let's see if this helps the Linux build on TravisCI.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-12-01 15:47:51 -08:00
Robert C. Helling
d8350ef238 Document background computation of variations
Update changelog, update user manual, clarify
meaning in dive notes.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-12-01 15:47:51 -08:00
Robert C. Helling
4d605ce51f Prevent redundant replanning
Planning dives is heavy on CPU, so better be sure we only
do it when needed. In particular, when moving around dive
points, we only want a new plan once per move and not three
times (triggered at various points in the chain of events).

This should significantly improve planner snappiness.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-12-01 15:47:51 -08:00
Robert C. Helling
e06b507230 Control growth of time axis
While dragging waypoints around, don't grow the time axis according
to dive duration (including deco stops) as this can explode too
easly resulting in an effectively unresponsive planner. Rather
grow it only (slowly) when a dive handler is moved to the right
10% of the profile.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-12-01 15:47:51 -08:00
Rick Walsh
1985bcb29e Disable plan variation in recreational mode
Calculating variations when in recreational mode doesn't make sense, and can
prevent variations from being calculated when switching back to Buhlmann or
VPM-B modes.

Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
2017-12-01 15:47:51 -08:00
Robert C. Helling
41b4e4a19a Add imperial units to variations computation
Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-12-01 15:47:51 -08:00
Robert C. Helling
0839342d33 Don't block profile updates in variations computation
We needed to prevent updates when we messed with the
diveplannerpointsmodel as those would trigger
starting planning from scratch causing infinite loops.

Now, the variations calculation operates on a copy of
the diveplan, so the model is no longer involved and
we should not block recalculations (as those might be
triggered by the UI).

Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-12-01 15:47:51 -08:00
Stefan Fuchs
f6b00fb3dd Round up diveplan duration the same way values in diveplan are rounded
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-12-01 15:47:51 -08:00
Robert C. Helling
1e678d52b2 Make background calculation optional
Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-12-01 15:47:51 -08:00
Robert C. Helling
a9703628c4 Actually compute variations in background
This reenables the computation of plan variations but now in a separate
thread. Once finieshed, a signal is sent to update the notes.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-12-01 15:47:51 -08:00
Robert C. Helling
f159792b80 Cut off excessive deco times
before we run out of memory. Diving deep with air and small GFhigh
can cause those (try GF 30/70 at 75m with 25+min bottom time)

Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-12-01 15:47:51 -08:00
Dirk Hohndel
c8c580e9c8 Latest translations
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-12-01 14:58:59 -08:00
Dirk Hohndel
afbeccca21 desktop-widgets isn't built for mobile
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-12-01 13:29:13 -08:00
Stefan Fuchs
1b7ee876ac Dive picture widget: Allow pictures to use available space on resize
Small change to allow the dive pictures list to use the available
space if one resizes the window or switches to different mainwindow
view.

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-12-01 09:44:34 +01:00
Stefan Fuchs
1f49608ce8 Dive picture drag&drop decrease size of pixmaps
Decrease the size of the pixmaps during drag&drop to the final
unzoomed size in the profile widget.

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-12-01 09:44:34 +01:00
Stefan Fuchs
fb008120e1 Use correct selection mode for dive picture view
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-12-01 09:44:34 +01:00
Stefan Fuchs
a1e6ac2e09 Dive picture handling: Re enable multi select, improve mouse events
Some improvements for the dive picture tab and dive pictures in profile:
- Bugfix mouse event in profile: Only Left-click will open picture
- Bugfix mouse events in picture tab:
  - Re-enable context menu (Windows bug mainly)
  - Re-enable multi select in a nice way
  - Only double-left-click will open picture

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-12-01 09:44:34 +01:00
Martin Měřinský
8ef87e618a Use better aliases for icons.
Icon aliases were complete mess.
Some icons had alias some didn't.
Named with underscores vs. hyphens vs. camelCase.
Lower vs. upper case.
"ICON" prefix vs. suffix vs. nothing.
With vs. without filename suffix.
Some didn't make sence. Eg. mapwidget-marker-gray
(I can see, it's grey, but what does it represent?)
Some were duplicated, eg warning vs. warning-icon.
Some were name after widget, which is wrong.

Do not reinvent wheel. Use widely used naming scheme
close to Freedesktop Icon Naming Specification. This
will enable usage of common icons from current set in
the future. Thus Subsurface will fit nicely to GUI.

This changes icon aliases to one, easy grep-able style.

Signed-off-by: Martin Měřinský <mermar@centrum.cz>
2017-11-30 23:14:46 -08:00
Martin Měřinský
0855f6f315 Use icons relative path.
Icon paths are defined in one place only - application's embedded resources.

Signed-off-by: Martin Měřinský <mermar@centrum.cz>
2017-11-30 23:14:46 -08:00
Dirk Hohndel
9cc0d04048 Update translation source strings
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-11-30 20:19:25 -08:00
Stefan Fuchs
4ee9791cb8 Fix views in mainwindow
Divelist only view was broken.

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-12-01 04:03:30 +01:00
Stefan Fuchs
0fc4bd8976 Disable specific tabs when dive trip selected
Disable tabs for equipment, info, pictures and extra info if a
dive trip is selected.

Remember specific tab selection for dives and dive trip to recover
selection when browsing dive list.

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-12-01 03:45:59 +01:00
Stefan Fuchs
ba83ce34e0 In maintab fix change of text between "notes" and "trip notes"
Old code was not functional.

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-12-01 03:45:59 +01:00
Berthold Stoeger
f8a200dbce Don't use action tooltip to access recently used file
Currently, the path to the recently used file is stored in the tooltip
of the corresponding recent file action. Instead, store the number
of the recent file in the action. This allows for more flexibility
concerning formating of the tooltips (think git repositories, etc.).

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2017-12-01 03:39:10 +01:00
Berthold Stoeger
4296ca11a6 Dynamically generate recent files actions
Instead of using four recent files actions defined in mainwindow.ui,
generate these actions dynamically depending on the macro NUM_RECENT_FILES.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2017-12-01 03:39:10 +01:00
Berthold Stoeger
1208bc8428 Remove "#if !defined(SUBSURFACE_MOBILE)" in mainwindow.cpp
The file mainwindow.cpp is only compiled for desktop versions, so the
condition is redundant.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2017-11-30 16:52:22 +01:00
Berthold Stoeger
8b9c63b2d8 Move creation of QSession object into MainWindow::checkSurvey()
Instead of handing the QSession object down, simply create it in
MainWindow::checkSurvey()

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2017-11-30 16:52:22 +01:00
Berthold Stoeger
135ea00d88 implify recent file handling in mainwindow.cpp
The old code used to be unnecessarily complex: the recent files list
was extended for each file and shrunk if a load failed.

By adding a file to the recent file list only if the load succeeded, a
whole method could be removed.

Other changes: keep track of the recent files using a QStringList and
clearly separate the actions:
 - Read recent files from settings [loadRecentFiles()]
 - Write recent files to settings [updateRecentFiles()]
 - Update the recent files actions in the menu [updateRecentFilesMenu()]
 - Add a file to the list of recent files [addRecentFile()]
With this reorganization the code hopefully became more clear.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2017-11-30 16:52:22 +01:00
Dirk Hohndel
625298a7b8 iOS build: add icon to launch screen
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-11-29 22:32:03 -08:00
Dirk Hohndel
87e05f4db8 iOS build: add option to build.sh to only update version
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-11-29 21:53:11 -08:00
Dirk Hohndel
31c005fa06 iOS build: enable BLE support in the code
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-11-29 21:52:09 -08:00
Dirk Hohndel
16607a66c4 iOS buils: new Launch xib
This still doesn't actually SHOW the logo...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-11-29 21:49:59 -08:00
Dirk Hohndel
38789f5a01 iOS build: add required explanation of BLE access permission
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-11-29 21:49:42 -08:00
Dirk Hohndel
c1bc77d086 iOS build: add iTunes artwork
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-11-29 21:49:01 -08:00
Dirk Hohndel
bca858a5d9 iOS build: call qmake in build.sh
This way we can avoid having to use Qt Creator (in preparation for
eventually testing the iOS build in Travis CI).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-11-29 21:48:15 -08:00
Dirk Hohndel
18d044d9dc iOS build: update icons
Latest xcode requires more and different(?) icons.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-11-29 14:56:39 -08:00
Dirk Hohndel
016b73872f iOS build: add a couple more imports to the build
The build process uses the dummy.qml file to determine which QML modules
to package. This ensures that Subsurface-mobile includes all its
dependencies.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-11-29 14:56:39 -08:00
Dirk Hohndel
252fc94c67 iOS build: use libgit2 0.26.0
Just like on all the other platforms.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-11-29 14:56:39 -08:00
Dirk Hohndel
6d5144451d iOS build: only use annotated tags for version
This avoids picking the continuous tag.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-11-29 14:56:39 -08:00
Dirk Hohndel
e8278becd2 Fix signed/unsigned issue
Also deal with an unused argument in the case of a Subsurface-mobile
build.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-11-29 14:56:39 -08:00
Dirk Hohndel
fd9c905ba3 Revert "Use icons relative path."
This reverts commit b0d98f6e26.
2017-11-29 14:05:07 -08:00
Dirk Hohndel
2747056889 Revert "Use consistent aliases for all icons."
This reverts commit 92e9c6606f.
2017-11-29 14:05:07 -08:00