discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] QT widget to adjust integer values on the fly


From: Tom Rondeau
Subject: Re: [Discuss-gnuradio] QT widget to adjust integer values on the fly
Date: Wed, 18 Mar 2015 12:06:53 -0400

On Wed, Mar 18, 2015 at 11:58 AM, Murphy, John <address@hidden> wrote:
I have a GRC flowgraph that includes a custom C++ block which dumps
custom vectors out a port, so I use the QT GUI Vector Sink to display
these.
The block also requires integer params which I need to adjust while
the flowgraph is running.

I have a problem, because as near as I can tell...
a) QT GUI Entry (and QT GUI Label) only display the value, changes the
user makes to QT GUI Entry while the flowgraph is running do not seem
to be propogated to the flowgraph block params that use the required
variable names - which unless I am mistaken here (possible) makes me
wonder what the point of the Entry is vs the Label - if this is
incorrect please let me know and I would like to investigate why I do
not see this happening on my flowgraphs
b) QT GUI Range seems to always output float values, there is no way
that I see to set the output type to handle integers, so when I try to
change the value and it is passed to an integer block param swig(?)
generates a runtime TypeError and the value does not actually change
in the block (although it seems to work fine for float params)

We can look into adding the formatter option to this block -- we're working on updating it soon, anyways, to remove the use of PyQWT.

In the meantime, you can cast it yourself when you use it. Say your Range block variable is "var", when you pass it to a block, say "int(var)" to cast it to an integer.

Just remember that all of the edit boxes for parameters in GRC are Python, so you can put a Python _expression_ in them as you need.

Tom


 
c) I want to use the QT option for the GUI because WX, while it has a
Slider and Text Box that appear to have formatting options to provide
integers(?), does not seem to have something akin to the QT GUI Vector
Sink that is so incredibly useful.

Programming GUI widgets or graphical sinks is not something I wish to
tackle at this stage.

Can someone recommend an apporach to handling this?

I could just make all the integer params into floats (and convert them
inside the custom block C++ code) as a workaround, but I am hoping GRC
has a better way to handle this.

Thanks

_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


reply via email to

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