diff options
author | Miika Turkia <miika.turkia@gmail.com> | 2014-01-06 12:24:30 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-01-06 20:50:58 +0800 |
commit | 528d0ea0e7bd2c8e40651924508b105c2ac0ecf0 (patch) | |
tree | b7fe9cfca6ccf60809b408b514d8bbe7d9f1bcb3 /qt-ui | |
parent | ffe53224a23285a34aa44a228e3ef2eb194cc988 (diff) | |
download | subsurface-528d0ea0e7bd2c8e40651924508b105c2ac0ecf0.tar.gz |
Print numerical value of mean depth
This will print the numerical value of mean depth to the profile graph.
Fixes #405
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/profilegraphics.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/qt-ui/profilegraphics.cpp b/qt-ui/profilegraphics.cpp index dfbe606f8..3f202cb47 100644 --- a/qt-ui/profilegraphics.cpp +++ b/qt-ui/profilegraphics.cpp @@ -1177,6 +1177,11 @@ void ProfileGraphicsView::plot_depth_profile() pen.setColor(c); item->setPen(pen); scene()->addItem(item); + + struct text_render_options tro = {DEPTH_TEXT_SIZE, MEAN_DEPTH, LEFT, TOP}; + plot_text(&tro, QPointF(gc.leftx, gc.pi.meandepth), QString("%1").arg(QString::number(gc.pi.meandepth / 1000.0, 'f', 1)), item); + tro.hpos = RIGHT; + plot_text(&tro, QPointF(gc.pi.entry[gc.pi.nr - 1].sec, gc.pi.meandepth), QString("%1").arg(QString::number(gc.pi.meandepth / 1000.0, 'f', 1)), item); } #if 0 |