Work around QPlainTextEdit / QPainter bug on Mac

Actually, it's not so much "work around", it's just "disable our eye candy" for
tags on Mac. This is quite frustrating. When we do anything that has the
QPainter touch the widget from our GroupedLineEdit::paintEvent() path then the
QPlainTextEdit::paintEvent() doesn't render the text of the tags.

Fixes #298

Sort of.
But I guess tag text without eye candy is better than eye candy without tag text.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Don't parse 32bit hex values with strtol

On a 32bit machine this will truncate values with MSB set to 0x7fffffff

Fixes #164

(thanks to Linus for pointing me in the right direction)

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Save button on menu calls InfoWidget save

When editing a dive and clicking save button on menu bar, it saved
dive information but didn't mark dive as not being edited anymore.
For closing file, user should always click on the save button on
the bottom of the page and then saving it.
Now when clicking save button on menu bar, it will call the
accept_changes before saving to disk.

Signed-off-by: exhora <exhora.tat@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Use a default tank when populating tank data after download

This is super-simplistic and also is kinda wrong. It forces all tanks that
haven't been specified by the DC (so far only Atomics Aquatics Cobalt and
UEMIS Zurich (which doesn't even use libdivecomputer) to be AL80. Just as
we used AL80 as default for manually adding tanks.

Obviously this needs to become an option where the user can pick.

See #145

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Create a text entry for default cylinder in preferences

We don't do anything with this just yet.
And frankly, a drop down of the cylinders that we know of would be even
better. But hey, it's a start.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Use the default cylinder if defined

With this every cylinder downloaded from a divecomputer that doesn't
provide cylinder data, and every cylinder manually added anywhere will
default to the default cylinder that is set in the preferences.

For people who most of the time dive with the same equipment (always on
dive boats with AL80, or almost always diving their personal HP119) this
should be a nice improvement.

If you don't like this behavior, simply leave the default cylinder setting
in the preferences empty.

This commit also fixes the incorrect s->value call (should be
s->setValue). I wonder what this did to the default filename before...

Fixes #145

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
INSTALL instructions correction

This fixes the INSTALL instructions. The line to install home-brew is missing the “install” at the end and a small typo in the marble compilation instructions.

Saludos,

Pablo.

From 152395059af546273f38721e5c8ae1d19e2d73c3 Mon Sep 17 00:00:00 2001
From: Pablo Wolter <pwolter@gmail.com>
Date: Sat, 23 Nov 2013 16:10:02 -0800
Subject: [PATCH] Small correction to the installation instructions. Added
 "install" to the end of the ruby command to install homebrew and a typo in
 the compilation instructions for marble.

Signed-off-by: Pablo Wolter <pwolter@Pablos-MacBook-Pro.local>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Adding trip based statistics

This adds trip based statistics to the Yearly Statistics
view.

Signed-off-by: Miika Turkia <miika.turkia@nixu.fi>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Bugfix crash in trip statistics for non trip dives

This fixes a crash when you have non-trip dives in your logbook.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Create a drop down to choose default cylinder

This also renames the ui element to match.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
TODO notes
Add a travis.yml to test a build.
Revert "Get rid of the planner"

This reverts commit c4a47a7d60b53c9b2e2ffb874afaf733d43123aa.
Preferences: Add some limits to the GF's

Sets the limit for GF's in the preferences panel to 1<=x<=150 and color
it read if gf > 100

Signed-off-by: Anton Lundin <glance@acc.umu.se>
WIP: set backround red on high gf
Run create_plot_info in a separate thread

This is a crude attempt to reduce the gui lag while we are calculating
things for the plot, as tts/deco.

This will delay the whole plot a while, but the gui won't freeze
meanwhile.

This is more a rough cut of what could be done than whats a real
solution.