summaryrefslogtreecommitdiff
path: root/gr-qtgui/lib/TimeDomainDisplayPlot.cc
diff options
context:
space:
mode:
authorNick Foster <nick@ettus.com>2012-04-18 19:14:26 -0700
committerNick Foster <nick@ettus.com>2012-04-18 19:14:26 -0700
commitf967ac194d1644a340d7cd0a58777b35bf6c5962 (patch)
tree4ed0f1dab74452b9e2fe5d638d8b5a06c5b3ddb9 /gr-qtgui/lib/TimeDomainDisplayPlot.cc
parenta9040afbde50e5f342b8d82e9281823dc2564c95 (diff)
qtgui: fixed dblclick emits, need to set state machine in Qwt 6. if we didn't maintain compat we could get rid of the whole class.
Diffstat (limited to 'gr-qtgui/lib/TimeDomainDisplayPlot.cc')
-rw-r--r--gr-qtgui/lib/TimeDomainDisplayPlot.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/gr-qtgui/lib/TimeDomainDisplayPlot.cc b/gr-qtgui/lib/TimeDomainDisplayPlot.cc
index 2ddb4aebcf..7cd803a509 100644
--- a/gr-qtgui/lib/TimeDomainDisplayPlot.cc
+++ b/gr-qtgui/lib/TimeDomainDisplayPlot.cc
@@ -80,15 +80,12 @@ public:
protected:
using QwtPlotZoomer::trackerText;
-#if QWT_VERSION < 0x060000
- virtual QwtText trackerText( const QwtDoublePoint& p ) const
-#else
virtual QwtText trackerText( const QPoint& p ) const
-#endif
{
- QwtText t(QString("%1 %2, %3 V").arg(p.x(), 0, 'f', GetTimePrecision()).
+ QwtDoublePoint dp = QwtPlotZoomer::invTransform(p);
+ QwtText t(QString("%1 %2, %3 V").arg(dp.x(), 0, 'f', GetTimePrecision()).
arg(_unitType.c_str()).
- arg(p.y(), 0, 'f', 4));
+ arg(dp.y(), 0, 'f', 4));
return t;
}
@@ -179,6 +176,7 @@ TimeDomainDisplayPlot::TimeDomainDisplayPlot(int nplots, QWidget* parent)
connect(_picker, SIGNAL(selected(const QwtDoublePoint &)),
this, SLOT(OnPickerPointSelected(const QwtDoublePoint &)));
#else
+ _picker->setStateMachine(new QwtPickerDblClickPointMachine());
connect(_picker, SIGNAL(selected(const QPointF &)),
this, SLOT(OnPickerPointSelected6(const QPointF &)));
#endif