summaryrefslogtreecommitdiff
path: root/gr-qtgui/lib
diff options
context:
space:
mode:
Diffstat (limited to 'gr-qtgui/lib')
-rw-r--r--gr-qtgui/lib/spectrumdisplayform.cc37
-rw-r--r--gr-qtgui/lib/spectrumdisplayform.h8
2 files changed, 44 insertions, 1 deletions
diff --git a/gr-qtgui/lib/spectrumdisplayform.cc b/gr-qtgui/lib/spectrumdisplayform.cc
index 804dbdd62..238c9889f 100644
--- a/gr-qtgui/lib/spectrumdisplayform.cc
+++ b/gr-qtgui/lib/spectrumdisplayform.cc
@@ -62,6 +62,19 @@ SpectrumDisplayForm::SpectrumDisplayForm(QWidget* parent)
// Create a timer to update plots at the specified rate
displayTimer = new QTimer(this);
connect(displayTimer, SIGNAL(timeout()), this, SLOT(UpdateGuiTimer()));
+
+ // Connect double click signals up
+ connect(_frequencyDisplayPlot, SIGNAL(plotPointSelected(const QPointF)),
+ this, SLOT(onFFTPlotPointSelected(const QPointF)));
+
+ connect(_waterfallDisplayPlot, SIGNAL(plotPointSelected(const QPointF)),
+ this, SLOT(onWFallPlotPointSelected(const QPointF)));
+
+ connect(_timeDomainDisplayPlot, SIGNAL(plotPointSelected(const QPointF)),
+ this, SLOT(onTimePlotPointSelected(const QPointF)));
+
+ connect(_constellationDisplayPlot, SIGNAL(plotPointSelected(const QPointF)),
+ this, SLOT(onConstPlotPointSelected(const QPointF)));
}
SpectrumDisplayForm::~SpectrumDisplayForm()
@@ -689,3 +702,27 @@ SpectrumDisplayForm::SetUpdateTime(double t)
// QTimer class takes millisecond input
displayTimer->start(d_update_time*1000);
}
+
+void
+SpectrumDisplayForm::onFFTPlotPointSelected(const QPointF p)
+{
+ emit plotPointSelected(p, 1);
+}
+
+void
+SpectrumDisplayForm::onWFallPlotPointSelected(const QPointF p)
+{
+ emit plotPointSelected(p, 2);
+}
+
+void
+SpectrumDisplayForm::onTimePlotPointSelected(const QPointF p)
+{
+ emit plotPointSelected(p, 3);
+}
+
+void
+SpectrumDisplayForm::onConstPlotPointSelected(const QPointF p)
+{
+ emit plotPointSelected(p, 4);
+}
diff --git a/gr-qtgui/lib/spectrumdisplayform.h b/gr-qtgui/lib/spectrumdisplayform.h
index 794a8c58e..860edf2d1 100644
--- a/gr-qtgui/lib/spectrumdisplayform.h
+++ b/gr-qtgui/lib/spectrumdisplayform.h
@@ -71,7 +71,13 @@ private slots:
void newFrequencyData( const SpectrumUpdateEvent* );
void UpdateGuiTimer();
-protected:
+ void onFFTPlotPointSelected(const QPointF p);
+ void onWFallPlotPointSelected(const QPointF p);
+ void onTimePlotPointSelected(const QPointF p);
+ void onConstPlotPointSelected(const QPointF p);
+
+signals:
+ void plotPointSelected(const QPointF p, int type);
private:
void _AverageHistory( const double * newBuffer );