Commit graph

12 commits

Author SHA1 Message Date
Robert C. Helling
3fc9c1e005 Tissue saturation plot a la Sherwater Pretel
This adds a toolbox icon to turn on a tissue plot inspired by the bar
graph of the Sherwater Petrel,

It shows the inert gas partial pressures for individual compartments. If
they are below the ambient pressure (grey line) they are shown in units of
the ambient pressure, if they are above, the excess is shown as a
percentage of the allowed overpressure for plain Buehlmann. So it has the
same units as a gradient factor. Thus also the a gradient factor line (for
the current depth) is shown.

The different tissues get different colors, greener for the faster ones and bluer
for the slower ones.

Positioning and on/off icon action still need some tender loving care.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-09-19 21:46:30 -07:00
Dirk Hohndel
2d24779b62 Make heartrate grid less confusing
Having all the grid lines in the same color made things visually
confusing. To clean this up a little make the heartrate lines a light gray
color.

Fixes #484

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-28 12:45:42 -07:00
Dirk Hohndel
e5967dd193 Make red ceiling work
The existing code for toggling the DC reported ceiling in red or "surface
color" clearly had never been tested.

This seems to create a reasonably attractive implementation - not exactly
what we had in the past, but good enough.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-14 22:52:22 -07:00
Tomaz Canabrava
5bba84e57f Fix colors on the new profile.
This patch fixes the colors on the new profile, the init of the colors map
was not being done. This fixes it.

A few problems were spotted on the new profile dealing with the ruler
graph and a newly added dive, when using the dive add dialog.

I'll be on it later.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-07 20:37:17 -08:00
Dirk Hohndel
76e6420f6b Massive automated whitespace cleanup
I know everyone will hate it.
Go ahead. Complain. Call me names.
At least now things are consistent and reproducible.
If you want changes, have your complaint come with a patch to
scripts/whitespace.pl so that we can automate it.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-27 20:09:57 -08:00
Dirk Hohndel
b5a02e50aa New profile: create new class for DiveHeartrateItem
This allows us to give it a different color (red) and make it a smaller
size.

While implementing this I also fixed the size of the temperature text in
the new profile.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-23 15:28:31 -08:00
Boris Barbulovski
ccb1c33d02 Put include guard to every header
* ensure include guard to every header
* comment endif guard block

Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-11 12:37:01 -08:00
Tomaz Canabrava
fcc17c717d Move the 'getSacColor' out of old profile and use it.
This patch makes the color of the cylinder pressure use the sac colors.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-27 13:00:29 -08:00
Tomaz Canabrava
35979537d9 Plot the Temperature Text.
I Moved the 'plot text' method of the Old Graphics to the new
layout - this one was mostly unchanged as it was already good
as is.

And used the TemperatureProfileItem to also display texts.
This was the first implementation of the new system that uses
*less* code than the original one, wich makes me happy.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-17 14:04:47 -08:00
Tomaz Canabrava
7d5cf32501 Added a Model that should handle the Dive Profile
This model encapsulates the plot_info struct and provides
a consistent way to show it using the Qt Model view system
in the C++ and QML way. For a QGraphicsItem that should show
a Profile, this is the start.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-16 10:12:30 +07:00
Tomaz Canabrava
493f366765 Use the same line dimensions as the profile, on the planner.
The Planner should be 'almost' like the profile, with the possibility
to use the mouse and keyboard to input a new plan, so this is a bit
of 'getting there.' I don't like too much code duplication but since
the current Profile Graphics is a crude cut-and-paste from the old
Cairo backend, it's easyer to start from scratch and have it well
organized as Qt code.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-09-16 19:21:13 -03:00
Tomaz Canabrava
2df0b398f3 Added 2 new files to handle the common stuff for graphics.
Added 2 new files, graphicsview-common.h/cpp, that should have
the common stuff shared between the dive profile viewer and
the dive planner. the amount of duplicated code would be huge
if we go the road of two different classes for each one, but
since the planner took a more 'Qtish' way of behavior, in
comparisson to the profile - that's most a Cairo-To-Qt literal
translation, we cant easily merge the code without a complete
( and unwanted ) reestruturation of the profile code, thus,
this new files will serve as a bridge between them. Initially
I put there only the colors - since that's wat most easilyy
shareable.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-07-02 10:08:16 -03:00