diff options
author | Robert Helling <helling@atdotde.de> | 2013-05-30 20:56:00 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-05-31 05:18:25 +0900 |
commit | 344a429e4811c60b9b12ef225c2b5b8d31d8534b (patch) | |
tree | a5fd22433415c35ab3495bbc2e3c823099fd546c /qt-ui/profilegraphics.cpp | |
parent | 77880b7a0797cef0fac0650ce0321e3aa8b702f4 (diff) | |
download | subsurface-344a429e4811c60b9b12ef225c2b5b8d31d8534b.tar.gz |
Show ceilings for individual tissues
I think that displaying tissue loadings either as pressure or as
percentages is not very intuitive but that it makes much more sense when
translated to ceiling depths.
This change enables just that for the 16 tissues in our calculated ceiling
and visualizes this in the profile graph.
There is a checkbox in the preferences to turn this on. If enabled, all
tissues having non-trivial ceilings are also shown in the info box.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profilegraphics.cpp')
-rw-r--r-- | qt-ui/profilegraphics.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/qt-ui/profilegraphics.cpp b/qt-ui/profilegraphics.cpp index 663aefe25..d635e1956 100644 --- a/qt-ui/profilegraphics.cpp +++ b/qt-ui/profilegraphics.cpp @@ -1072,6 +1072,32 @@ void ProfileGraphicsView::plot_depth_profile() neatFill->setBrush(pat); scene()->addItem(neatFill); } + + /* plot the calculated ceiling for all tissues */ + if (prefs.calc_all_tissues){ + int k; + for (k=0; k<16; k++){ + if (prefs.profile_calc_ceiling) { + pat.setColorAt(0, profile_color[CALC_CEILING_SHALLOW].first()); + pat.setColorAt(1, QColor(100, 100, 100, 50)); + + entry = gc.pi.entry; + p.clear(); + p.append(QPointF(SCALEGC(0, 0))); + for (i = 0; i < gc.pi.nr; i++, entry++) { + if ((entry->ceilings)[k]) + p.append(QPointF(SCALEGC(entry->sec, (entry->ceilings)[k]))); + else + p.append(QPointF(SCALEGC(entry->sec, 0))); + } + p.append(QPointF(SCALEGC((entry-1)->sec, 0))); + neatFill = new QGraphicsPolygonItem(); + neatFill->setPolygon(p); + neatFill->setBrush(pat); + scene()->addItem(neatFill); + } + } + } /* next show where we have been bad and crossed the dc's ceiling */ if (prefs.profile_dc_ceiling) { pat.setColorAt(0, profile_color[CEILING_SHALLOW].first()); |