Commit graph

3579 commits

Author SHA1 Message Date
Dirk Hohndel
44510f990b Location completer: show taxonomy according to preferences
The user has picked their preferences of which taxonomy data they want to
see. Show them what they asked for.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-14 11:53:05 -07:00
Dirk Hohndel
8c0d0de2e6 Location completer: give distance if known
If both the displayed dive and the dive site which is shown as a potential
completion have a GPS fix, indicate the distance.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-14 11:52:17 -07:00
Claudiu Olteanu
94d3aa04dc Wait until the BT scanning process is done on Android platforms
Block the Save button on Android platforms until the scanning
for remote Bluetooth devices is finished.

The reason we do that is because there is a bug on the
Android platform or on the QtBluetooth library which stops the
downloading process and blocks the devices on the Download mode.

Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-13 15:21:30 -07:00
Miika Turkia
212cc575bf Divinglog import: add .sql extension for import
Generic divelog might come with the .sql extension, thus adding that to
the file filter.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-12 13:58:16 -07:00
Dirk Hohndel
93d348fa59 Globe: Remove workarounds for ancient Marble versions
We build against our own Marble, anyway. So this isn't needed anymore.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-12 09:30:45 -07:00
Dirk Hohndel
d8ca046265 Don't show the update messages in the mobile app
Android provides update notifications already.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-10 13:28:28 -07:00
Anton Lundin
e16b116297 Teach divemode editing about multiple dc's
This teaches the edit divemode about the fact that we can have multiple
dc's with different divemodes. The previous code always just edited the
first dc.

This was reported by Ian Pitt in:
https://groups.google.com/forum/#!category-topic/subsurface-divelog/4Zf47KS4Ifk

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-09 06:29:59 -07:00
Dirk Hohndel
83e5e4933f Globe: another attempt to fix the globe zoom
The fact that Marble doesn't tell us when it's done flying to the next
point is making this excessively complicated to get right.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-08 13:45:24 -07:00
Tomaz Canabrava
127f3b7da1 Use current dive site to get the information
and not the displayed_dive_site. tsc.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-08 08:08:46 -07:00
Joakim Bygdell
bea24edc29 Planner: redo the spacing of the prefs
Divide the space eaqually to all three settings panels.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-08 08:02:04 -07:00
Tomaz Canabrava
7bc11f3044 Correctly paint the states
The state handling is a pain to do manually, but I can't really
use the style painter because if I do that it would paint the
string of the model (and that's something I don't wanna do)
so I clear the text, draw the control, then I paint the stuff
that I really need.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-08 07:50:43 -07:00
Tomaz Canabrava
2f9e859615 Use taxonomy or coords on the delegate
The Taxonomy text should be used if there's a taxonomy
for the dive site. If there isn't, then use coords. If
there's none, then nothing will appear on the bottom
of the dive site name.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-08 07:50:09 -07:00
Tomaz Canabrava
967bd68e64 Better spacing on the delegate
Makes the location delegate pleasant to the eye.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-08 07:49:49 -07:00
Tomaz Canabrava
eff22c28db Show the correct delegate on the completer
For some reason the completer wouldn't show the delegate if the line order
of the code was different.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-08 07:49:29 -07:00
Joakim Bygdell
d6582aa095 Rename generic QT labels
Some QT objects in the planner ui files had generic label names.
Give them proper names so we can see where they belong.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-08 06:37:03 -07:00
Joakim Bygdell
543ffcda32 Planner: move notes options under gas options
The notes optiopns are rather few, if we move them under the gas options
we can save a bit of hirizontal space.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-08 06:33:29 -07:00
Joakim Bygdell
97e70a9c0e Planner: fix tab stop order
Fixes the tab stop order on the planner settings page.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-07 12:23:27 -07:00
Joakim Bygdell
68ceb75294 Planner: disable unrelated planner settings
When VPM-B is the choosen deco algorithm changing,
GF low and high have no effect. So lets disable them similar to what we do
for recreational mode.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-07 11:49:16 -07:00
Joakim Bygdell
19648e28cc Planner: GUI changes for improved clarity
Restructure planner GUI for improved clarity of how settings are related.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-07 11:49:10 -07:00
Dirk Hohndel
9039785dc9 Make things compile under Qt5.5
This declaration already exists in a Qt5.5 header file.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-06 22:17:38 -07:00
Dirk Hohndel
b1538c809d Code cleanup
Make precedence of && over || explicit.
Explicitly convert between char * and unsigned char *.
Don't assign potentially negative return code to an unsigend variable.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-06 13:59:14 -07:00
Dirk Hohndel
cf047466b5 Cmake: make Facebook support an actual option
This way we can selectively turn off Facebook support.

And turning off both Facebook support and support for the user manual
allows us to not rely on QWebKit which once again allows debugging
Subsurface with valgrind on Arch Linux.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-06 12:11:07 -07:00
Dirk Hohndel
6ebeba3c7c Be more careful freeing taxonomy data
We want to only access data that we consider valid. And we need to clear
out pointers to freed memory.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-06 12:09:20 -07:00
Claudiu Olteanu
dff4e5f33e Add a dialog for remote Bluetooth devices selection
Implement a dialog which can be used for remote Bluetooth devices
selection and to control the local Bluetooth device.
Functionalities of the widget:
 - expose information about the local BT device
 - scan for remote BT devices
 - pair/unpair with a remote BT device
 - turn on/off the local BT device
 - logging
 - save the selected BT device

The selection dialog is created when the bluetoothMode checkbox
is enabled.

Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-06 08:36:42 -07:00
Claudiu Olteanu
b4c4d95ea4 Add a checkbox and a button for Bluetooth download mode
The checkbox will be used to enable the Bluetooth
downloading mode. The button will be used to create
a dialog selection where the user will be able to
scan and select remote devices.

Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-06 08:34:39 -07:00
Robert C. Helling
e864c365c7 Correct logic
At least my compiler warns about ! binding stronger than == and
thus comparing a bool to an int. I guess this is what was meant.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-05 15:54:20 -07:00
Dirk Hohndel
9c6a3a7ff3 Merge branch 'custom-print' of github.com:neolit123/subsurface 2015-07-05 12:01:43 -07:00
Gehad elrobey
cc53dc7acf Printing: implement QPlainTextEdit in TemplateEdit
This is the main area to edit the templates inside Subsurface.
Whenever the user edits a template the edited template is saved in
custom.html and custom.html is considered the selected printing
template.

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-07-05 21:03:12 +03:00
Gehad elrobey
c44496e23d Printing: move template_options to print_options.h
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-07-05 21:03:04 +03:00
Gehad elrobey
a70cea95e8 Printing: refactor the print options class
-Remove unneeded parameter to member variable
-Check if template_options struct is valid

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-07-05 21:02:49 +03:00
Gehad elrobey
c35092f5c9 Printing: add custom options to the PrintDialog
Add:
-custom.html template
-custom template to print_options struct
-options to the options dialog

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-07-05 21:02:09 +03:00
Gehad elrobey
bc80fc8849 Printing: pass the template_options struct to TemplateLayout
The template_options struct needs to be passed to TemplateLayout
constructor.

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-07-05 21:00:40 +03:00
Gehad elrobey
71561e720d Printing: add QSettings for TemplateEdit class
TemplateOptions struct must be saved to QSettings after the window
is closed, also it must be recalled when initializing the window.

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-07-05 21:00:28 +03:00
Gehad elrobey
a600ea5201 Printing: add template_options struct that contains template
The template_options struct holds the settings variables in the code.

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-07-05 21:00:25 +03:00
Gehad elrobey
ff594c65e3 Printing: call TemplateEdit when edit is triggered
Edit button should open TemplateEdit dialog.

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-07-05 21:00:20 +03:00
Gehad elrobey
963e09ad7b Printing: add TemplateEdit form to source tree
The TemplateEdit class works to customize the tempalate before printing,
User can select the font-size, font-type, color-palette, linespacing
and editing the template HTML code.

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-07-05 20:59:55 +03:00
Gehad elrobey
ce3d2abd83 Printing: show warning message for WIP features
Show warning message before proceeding to print 'Table' or
'Statistics' print layout. This should be used during the
development phase only.

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-07-05 20:59:34 +03:00
Gehad elrobey
bc0b443afd Printing: add QPrintPreviewDialog to main dialog
Add preview dialog that shows the printer contents before printing.

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-07-05 20:58:16 +03:00
Jan Darowski
500fbe4994 VPM-B: add deco choice to the ui.
Removed recreational mode from ui and pref and replaced it with
new deco_mode enum.
Added radio button ui selection.
Set default deco_mode to Buehlmann algorithm.

Signed-off-by: Jan Darowski <jan.darowski@gmail.com>
2015-07-03 23:07:58 +02:00
Dirk Hohndel
898d82e647 Notes pane: don't show empty taxonomy tags
No point in searching for the right tag if the user picked no taxonomy to
be shown. And no point in showing an empty value, either.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-02 10:23:16 -07:00
Dirk Hohndel
bc8c54f1ee Rename enum values for taxonomy
This avoids confusion and namespace collisions.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-02 10:22:31 -07:00
Dirk Hohndel
f554c2d16c Merge branch 'taxonomy' 2015-07-02 07:03:03 -07:00
Dirk Hohndel
0a0a6f07d5 Remove a few more debug messages
Yes, I could go back and try to fix the earlier commits.
This is easier.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-02 06:59:08 -07:00
Dirk Hohndel
d966fd2606 Trigger reverse geo lookup by pressing the button
This may not be the best UI, but for now it works.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-02 06:50:50 -07:00
Dirk Hohndel
baf68868f5 Notes pane: add geo code button
This still needs to be hooked up.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-02 06:50:50 -07:00
Dirk Hohndel
92722adeba Notes pane: don't show taxonomy info for trip location
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-02 06:50:50 -07:00
Dirk Hohndel
c3e38b6da3 Notes pane: once again fix the layout
It seems nearly impossible to keep all these margins consistent.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-02 06:50:50 -07:00
Dirk Hohndel
80f26912b0 Notes pane: move the location taxonomy to a better spot
And display it smaller, marked as "tags".

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-02 06:50:50 -07:00
Tomaz Canabrava
4059f5d995 Correctly display the data on the delegate
A bit more complex than I tought it would be (and a ton of trial
and error to find the right spot on the delegate to draw stuff)
this delegate follows the current style (so it should be okaish
on a dark and on a light theme)

This is supposed to work on a QCompleter, but it doesn't (I really don't
know why, so maybe I'll remove that completer. sigh.)

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-01 19:25:14 -07:00
Tomaz Canabrava
3b0936eca3 Create a delegate to display custom data
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-01 19:24:52 -07:00