From 40179b6c1b8af0d320a32afffb44e3fbff6925bd Mon Sep 17 00:00:00 2001 From: Miika Turkia Date: Mon, 6 Jan 2014 12:24:30 +0200 Subject: 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 Signed-off-by: Dirk Hohndel --- qt-ui/profilegraphics.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'qt-ui') 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 -- cgit v1.2.3-70-g09d2