summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-05-04 19:36:40 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-05-04 19:55:16 -0700
commitf269f8649644c5726fcd79ead443b0bb605a798d (patch)
treed6d7e99408a9d3f96f4277b1f6dca3af70eb443e /qt-ui
parent19048b98e59aedb4d03490095c646d337d47e38b (diff)
downloadsubsurface-f269f8649644c5726fcd79ead443b0bb605a798d.tar.gz
Plot of the Mean Deph
The mean depth now is plotted correctly. I wanted to do more stuff on this commit, but since it required that a few things on profile.c got moved to profile.h, commited to not have a huge blob for review. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/profilegraphics.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/qt-ui/profilegraphics.cpp b/qt-ui/profilegraphics.cpp
index f9d528831..14ed21c9b 100644
--- a/qt-ui/profilegraphics.cpp
+++ b/qt-ui/profilegraphics.cpp
@@ -313,7 +313,7 @@ void ProfileGraphicsView::plot_depth_profile(struct graphics_context *gc, struct
}
maxline = MAX(pi->maxdepth + marker, maxdepth * 2 / 3);
- color = profile_color[TIME_GRID].at(0);
+ color = profile_color[DEPTH_GRID].at(0);
for (i = marker; i < maxline; i += marker) {
QGraphicsLineItem *line = new QGraphicsLineItem(SCALE(gc, 0, i), SCALE(gc, 1, i));
@@ -321,17 +321,18 @@ void ProfileGraphicsView::plot_depth_profile(struct graphics_context *gc, struct
scene()->addItem(line);
}
-#if 0
+
gc->leftx = 0; gc->rightx = maxtime;
+ color = profile_color[MEAN_DEPTH].at(0);
/* Show mean depth */
if (! gc->printer) {
- set_source_rgba(gc, MEAN_DEPTH);
- move_to(gc, 0, pi->meandepth);
- line_to(gc, pi->entry[pi->nr - 1].sec, pi->meandepth);
- cairo_stroke(cr);
+ QGraphicsLineItem *line = new QGraphicsLineItem(SCALE(gc, 0, pi->meandepth), SCALE(gc, pi->entry[pi->nr - 1].sec, pi->meandepth));
+ line->setPen(QPen(color));
+ scene()->addItem(line);
}
+#if 0
/*
* These are good for debugging text placement etc,
* but not for actual display..