commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r10535 - in gnuradio/trunk/gr-qtgui/src: lib python


From: trondeau
Subject: [Commit-gnuradio] r10535 - in gnuradio/trunk/gr-qtgui/src: lib python
Date: Fri, 27 Feb 2009 20:41:16 -0700 (MST)

Author: trondeau
Date: 2009-02-27 20:41:15 -0700 (Fri, 27 Feb 2009)
New Revision: 10535

Modified:
   gnuradio/trunk/gr-qtgui/src/lib/Makefile.am
   gnuradio/trunk/gr-qtgui/src/lib/SpectrumGUIClass.cc
   gnuradio/trunk/gr-qtgui/src/lib/qtgui.i
   gnuradio/trunk/gr-qtgui/src/lib/qtgui_sink_c.cc
   gnuradio/trunk/gr-qtgui/src/lib/qtgui_sink_c.h
   gnuradio/trunk/gr-qtgui/src/lib/spectrumdisplayform.cc
   gnuradio/trunk/gr-qtgui/src/lib/spectrumdisplayform.ui
   gnuradio/trunk/gr-qtgui/src/python/qttest_c.py
Log:
some cleanup as well as adding a way to pass the Qapplication between sinks 
that allows multiple GUIs to be defined and run.

Modified: gnuradio/trunk/gr-qtgui/src/lib/Makefile.am
===================================================================
--- gnuradio/trunk/gr-qtgui/src/lib/Makefile.am 2009-02-28 02:27:07 UTC (rev 
10534)
+++ gnuradio/trunk/gr-qtgui/src/lib/Makefile.am 2009-02-28 03:41:15 UTC (rev 
10535)
@@ -76,12 +76,12 @@
 
 # These are the source files that go into the shared library
 libqtgui_la_SOURCES =  \
-       spectrumdisplayform.cc                  \
        FrequencyDisplayPlot.cc                 \
        TimeDomainDisplayPlot.cc                \
        WaterfallDisplayPlot.cc                 \
        Waterfall3DDisplayPlot.cc               \
        waterfallGlobalData.cc                  \
+       spectrumdisplayform.cc                  \
        SpectrumGUIClass.cc                     \
        spectrumUpdateEvents.cc                 \
        plot_waterfall.cc                       \
@@ -95,15 +95,15 @@
 
 # These headers get installed in ${prefix}/include/gnuradio
 grinclude_HEADERS =                    \
-       spectrumdisplayform.h           \
        FrequencyDisplayPlot.h          \
        TimeDomainDisplayPlot.h         \
        WaterfallDisplayPlot.h          \
        Waterfall3DDisplayPlot.h        \
-       SpectrumGUIClass.h              \
        waterfallGlobalData.h           \
        highResTimeFunctions.h          \
        plot_waterfall.h                \
+       spectrumdisplayform.h           \
+       SpectrumGUIClass.h              \
        spectrumUpdateEvents.h          \
        qtgui.h                         \
        qtgui_sink_c.h                  \

Modified: gnuradio/trunk/gr-qtgui/src/lib/SpectrumGUIClass.cc
===================================================================
--- gnuradio/trunk/gr-qtgui/src/lib/SpectrumGUIClass.cc 2009-02-28 02:27:07 UTC 
(rev 10534)
+++ gnuradio/trunk/gr-qtgui/src/lib/SpectrumGUIClass.cc 2009-02-28 03:41:15 UTC 
(rev 10535)
@@ -9,7 +9,8 @@
 const long SpectrumGUIClass::MAX_FFT_SIZE;
 const long SpectrumGUIClass::MIN_FFT_SIZE;
 
-SpectrumGUIClass::SpectrumGUIClass(const uint64_t maxDataSize, const uint64_t 
fftSize, const double newStartFrequency, const double newStopFrequency){
+SpectrumGUIClass::SpectrumGUIClass(const uint64_t maxDataSize, const uint64_t 
fftSize, 
+                                  const double newStartFrequency, const double 
newStopFrequency){
   _dataPoints = maxDataSize;
   if(_dataPoints < 2){
     _dataPoints = 2;
@@ -102,7 +103,9 @@
 
 void SpectrumGUIClass::Reset(){
   if(GetWindowOpenFlag()){
-    qApp->postEvent(_spectrumDisplayForm, new 
SpectrumFrequencyRangeEvent(_centerFrequency, _startFrequency, _stopFrequency));
+    qApp->postEvent(_spectrumDisplayForm, new 
SpectrumFrequencyRangeEvent(_centerFrequency, 
+                                                                         
_startFrequency, 
+                                                                         
_stopFrequency));
     qApp->postEvent(_spectrumDisplayForm, new SpectrumWindowResetEvent());
   }
   _droppedEntriesCount = 0;

Modified: gnuradio/trunk/gr-qtgui/src/lib/qtgui.i
===================================================================
--- gnuradio/trunk/gr-qtgui/src/lib/qtgui.i     2009-02-28 02:27:07 UTC (rev 
10534)
+++ gnuradio/trunk/gr-qtgui/src/lib/qtgui.i     2009-02-28 03:41:15 UTC (rev 
10535)
@@ -30,40 +30,51 @@
 GR_SWIG_BLOCK_MAGIC(qtgui,sink_c)
 
   qtgui_sink_c_sptr qtgui_make_sink_c (int fftsize, int wintype,
-                                      float fmin=-0.5, float fmax=0.5, const 
std::string &name="Display");
+                                      float fmin=-0.5, float fmax=0.5,
+                                      const std::string &name="Display");
 
 class qtgui_sink_c : public gr_block
 {
 private:
   friend qtgui_sink_c_sptr qtgui_make_sink_c (int fftsize, int wintype,
-                                             float fmin, float fmax, const 
std::string &name);
+                                             float fmin, float fmax,
+                                             const std::string &name);
   qtgui_sink_c (int fftsize, int wintype,
                float fmin, float fmax, const std::string &name);
 
 public:
   void start_app();
-
+  void initialize();
+  void initialize(QApplication *qapp);
+  QApplication* get_qapplication(); 
 };
 
 
 
-/****************************************************************************************/
+/*********************************************************************/
 
 
 GR_SWIG_BLOCK_MAGIC(qtgui,sink_f)
   
-qtgui_sink_f_sptr qtgui_make_sink_f (int fftsize, const std::vector<float> 
&window,
-                                    float fmin, float fmax, const std::string 
&name="Display");
+qtgui_sink_f_sptr qtgui_make_sink_f (int fftsize, 
+                                    const std::vector<float> &window,
+                                    float fmin, float fmax, 
+                                    const std::string &name="Display");
 
 class qtgui_sink_f : public gr_block
 {
 private:
-  friend qtgui_sink_f_sptr qtgui_make_sink_f (int fftsize, const 
std::vector<float> &window,
-                                             float fmin, float fmax, const 
std::string &name);
-  qtgui_sink_fy (int fftsize, const std::vector<float> &window,
-                float fmin, float fmax, const std::string &name);
+  friend qtgui_sink_f_sptr qtgui_make_sink_f (int fftsize, 
+                                             const std::vector<float> &window,
+                                             float fmin, float fmax, 
+                                             const std::string &name);
+  qtgui_sink_f (int fftsize, 
+               const std::vector<float> &window,
+               float fmin, float fmax,
+               const std::string &name);
   
 public:
   void start_app();
 };
 
+

Modified: gnuradio/trunk/gr-qtgui/src/lib/qtgui_sink_c.cc
===================================================================
--- gnuradio/trunk/gr-qtgui/src/lib/qtgui_sink_c.cc     2009-02-28 02:27:07 UTC 
(rev 10534)
+++ gnuradio/trunk/gr-qtgui/src/lib/qtgui_sink_c.cc     2009-02-28 03:41:15 UTC 
(rev 10535)
@@ -40,7 +40,7 @@
 qtgui_sink_c::qtgui_sink_c (int fftsize, int wintype,
                            float fmin, float fmax, const std::string &name)
   : gr_block ("sink_c",
-             gr_make_io_signature (1, 1, sizeof(gr_complex)),
+             gr_make_io_signature (1, -1, sizeof(gr_complex)),
              gr_make_io_signature (0, 0, 0)),
     d_fftsize(fftsize), d_wintype((gr_firdes::win_type)(wintype)), 
     d_fmin(fmin), d_fmax(fmax), d_name(name)
@@ -59,10 +59,13 @@
   d_residbuf = new gr_complex[d_fftsize];
 
   buildwindow();
+
+  //initialize();
 }
 
 qtgui_sink_c::~qtgui_sink_c()
 {
+  delete d_object;
   delete [] d_fftdata;
   delete [] d_residbuf;
   delete d_main_gui;
@@ -79,13 +82,27 @@
   pthread_mutex_unlock(&d_pmutex);
 }
 
+
 void
-qtgui_sink_c::start_app()
+qtgui_sink_c::initialize()
 {
   int argc;
   char **argv = NULL;
   d_qApplication = new QApplication(argc, argv);
+  __initialize();
+}
 
+
+void
+qtgui_sink_c::initialize(QApplication *qapp)
+{
+  d_qApplication = qapp;
+  __initialize();
+}
+
+void
+qtgui_sink_c::__initialize()
+{
   uint64_t maxBufferSize = 32768;
   d_main_gui = new SpectrumGUIClass(maxBufferSize, d_fftsize, d_fmin, d_fmax);
   d_main_gui->SetDisplayTitle(d_name);
@@ -93,9 +110,20 @@
   d_main_gui->SetWindowType((int)d_wintype);
   d_main_gui->OpenSpectrumWindow(NULL);
 
-  qtgui_obj object(d_qApplication);
-  qApp->postEvent(&object, new qtgui_event(&d_pmutex));
+  d_object = new qtgui_obj(d_qApplication);
+  qApp->postEvent(d_object, new qtgui_event(&d_pmutex));
+}
 
+QApplication* 
+qtgui_sink_c::get_qapplication()
+{
+  return d_qApplication;
+}
+
+
+void
+qtgui_sink_c::start_app()
+{
   d_qApplication->exec();
 }
 

Modified: gnuradio/trunk/gr-qtgui/src/lib/qtgui_sink_c.h
===================================================================
--- gnuradio/trunk/gr-qtgui/src/lib/qtgui_sink_c.h      2009-02-28 02:27:07 UTC 
(rev 10534)
+++ gnuradio/trunk/gr-qtgui/src/lib/qtgui_sink_c.h      2009-02-28 03:41:15 UTC 
(rev 10535)
@@ -44,6 +44,8 @@
                                              float fmin, float fmax, const 
std::string &name);
   qtgui_sink_c (int fftsize, int wintype,
                float fmin, float fmax, const std::string &name);
+
+  void __initialize();
   
   int d_fftsize;
   gr_firdes::win_type d_wintype;
@@ -70,13 +72,17 @@
   
 public:
   ~qtgui_sink_c();
+  void initialize();
+  void initialize(QApplication *qapp);
   void start_app();
   void lock();
   void unlock();
 
-  QApplication *d_qApplication
-;
+  QApplication* get_qapplication();
 
+  QApplication *d_qApplication;
+  qtgui_obj *d_object;
+
   int general_work (int noutput_items,
                    gr_vector_int &ninput_items,
                    gr_vector_const_void_star &input_items,

Modified: gnuradio/trunk/gr-qtgui/src/lib/spectrumdisplayform.cc
===================================================================
--- gnuradio/trunk/gr-qtgui/src/lib/spectrumdisplayform.cc      2009-02-28 
02:27:07 UTC (rev 10534)
+++ gnuradio/trunk/gr-qtgui/src/lib/spectrumdisplayform.cc      2009-02-28 
03:41:15 UTC (rev 10535)
@@ -123,7 +123,8 @@
     _AverageHistory(_realFFTDataPoints);
 
     double sumMean;
-    const double fft_bin_size = (_stopFrequency-_startFrequency) / 
static_cast<double>(numFFTDataPoints);
+    const double fft_bin_size = (_stopFrequency-_startFrequency) /
+      static_cast<double>(numFFTDataPoints);
 
     // find the peak, sum (for mean), etc
     _peakAmplitude = -HUGE_VAL;
@@ -161,14 +162,22 @@
   }
 
   if(lastOfMultipleUpdatesFlag){
-    _frequencyDisplayPlot->PlotNewData(_averagedValues, numFFTDataPoints, 
_noiseFloorAmplitude, _peakFrequency, _peakAmplitude);
-    _timeDomainDisplayPlot->PlotNewData(realTimeDomainDataPoints, 
imagTimeDomainDataPoints, numTimeDomainDataPoints);
+    _frequencyDisplayPlot->PlotNewData(_averagedValues, numFFTDataPoints, 
+                                      _noiseFloorAmplitude, _peakFrequency, 
+                                      _peakAmplitude);
+    _timeDomainDisplayPlot->PlotNewData(realTimeDomainDataPoints, 
+                                       imagTimeDomainDataPoints, 
+                                       numTimeDomainDataPoints);
   }
   // Don't update the repeated data for the waterfall
   if(!repeatDataFlag){
-    _waterfallDisplayPlot->PlotNewData(_realFFTDataPoints, numFFTDataPoints, 
timePerFFT, dataTimestamp, spectrumUpdateEvent->getDroppedFFTFrames());
+    _waterfallDisplayPlot->PlotNewData(_realFFTDataPoints, numFFTDataPoints, 
+                                      timePerFFT, dataTimestamp, 
+                                      
spectrumUpdateEvent->getDroppedFFTFrames());
     if( _openGLWaterfall3DFlag == 1 ){
-      _waterfall3DDisplayPlot->PlotNewData(_realFFTDataPoints, 
numFFTDataPoints, timePerFFT, dataTimestamp, 
spectrumUpdateEvent->getDroppedFFTFrames());
+      _waterfall3DDisplayPlot->PlotNewData(_realFFTDataPoints, 
numFFTDataPoints, 
+                                          timePerFFT, dataTimestamp, 
+                                          
spectrumUpdateEvent->getDroppedFFTFrames());
     }
   }
   
@@ -190,42 +199,70 @@
   SpectrumTypeTab->resize( e->size().width(), SpectrumTypeTab->height());
 
   // Tell the TabXFreqDisplay to resize
-  Tab1PlotDisplayFrame->resize(e->size().width()-4, 
Tab1PlotDisplayFrame->height());
-  Tab2PlotDisplayFrame->resize(e->size().width()-4, 
Tab2PlotDisplayFrame->height());
-  Waterfall3DPlotDisplayFrame->resize(e->size().width()-4, 
Waterfall3DPlotDisplayFrame->height());
-  TimeDomainDisplayFrame->resize(e->size().width()-4, 
TimeDomainDisplayFrame->height());
-  _frequencyDisplayPlot->resize( Tab1PlotDisplayFrame->width()-4, 
Tab1PlotDisplayFrame->height());
-  _waterfallDisplayPlot->resize( Tab2PlotDisplayFrame->width()-4, 
Tab2PlotDisplayFrame->height());
-  _waterfall3DDisplayPlot->resize( Waterfall3DPlotDisplayFrame->width()-4, 
Waterfall3DPlotDisplayFrame->height());
-  _timeDomainDisplayPlot->resize( TimeDomainDisplayFrame->width()-4, 
TimeDomainDisplayFrame->height());
+  Tab1PlotDisplayFrame->resize(e->size().width()-4, 
+                              Tab1PlotDisplayFrame->height());
+  Tab2PlotDisplayFrame->resize(e->size().width()-4,
+                              Tab2PlotDisplayFrame->height());
+  Waterfall3DPlotDisplayFrame->resize(e->size().width()-4, 
+                                     Waterfall3DPlotDisplayFrame->height());
+  TimeDomainDisplayFrame->resize(e->size().width()-4, 
+                                TimeDomainDisplayFrame->height());
+  _frequencyDisplayPlot->resize( Tab1PlotDisplayFrame->width()-4, 
+                                Tab1PlotDisplayFrame->height());
+  _waterfallDisplayPlot->resize( Tab2PlotDisplayFrame->width()-4, 
+                                Tab2PlotDisplayFrame->height());
+  _waterfall3DDisplayPlot->resize( Waterfall3DPlotDisplayFrame->width()-4, 
+                                  Waterfall3DPlotDisplayFrame->height());
+  _timeDomainDisplayPlot->resize( TimeDomainDisplayFrame->width()-4, 
+                                 TimeDomainDisplayFrame->height());
 
   // Move the IntensityWheels and Labels
-  WaterfallMaximumIntensityLabel->move(width() - 5 - 
WaterfallMaximumIntensityLabel->width(), WaterfallMaximumIntensityLabel->y());
-  WaterfallMinimumIntensityLabel->move(width() - 5 - 
WaterfallMinimumIntensityLabel->width(), WaterfallMinimumIntensityLabel->y());
-  WaterfallMaximumIntensityWheel->resize(WaterfallMaximumIntensityLabel->x() - 
5 - WaterfallMaximumIntensityWheel->x(), 
WaterfallMaximumIntensityWheel->height());
-  WaterfallMinimumIntensityWheel->resize(WaterfallMinimumIntensityLabel->x() - 
5 - WaterfallMinimumIntensityWheel->x(), 
WaterfallMinimumIntensityWheel->height());
+  WaterfallMaximumIntensityLabel->move(width() - 5 - 
WaterfallMaximumIntensityLabel->width(),
+                                      WaterfallMaximumIntensityLabel->y());
+  WaterfallMinimumIntensityLabel->move(width() - 5 - 
WaterfallMinimumIntensityLabel->width(),
+                                      WaterfallMinimumIntensityLabel->y());
+  WaterfallMaximumIntensityWheel->resize(WaterfallMaximumIntensityLabel->x() - 
5 -
+                                        WaterfallMaximumIntensityWheel->x(),
+                                        
WaterfallMaximumIntensityWheel->height());
+  WaterfallMinimumIntensityWheel->resize(WaterfallMinimumIntensityLabel->x() - 
5 -
+                                        WaterfallMinimumIntensityWheel->x(),
+                                        
WaterfallMinimumIntensityWheel->height());
 
-  Waterfall3DMaximumIntensityLabel->move(width() - 5 - 
Waterfall3DMaximumIntensityLabel->width(), 
Waterfall3DMaximumIntensityLabel->y());
-  Waterfall3DMinimumIntensityLabel->move(width() - 5 - 
Waterfall3DMinimumIntensityLabel->width(), 
Waterfall3DMinimumIntensityLabel->y());
-  
Waterfall3DMaximumIntensityWheel->resize(Waterfall3DMaximumIntensityLabel->x() 
- 5 - Waterfall3DMaximumIntensityWheel->x(), 
Waterfall3DMaximumIntensityWheel->height());
-  
Waterfall3DMinimumIntensityWheel->resize(Waterfall3DMinimumIntensityLabel->x() 
- 5 - Waterfall3DMinimumIntensityWheel->x(), 
Waterfall3DMinimumIntensityWheel->height());
+  Waterfall3DMaximumIntensityLabel->move(width() - 5 -
+                                        
Waterfall3DMaximumIntensityLabel->width(),
+                                        Waterfall3DMaximumIntensityLabel->y());
+  Waterfall3DMinimumIntensityLabel->move(width() - 5 -
+                                        
Waterfall3DMinimumIntensityLabel->width(),
+                                        Waterfall3DMinimumIntensityLabel->y());
+  
Waterfall3DMaximumIntensityWheel->resize(Waterfall3DMaximumIntensityLabel->x() 
- 5 -
+                                          
Waterfall3DMaximumIntensityWheel->x(),
+                                          
Waterfall3DMaximumIntensityWheel->height());
+  
Waterfall3DMinimumIntensityWheel->resize(Waterfall3DMinimumIntensityLabel->x() 
- 5 -
+                                          
Waterfall3DMinimumIntensityWheel->x(),
+                                          
Waterfall3DMinimumIntensityWheel->height());
 
 
   // Move the Power Lbl
-  PowerLabel->move(e->size().width()-(415-324) - PowerLabel->width(), 
PowerLabel->y());
+  PowerLabel->move(e->size().width()-(415-324) - PowerLabel->width(),
+                  PowerLabel->y());
 
   // Move the Power Line Edit
-  PowerLineEdit->move(e->size().width()-(415-318) - PowerLineEdit->width(), 
PowerLineEdit->y());
+  PowerLineEdit->move(e->size().width()-(415-318) - PowerLineEdit->width(),
+                     PowerLineEdit->y());
 
   // Move the Avg Lbl
-  AvgLabel->move(e->size().width()-(415-406) - AvgLabel->width(), 
AvgLabel->y());
+  AvgLabel->move(e->size().width()-(415-406) - AvgLabel->width(),
+                AvgLabel->y());
 
   // Move the Avg Line Edit
-  AvgLineEdit->move(e->size().width()-(415-400) - AvgLineEdit->width(), 
AvgLineEdit->y());
+  AvgLineEdit->move(e->size().width()-(415-400) - AvgLineEdit->width(),
+                   AvgLineEdit->y());
   
   // Move the FFT Size Combobox and label
-  FFTSizeComboBox->move(width() - 5 - FFTSizeComboBox->width(), 
FFTSizeComboBox->y());
-  FFTSizeLabel->move(width() - 10 - FFTSizeComboBox->width() - 
FFTSizeLabel->width(), FFTSizeLabel->y());
+  FFTSizeComboBox->move(width() - 5 - FFTSizeComboBox->width(),
+                       FFTSizeComboBox->y());
+  FFTSizeLabel->move(width() - 10 - FFTSizeComboBox->width() - 
FFTSizeLabel->width(),
+                    FFTSizeLabel->y());
 }
 
 

Modified: gnuradio/trunk/gr-qtgui/src/lib/spectrumdisplayform.ui
===================================================================
--- gnuradio/trunk/gr-qtgui/src/lib/spectrumdisplayform.ui      2009-02-28 
02:27:07 UTC (rev 10534)
+++ gnuradio/trunk/gr-qtgui/src/lib/spectrumdisplayform.ui      2009-02-28 
03:41:15 UTC (rev 10535)
@@ -5,7 +5,7 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>637</width>
+    <width>633</width>
     <height>436</height>
    </rect>
   </property>
@@ -157,6 +157,9 @@
      <height>380</height>
     </rect>
    </property>
+   <property name="currentIndex" >
+    <number>0</number>
+   </property>
    <widget class="QWidget" name="FrequencyPage" >
     <attribute name="title" >
      <string>Frequency Display</string>
@@ -355,7 +358,7 @@
       </property>
      </item>
     </widget>
-    <widget class="QwtWheel" name="WaterfallMaximumIntensityWheel" >
+    <widget class="QwtWheel" native="1" name="WaterfallMaximumIntensityWheel" >
      <property name="geometry" >
       <rect>
        <x>215</x>
@@ -370,19 +373,16 @@
      <property name="focusPolicy" >
       <enum>Qt::WheelFocus</enum>
      </property>
-     <property name="valid" >
+     <property name="valid" stdset="0" >
       <bool>true</bool>
      </property>
-     <property name="orientation" >
-      <enum>Qt::Horizontal</enum>
-     </property>
-     <property name="totalAngle" >
+     <property name="totalAngle" stdset="0" >
       <double>200.000000000000000</double>
      </property>
-     <property name="viewAngle" >
+     <property name="viewAngle" stdset="0" >
       <double>20.000000000000000</double>
      </property>
-     <property name="mass" >
+     <property name="mass" stdset="0" >
       <double>0.000000000000000</double>
      </property>
     </widget>
@@ -418,7 +418,7 @@
       <enum>QFrame::Plain</enum>
      </property>
     </widget>
-    <widget class="QwtWheel" name="WaterfallMinimumIntensityWheel" >
+    <widget class="QwtWheel" native="1" name="WaterfallMinimumIntensityWheel" >
      <property name="geometry" >
       <rect>
        <x>215</x>
@@ -427,19 +427,16 @@
        <height>24</height>
       </rect>
      </property>
-     <property name="valid" >
+     <property name="valid" stdset="0" >
       <bool>true</bool>
      </property>
-     <property name="orientation" >
-      <enum>Qt::Horizontal</enum>
-     </property>
-     <property name="totalAngle" >
+     <property name="totalAngle" stdset="0" >
       <double>200.000000000000000</double>
      </property>
-     <property name="viewAngle" >
+     <property name="viewAngle" stdset="0" >
       <double>20.000000000000000</double>
      </property>
-     <property name="mass" >
+     <property name="mass" stdset="0" >
       <double>0.000000000000000</double>
      </property>
     </widget>
@@ -528,7 +525,7 @@
       <string>Auto Scale</string>
      </property>
     </widget>
-    <widget class="QwtWheel" name="Waterfall3DMinimumIntensityWheel" >
+    <widget class="QwtWheel" native="1" 
name="Waterfall3DMinimumIntensityWheel" >
      <property name="geometry" >
       <rect>
        <x>215</x>
@@ -537,19 +534,16 @@
        <height>24</height>
       </rect>
      </property>
-     <property name="valid" >
+     <property name="valid" stdset="0" >
       <bool>true</bool>
      </property>
-     <property name="orientation" >
-      <enum>Qt::Horizontal</enum>
-     </property>
-     <property name="totalAngle" >
+     <property name="totalAngle" stdset="0" >
       <double>200.000000000000000</double>
      </property>
-     <property name="viewAngle" >
+     <property name="viewAngle" stdset="0" >
       <double>20.000000000000000</double>
      </property>
-     <property name="mass" >
+     <property name="mass" stdset="0" >
       <double>0.000000000000000</double>
      </property>
     </widget>
@@ -620,7 +614,7 @@
       </property>
      </item>
     </widget>
-    <widget class="QwtWheel" name="Waterfall3DMaximumIntensityWheel" >
+    <widget class="QwtWheel" native="1" 
name="Waterfall3DMaximumIntensityWheel" >
      <property name="geometry" >
       <rect>
        <x>215</x>
@@ -635,19 +629,16 @@
      <property name="focusPolicy" >
       <enum>Qt::WheelFocus</enum>
      </property>
-     <property name="valid" >
+     <property name="valid" stdset="0" >
       <bool>true</bool>
      </property>
-     <property name="orientation" >
-      <enum>Qt::Horizontal</enum>
-     </property>
-     <property name="totalAngle" >
+     <property name="totalAngle" stdset="0" >
       <double>200.000000000000000</double>
      </property>
-     <property name="viewAngle" >
+     <property name="viewAngle" stdset="0" >
       <double>20.000000000000000</double>
      </property>
-     <property name="mass" >
+     <property name="mass" stdset="0" >
       <double>0.000000000000000</double>
      </property>
     </widget>

Modified: gnuradio/trunk/gr-qtgui/src/python/qttest_c.py
===================================================================
--- gnuradio/trunk/gr-qtgui/src/python/qttest_c.py      2009-02-28 02:27:07 UTC 
(rev 10534)
+++ gnuradio/trunk/gr-qtgui/src/python/qttest_c.py      2009-02-28 03:41:15 UTC 
(rev 10535)
@@ -7,21 +7,31 @@
     def __init__(self):
         gr.top_block.__init__(self)
 
+        Rs = 8000
+        f1 = 1000
+        f2 = 2000
+
         fftsize = 2048
 
-        src1 = gr.sig_source_c(1, gr.GR_SIN_WAVE, 0.1, 0.01, 0)
-        src2 = gr.sig_source_c(1, gr.GR_SIN_WAVE, 0.015, 0.01, 0)
+        src1 = gr.sig_source_c(Rs, gr.GR_SIN_WAVE, f1, 0.1, 0)
+        src2 = gr.sig_source_c(Rs, gr.GR_SIN_WAVE, f2, 0.1, 0)
         src  = gr.add_cc()
         thr = gr.throttle(gr.sizeof_gr_complex, 20*fftsize)
-        self.snk = qtgui.sink_c(fftsize, gr.firdes.WIN_BLACKMAN_hARRIS, -0.5, 
0.5)
+        self.snk1 = qtgui.sink_c(fftsize, gr.firdes.WIN_BLACKMAN_hARRIS, 
-Rs/2, Rs/2)
+        self.snk2 = qtgui.sink_c(fftsize, gr.firdes.WIN_BLACKMAN_hARRIS, 
-Rs/2, Rs/2)
 
         self.connect(src1, (src,0))
         self.connect(src2, (src,1))
-        self.connect(src,  thr, self.snk)
+        self.connect(src,  thr, self.snk1)
+        self.connect(src1, self.snk2)
         
+        self.snk1.initialize()
+        qapp = self.snk1.get_qapplication()
+        self.snk2.initialize(qapp)
+
 if __name__ == "__main__":
     tb = my_top_block();
     tb.start()
-    tb.snk.start_app();
+    tb.snk1.start_app();
     #tb.wait();
     





reply via email to

[Prev in Thread] Current Thread [Next in Thread]