Friday, August 23, 2024

GNURadio Flowgraph Themes

Getting tired of the somewhat bland, bright white GNURadio Flowgraph GUI’s?

Did you know that you can change the runtime theme of GNURadio Flowgraphs? Read on to see how.

 

Basics

From the main GNURadio Companion menu select: Tools -> Set Default QT GUI Theme. Then a file picker will open with the four basic themes that are supplied with GNURadio (figure 1).

 Figure 1 - The four basic themes that are supplied with GNURadio. Also shown is the default path to the themes as installed by Radioconda on Windows [1].

Of the four themes, “plain.qss” is the basic bright white theme. The others are demonstrated below in figure 2.

 

 
alt.qss theme

 

 
dark.qss theme

 

 
projector.qss theme
 


Figure 2 - The three alternate themes that are supplied with GNURadio are demonstrated above.

 

Now For Something Completely Different

The alternatives to the standard GUI aren’t really all that compelling, are they?

Since QT is such a popular package and includes methods to change the theme easily, you can find other themes on the internet. One such repository is QSS Studio [2]. The QSS style sheets are similar to CSS format and are human readable ASCII text files.

After looking around the QSS Studio site, I found the interesting “adaptic.qss” theme. I downloaded the file, placed it with the other GNURadio default themes, chose it as the default, and figure 3 shows the results. It all works with no warnings or errors!

 Figure 3 - The QSS Studio Adaptic.qss theme is rather nice.

 

Theme Customization

The one thing that stands out to me from the adaptic theme is the FFT Trace colors. There are two ways to deal with this.

The First is: The trace colors can be overridden in the QT Frequency Sink widget itself.

The Second is: The qss theme file itself can be modified.

The QSS Studio files are naturally generic to all QT projects, whereas the GNURadio supplied QSS themes are more specific to GNURadio supplied widgets.

For instance, the GNURadio QT Frequency Sink widget is in a section called: “FrequencyDisplayPlot” in the GNURadio supplied QSS themes. You can copy that section and paste it to the end of any QSS Studio theme file. That way the Frequency Display Plot specific customization's can be overridden again when the theme is read in at runtime. By looking through these customization's, you can get an idea of what to change to modify the appearance of any specific GNURadio widget item.

You can comment out unused items or blocks of text in a qss file using old style C comments like,

/* comment in here */


Bonus

You can also set a "Per Flowgraph" theme in the Flowgraph Options Block as shown in figure 4. The only glitch in this is currently in GNURadio 3.10.10 the disalog box does not open up to the standard themes directory, but on my Windows system it opens to the Documents folder. No matter, the standard Themes location was discussed above, just navigate there.

Figure 4 - You can set a Theme for just the current Flowgraph by adding a link in the Flowgraphs Options Property Box as shown here.


Summary

It is very easy to get your own custom GNURadio runtime theme by going to QSS Studio or other sites for standard QT Themes and then just modifying those few items to bring the GNURadio specific items that may need tweaked.

 

References

[1] Radioconda Installer: https://github.com/ryanvolz/radioconda/

[2] QT Style Sheet References: https://qss-stock.devsecstudio.com/



No comments:

Post a Comment