Commit graph

8890 commits

Author SHA1 Message Date
Gehad elrobey
ebd83b15da Printing: make the actual data font width regular (not bold)
The actual data needs to be regular font not a bold font, so use <p>
instead of <h1> tag for the actual data fields.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
2015-08-15 15:02:48 +03:00
Gehad elrobey
5194401112 Printing: make default borders black
Make all borders black by default.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
2015-08-15 15:02:46 +03:00
Gehad elrobey
0fadfae754 Printing: replace dark and light colors
Make dark colors for headers while lighter colors for data fields, this
is more intuitive, and makes the palettes more appealing.

Make dark color default for cells2

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
2015-08-15 15:02:37 +03:00
Gehad elrobey
04fc07405a Printing: add color3 to templates and make it effective
Use the added color for 'Table cells 2'

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
2015-08-15 15:02:35 +03:00
Gehad elrobey
e0ecccfa7b Printing: fix color numbers in printing templates
After adding the additional 'Table Cells 2' color to the color palette
fix the colors assigned to each field.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
2015-08-15 15:02:33 +03:00
Gehad elrobey
1dbe10fe27 Printing: add another color in color palettes
Add another color 'Table cells 2' to the color palette, make all the
backgrounds solid white by default.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
2015-08-15 15:02:30 +03:00
Gehad elrobey
1a2f154cf4 Printing: add statistics print
Add statistics table print option.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
2015-08-15 15:02:28 +03:00
Gehad elrobey
f05e9c5c79 Printing: export more dive details with Grantlee backend
Add SAC, tags, used gas and dive rating to dive data fields exported
with Grantlee backend.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
2015-08-15 15:02:20 +03:00
Gehad elrobey
e2dcee55a3 Printing: use pageRect() to support old QT versions
While calculating the page size use QPrinter::pageRect instead of
QPrinter::pageLayout which is added in QT 5.3 and is not supported in
earlier versions.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
2015-08-15 15:02:17 +03:00
Gehad elrobey
11841563d2 Printing: add six dives per page template
Six dives per page templates makes good use of the page area, it can be
mainly used to produce a lightweight print outs.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
2015-08-15 15:02:15 +03:00
Gehad elrobey
9c13e7a071 Printing: enhance templates layout
Make better use of extra spaces, and decrease the margin sizes.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
2015-08-15 15:02:12 +03:00
Gehad elrobey
88c19adc78 Printing: hide warnings in dive profile while printing
While printing only draw headings, SP changes, gas events or bookmark
events, otherwise don't show anything.

Many warning logos can hide the useful information especially in
templates with small dive profile area.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
2015-08-15 15:02:10 +03:00
Tomaz Canabrava
0aafa2556e Remove title of the dive site tab edit
There's no need to show the 'dive site' name on the group box

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-15 05:02:07 -07:00
Gehad elrobey
8d0101bf3d Printing: templates should use colors defined in the color palette
Use the colors defined in the color palettes for all font, borders,
table sections and backgrounds of all templates.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
2015-08-15 15:02:07 +03:00
Gehad elrobey
1d22bdc08c Printing: fix TemplateEdit color selection bug
When choosing a color from the QColorDialog, the TemplateEdit trigger to
change the current selected template to be custom, and then changes the
selected color. When the selected template is changed old template
values are copied to the current template which results in incorrect
behaviour.

This is fixed by checking for the current editting state before setting
the saved palettes as the current used palette.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
2015-08-15 15:02:04 +03:00
Gehad elrobey
dd7bae378e Printing: fix wrong custom palette index
The custom palette index is defined by the CUSTOM directive, and it
should be used.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
2015-08-15 15:02:01 +03:00
Gehad elrobey
55f09f0106 Printing: don't save invalid colors
When QColorDialog is closed with 'Cancel' button, it returns invalid color
that must be discarded. So check if color is valid to prevent replacing
the current color with black.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
2015-08-15 15:01:58 +03:00
Tomaz Canabrava
86f61a6664 Minor code cleanup.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-15 05:01:33 -07:00
Tomaz Canabrava
b62cf45d59 Change colors of stars if widget has focus
Some widgets on the main tab don't show any kind of focus indicator on
some systems (like Mac), so it's a good thing to provide another way to
show that they indeed have focus.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-15 05:00:30 -07:00
Tomaz Canabrava
25273a3912 Remove obsolete comment
We don't allow building against Qt4 anymore.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-15 04:59:23 -07:00
Tomaz Canabrava
ed30059183 Add DiveSitePicturesModel
This model should be used inside the Edit Dive Site mode.
It should display all photos from all dives that are part
of this dive site, ignoring trips.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-15 04:59:01 -07:00
Jan Darowski
a3e87bf1a1 VPM-B: Fix trial_ascent() for vpm-b.
Previously, current depth was checked, instead of the depth after the move.

Signed-off-by: Jan Darowski <jan.darowski@gmail.com>
2015-08-15 13:45:42 +02:00
Lubomir I. Ivanov
342479586d Planner: use the heap for note buffers
The default stack size on Windows per thread is 1024kb.
Using the heap prevents a stack overflow in add_plan_to_notes().

The alternative is to tell the linker to use N bytes of stack:
-Wl,--stack,N

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-10 00:04:17 -07:00
Miika Turkia
7e50711bd3 Set proper mode for file open dialog
Fixes #913

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-09 23:55:53 -07:00
Miika Turkia
e4353cb4a7 Report empty file error instead of OOM
If we are trying to open an empty file, skip the attempts to parse the
input and report an appropriate error message.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-09 23:55:45 -07:00
Miika Turkia
1f4267d093 Update the text if DC changes
When switching from one DC to the next, the text of DC name is not updated due
to commit 487ddce353. This patch re-inserts the
call to updateText() for the specific function to get the DC name updated
properly.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-09 23:55:27 -07:00
Miika Turkia
1bea48f9bd Fix bit shift on Suunto DB import
Let's do the bit shift properly and not by block size.

Fixes #906

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-09 23:55:03 -07:00
Miika Turkia
577965cc26 Add FAQ item of missing logs to user manual
[Dirk Hohndel: added corresponding entry to the FAQ]

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-03 22:32:34 -07:00
Robert C. Helling
e79cae577d Decrease gaschange index even if we are already breathing the new mix
This fixes a bug where we would not do any gas changes at all if at the end of
bottom time we were deeper than the MOD of the bottom mix. Instead we would
constantly try to switch to that gas and find we are already breathing it.

A test case would be a dive with air and EAN50 to more than 66m. That would
have never switched to EAN50.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-03 22:23:17 -07:00
Miika Turkia
abbebef997 Divinglog import: ignore unsupported cylinders
Subsurface supports currently 8 cylinders, thus we should not attempt to
add more.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-03 22:21:19 -07:00
Miika Turkia
30bdc83105 Add libgrantlee-dev fore Debian INSTALL instructions
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-03 22:20:44 -07:00
Robert C. Helling
260ea879e5 Make debugging cleaner
Don't try to connect the globe when NOMARBLE is active.

Check exisistance before trying to open an image file.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-03 22:19:36 -07:00
Dirk Hohndel
faa1c28100 Another fix to build with NO_MARBLE
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-31 11:15:35 -07:00
Dirk Hohndel
3efafd1fde Enable building with NO_MARBLE again
This was broken in commit 7efa924067 ("Transform GlobeGPS in a static
instance() class").

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-31 11:01:57 -07:00
Miika Turkia
21d8d26da1 CSV import: imperial support for cylinder pressure
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-31 10:32:27 -07:00
Miika Turkia
232001a1f5 CSV import: implement unit conversion for temperature
If input is in F, we need to convert it to C on import.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-31 10:32:23 -07:00
Miika Turkia
d7a5bae4c8 CSV import: fix imperial conversion for weight
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-31 10:32:17 -07:00
Tomaz Canabrava
5c1acca212 Fixed layout spacing issues.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-31 10:32:09 -07:00
Tomaz Canabrava
e8720c2918 Repopulate the labels on the globe after an edit
Strangely, it still doesn't show the flag where it should be
(but it shows just after a reselect, so it's mostly a cache
issue somewhere)

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-31 10:31:19 -07:00
Tomaz Canabrava
fa6e1d5506 Paint the coords-widget yellow after clicking on the globe
When we clicked in the globe and changed programatically
the text on the coordinates edit widget, the background
was still white instead of the bright yellow that it should
have to show that it was modified.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-31 10:31:00 -07:00
Tomaz Canabrava
c13e5d069c Save the gps edit into the current dive_site
The accept method didn't save the gps edit even if we
put correct text on it.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-31 10:29:33 -07:00
Tomaz Canabrava
f8b64da136 Change the coordinates via globe.
Now when the user selects the dive site edit, the globe
will enter in edit mode too.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-31 10:29:17 -07:00
Tomaz Canabrava
2faff7ceae Add a button to pick the coordinates via globe on the dive site edit
It's a placeholder for now, but next commit will make it work.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-31 10:28:28 -07:00
Tomaz Canabrava
7efa924067 Transform GlobeGPS in a static instance() class
This is needed to start easing the transition from the completely
wrong and bogus MainWindow::instance()->globe() calls. this is still
wrong, but with it I removed one level of indirection.
I did that now because I wanted to not taint the location management
when I use it to deal with the globe.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-31 10:28:17 -07:00
Tomaz Canabrava
9130ff8a97 Correctly update the dive when the user edits dive_site
We didn't correctly update the dive site as soon as the
dive_site edit finished, and this time we are actually
correctly updating things using signals instead of calling
the mainwindow for everything.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-31 10:27:16 -07:00
Tomaz Canabrava
7834341562 Remove unused signal
And move things around, informationManagementEnded was a good name
but endEditDiveSite is better.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-31 10:27:01 -07:00
Tomaz Canabrava
9cf31a4d73 Remove unused action on the mainwindow.
The Manage dive sites action should be in the View menu because it makes
more sense to "view dive site edit"

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-31 10:26:08 -07:00
Joakim Bygdell
fc746c2129 QML UI: move back button back to the left and center text
The top bars on the main page and dive details should be the same height
and keep the same layout.

[Dirk Hohndel: refactored Joakim's patch to work on top of what was
               already in master]

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-30 10:13:25 -07:00
Salvador Cuñat
a09cfb8e98 RBT - Add load/save in git storage support
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-30 07:43:16 -07:00
Salvador Cuñat
25f3038d40 RBT - Add save/load in xml file support
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-30 07:43:16 -07:00