summaryrefslogtreecommitdiffstats
path: root/qt-ui/profilegraphics.h
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2013-07-04 23:55:27 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-07-04 22:59:46 -0700
commitc7f8ada4ff5e84e2ea52e387806c640eee05f45f (patch)
tree51cc2989d029f67cb3837e802bc3dcf61735fbbd /qt-ui/profilegraphics.h
parent1257adfd267e04b3dbe149c9c5874132dc70ec62 (diff)
downloadsubsurface-c7f8ada4ff5e84e2ea52e387806c640eee05f45f.tar.gz
Profile: attempt on better zoom and pan logic
QGraphicsView::AnchorUnderMouse does not work for Qt 4.8.1 on Ubuntu 12.04 and if the mouseMoveEvent overload is disabled it practically can be seen that the anchor point is [0, 0] instead of the mouse location. After a suggestion found on the web this patch attempts to use the hidden scroll bars to calculate reposition on pan and zoom *near the mouse cursor. On the other hand QAbstactSlider (QScrollBar) class strangly uses negative offsets for minimum scroll position, which makes the implementation even more ugly. [*near] because it's not that accurate! Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profilegraphics.h')
-rw-r--r--qt-ui/profilegraphics.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/qt-ui/profilegraphics.h b/qt-ui/profilegraphics.h
index c3cb4ef73..48c88aaca 100644
--- a/qt-ui/profilegraphics.h
+++ b/qt-ui/profilegraphics.h
@@ -124,6 +124,7 @@ private:
void plot_depth_scale();
QColor get_sac_color(int sac, int avg_sac);
+ void scrollViewTo(const QPoint pos);
QPen defaultPen;
QBrush defaultBrush;