summaryrefslogtreecommitdiff
path: root/gr-qtgui/lib
diff options
context:
space:
mode:
Diffstat (limited to 'gr-qtgui/lib')
-rw-r--r--gr-qtgui/lib/Makefile.am1
-rw-r--r--gr-qtgui/lib/qtgui_time_sink_c.h4
-rw-r--r--gr-qtgui/lib/timedisplayform.cc19
-rw-r--r--gr-qtgui/lib/timedisplayform.h3
4 files changed, 14 insertions, 13 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;