discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Changing GUI structure on the fly


From: Marcus Müller
Subject: Re: [Discuss-gnuradio] Changing GUI structure on the fly
Date: Wed, 2 Sep 2015 17:50:39 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0

Hi Przemek,

this might leave the kind of things that you can "easily" do with the GUI tools in the GNU Radio companion. If you want to keep things in the GRC, I'd recommend using different taps for the different groups of widgets.
Basically, if you use the QT GUI stuff, you should be able to integrate the GUI tools into an Qt application that you might design with Qt Creator etc. I must admit that I haven't tried to build complex GUI applications with GR myself, so I can only point you to what I guess needs to be done, based on what I did a while back myself with something not-GR related:

* build your flow graph with QtGUI visualizations; generate the python file. Open that file.
* comment out all the GUI building stuff, ie. all after self.setWindowTitle(...) and before self.settings=...
* build your GUI with QtCreator (Qt4, not 5!)[1]; add one of the Layouts (e.g. QHBoxLayout, by dragging "Horizontal Layout" onto your form) for your visualizations. Save.
* Use pyuic4 to convert the .ui file to a python module. You'll get a class with a setupUi method
* import that module in your python file. Instantiate the class, e.g. myForm = Ui_Form()
* set up the GUI by doing myForm.setupUi(self) where you formerly commented out the GUI building stuff
* find the places where "addWidget" was generated by GRC. Replace the things to which your QtWidgets are added by the appropriate Layout/Container instances from your Qt Form (e.g. the name of your QHBoxLayout above)
* hope for the best :)

Maybe someone who actually did more work with PyQT can comment on this.

Best regards,
Marcus


[1] creating the form should look something like:
Form creation dialog
On 02.09.2015 16:53, Przemek Lewandowski wrote:
Hello 

I have a question: I have to program one application, that will switch between about 20 modulations.
With 20 modulations, program will have a lot of parameters to change, so GUI needs to change during runtime. 

Is it possible to do somethink like that ??
Are there any design patterns for problem like this ?

Many thanks
Przemek Lewandowski


_______________________________________________
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]