Commit graph

7 commits

Author SHA1 Message Date
Joakim Bygdell
4b98d17800 Give oxygen a proper colour in the tankbar
Oxygen should be representad by its own solid green colour not the yellow/green of nitrox.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-05 13:30:47 -08:00
Anton Lundin
f14ef84c9a Free descriptions copied for TankItem
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-18 08:34:00 -08:00
Dirk Hohndel
fb371c0633 TankBar: don't risk dereferencing stale pointers
Basically we could end up in a situation where the plotInfo is no longer
valid, yet the model changes and triggers a redraw before the new data is
passed into the TankBar.

Instead of chasing that race condition it seemed much easier to just copy
the plot_data entries and the gas information in the dive.

Fixes #716

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-23 07:23:42 -07:00
Dirk Hohndel
88fe28636e TankBar: make outline zero-width
In some circumstances Qt will draw a really thick border around
rectangles. This explicitly makes the border of the tank bar thin.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-18 11:47:18 -05:00
Dirk Hohndel
e71119b40b TankBar: use the itemPos as intended
Which actually makes the code much clearer as now the object is at the
correct spot on the canvas and the positions inside are relative to that.
No more magic gradiants starting at "92"

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-15 07:30:31 -06:00
Dirk Hohndel
87ca15c5c3 Add gas text to tank bars
Also restructures the code a bit to make it a little more sane and changes
the colors slightly.

With these changes I think we can claim that this
Fixes #557

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-14 22:39:47 -06:00
Dirk Hohndel
fa3c18d83b Add initial support for a visual tracker of gas used
This shows a color-coded bar at the bottom of the graph that corresponds
with the active gas.

Todo:
- text that explicitly states gas on the left edge of the bar
- better vertical positioning of the bar
- ability to turn this on and off

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-14 18:22:27 -06:00