diff options
-rw-r--r-- | gr-qtgui/lib/Makefile.am | 1 | ||||
-rw-r--r-- | gr-qtgui/lib/qtgui_time_sink_c.h | 4 | ||||
-rw-r--r-- | gr-qtgui/lib/timedisplayform.cc | 19 | ||||
-rw-r--r-- | gr-qtgui/lib/timedisplayform.h | 3 | ||||
-rw-r--r-- | gr-qtgui/swig/Makefile.am | 2 | ||||
-rw-r--r-- | gr-qtgui/swig/qtgui_swig.i | 2 | ||||
-rw-r--r-- | gr-qtgui/swig/qtgui_time_sink_c.i | 4 |
7 files changed, 19 insertions, 16 deletions
diff --git a/gr-qtgui/lib/Makefile.am b/gr-qtgui/lib/Makefile.am index ae6041adb..517a67097 100644 --- a/gr-qtgui/lib/Makefile.am +++ b/gr-qtgui/lib/Makefile.am @@ -30,6 +30,7 @@ AM_CPPFLAGS = -I. $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) \ # This is mostly to help make distcheck pass QMAKE_SOURCES = \ spectrumdisplayform.moc.cc \ + timedisplayform.moc.cc \ FrequencyDisplayPlot.moc.cc \ TimeDomainDisplayPlot.moc.cc \ WaterfallDisplayPlot.moc.cc \ diff --git a/gr-qtgui/lib/qtgui_time_sink_c.h b/gr-qtgui/lib/qtgui_time_sink_c.h index 8867fa48e..cdcf095ce 100644 --- a/gr-qtgui/lib/qtgui_time_sink_c.h +++ b/gr-qtgui/lib/qtgui_time_sink_c.h @@ -35,7 +35,7 @@ typedef boost::shared_ptr<qtgui_time_sink_c> qtgui_time_sink_c_sptr; qtgui_time_sink_c_sptr qtgui_make_time_sink_c(int size, double bw, const std::string &name, - QWidget *parent); + QWidget *parent=NULL); class qtgui_time_sink_c : public gr_block { @@ -45,7 +45,7 @@ private: QWidget *parent); qtgui_time_sink_c(int size, double bw, const std::string &name, - QWidget *parent); + QWidget *parent=NULL); void forecast(int noutput_items, gr_vector_int &ninput_items_required); diff --git a/gr-qtgui/lib/timedisplayform.cc b/gr-qtgui/lib/timedisplayform.cc index 809c88a9b..e90eaab06 100644 --- a/gr-qtgui/lib/timedisplayform.cc +++ b/gr-qtgui/lib/timedisplayform.cc @@ -24,6 +24,7 @@ #include <QColorDialog> #include <QMessageBox> #include <timedisplayform.h> +#include <iostream> TimeDisplayForm::TimeDisplayForm(QWidget* parent) : QWidget(parent) @@ -31,10 +32,15 @@ TimeDisplayForm::TimeDisplayForm(QWidget* parent) _systemSpecifiedFlag = false; _intValidator = new QIntValidator(this); _intValidator->setBottom(0); + + _layout = new QGridLayout(this); _timeDomainDisplayPlot = new TimeDomainDisplayPlot(this); + _layout->addWidget(_timeDomainDisplayPlot, 0, 0); _numRealDataPoints = 1024; - + + setLayout(_layout); + Reset(); // Create a timer to update plots at the specified rate @@ -75,12 +81,6 @@ TimeDisplayForm::newData( const TimeUpdateEvent* spectrumUpdateEvent) numTimeDomainDataPoints, d_update_time); - // Tell the system the GUI has been updated - //if(_systemSpecifiedFlag){ - // _system->SetLastGUIUpdateTime(generatedTimestamp); - // _system->DecrementPendingGUIUpdateEvents(); - //} - delete [] real; delete [] imag; } @@ -88,10 +88,7 @@ TimeDisplayForm::newData( const TimeUpdateEvent* spectrumUpdateEvent) void TimeDisplayForm::resizeEvent( QResizeEvent *e ) { - QSize s(0,0); - //s.setWidth(TimeDomainDisplayFrame->width()); - //s.setHeight(TimeDomainDisplayFrame->height()); - emit _timeDomainDisplayPlot->resizeSlot(&s); + emit _timeDomainDisplayPlot->resizeSlot(&size()); } void diff --git a/gr-qtgui/lib/timedisplayform.h b/gr-qtgui/lib/timedisplayform.h index 2ba3a28c8..947e28153 100644 --- a/gr-qtgui/lib/timedisplayform.h +++ b/gr-qtgui/lib/timedisplayform.h @@ -29,6 +29,7 @@ #include <TimeDomainDisplayPlot.h> #include <ConstellationDisplayPlot.h> #include <QtGui/QApplication> +#include <QtGui/QGridLayout> #include <QValidator> #include <QTimer> #include <vector> @@ -67,6 +68,8 @@ signals: private: uint64_t _numRealDataPoints; QIntValidator* _intValidator; + + QGridLayout *_layout; TimeDomainDisplayPlot* _timeDomainDisplayPlot; bool _systemSpecifiedFlag; double _startFrequency; diff --git a/gr-qtgui/swig/Makefile.am b/gr-qtgui/swig/Makefile.am index 132f05188..4cfab6355 100644 --- a/gr-qtgui/swig/Makefile.am +++ b/gr-qtgui/swig/Makefile.am @@ -52,4 +52,4 @@ qtgui_swig_la_swig_libadd = \ # additional SWIG files to be installed qtgui_swig_swiginclude_headers = \ qtgui.i \ - qtgui_time_sink_c.i
\ No newline at end of file + qtgui_time_sink_c.i diff --git a/gr-qtgui/swig/qtgui_swig.i b/gr-qtgui/swig/qtgui_swig.i index c250cdd04..568fa78a9 100644 --- a/gr-qtgui/swig/qtgui_swig.i +++ b/gr-qtgui/swig/qtgui_swig.i @@ -25,8 +25,10 @@ %{ #include <qtgui_sink_c.h> #include <qtgui_sink_f.h> +#include <qtgui_time_sink_c.h> %} %include "qtgui.i" +%include "qtgui_time_sink_c.i" diff --git a/gr-qtgui/swig/qtgui_time_sink_c.i b/gr-qtgui/swig/qtgui_time_sink_c.i index c58834cbb..2ac0023ed 100644 --- a/gr-qtgui/swig/qtgui_time_sink_c.i +++ b/gr-qtgui/swig/qtgui_time_sink_c.i @@ -30,7 +30,7 @@ GR_SWIG_BLOCK_MAGIC(qtgui,time_sink_c) qtgui_time_sink_c_sptr qtgui_make_time_sink_c(int size, double bw, const std::string &name, - QWidget *parent); + QWidget *parent=NULL); class qtgui_time_sink_c : public gr_block { @@ -40,7 +40,7 @@ private: QWidget *parent); qtgui_time_sink_c(int size, double bw, const std::string &name, - QWidget *parent); + QWidget *parent=NULL); public: void exec_(); |