discuss-gnuradio
[Top][All Lists]
Advanced

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

RE: [Discuss-gnuradio] QT Gui Sink


From: Mike Cornelius
Subject: RE: [Discuss-gnuradio] QT Gui Sink
Date: Tue, 5 Apr 2011 20:58:55 +1000

Hi Philip,

As Marcus and Tom have noted the SetUpdateTime() method can be used to set
the display update time (but not the FFT calculation rate, which I think is
what you want).

As this method is a slot it is possible to call it from your application
without any mods to the QT Gui sink, here's a simple example of how to do
it:-

In pyqt_example.py 

def __init__(self, display, control):
        QtGui.QWidget.__init__(self, None)
      self.setWindowTitle('PyQt Test GUI')

      self.boxlayout = QtGui.QBoxLayout(QtGui.QBoxLayout.LeftToRight, self)
      self.boxlayout.addWidget(display, 1)
      self.boxlayout.addWidget(control)

      self.resize(800, 500)

        # 
        # Change update rate to 1 second
        #
        self.connect(self, QtCore.SIGNAL("SetUpdateTime(double)"),
                display, QtCore.SLOT("SetUpdateTime(double)"))

        self.emit(QtCore.SIGNAL("SetUpdateTime(double)"), 1)

I'm not sure if that's helpful in your case however it may be interesting as
the same technique can be used for any of the slots in spectrumdisplayform.h

BR,

Mike VK2XMC





> -----Original Message-----
> From: address@hidden
> [mailto:address@hidden On Behalf Of
> Marcus D. Leech
> Sent: Monday, 4 April 2011 1:57 AM
> To: address@hidden
> Subject: Re: [Discuss-gnuradio] QT Gui Sink
> 
> On 04/02/2011 08:11 AM, Philip Balister wrote:
> > Is there a way to control the update rate on the QT Gui sink? I have
> > it running on the E100, but it would be helpful if I could slow down
> > the update rate.
> >
> > Philip
> >
> > _______________________________________________
> > Discuss-gnuradio mailing list
> > address@hidden
> > http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
> >
> >
> There's a set_update_time() method, but it's not exported through
> SWIG.    The default is 0.1second.
> 
> 
> 
> --
> Marcus Leech
> Principal Investigator
> Shirleys Bay Radio Astronomy Consortium
> http://www.sbrac.org
> 
> 
> 
> _______________________________________________
> Discuss-gnuradio mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/discuss-gnuradio




reply via email to

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