Sneak-peek: Widget support in PothosGui

What you are looking at is a screenshot of PothosGui embedding live QWidgets into the topology designer. Notice the slider block with its value changed signal connected to the amplitude slot on the waveform source. The slider QWidget depicted to the right is the corresponding QWidget from the slider block. The widget can be moved around the topology designer and even sent to another editor page. Also notice the time domain plot block consuming the input stream. Its corresponding QWidget is shown directly below the slider. TL;DR: I can drag the slider and watch the amplitude of the sinusoid change on the plot.

A diamond in the rough

Its not beautiful yet. I did the most minimal thing possible to get the time plotter to display something. And the drag/resize handles for the widgets could be seriously better looking. But its all about what is there.

  • Arbitrary widgets embedded in the topology designer
  • Any Pothos block can have an associated QWidget
  • The slider widget interfaces with Pothos signals/slots
  • The plotter widget interfaces with Pothos streams

Some additional coolness

The block's containing the QWidgets absolutely have to be instantiated in the same process as the GUI. Thats the only way that we can display them. However, the other blocks in the topology are automatically affinitized to another process, specifically to avoid crashing the GUI in the event of a segfault/abort/anything that kills the process.

So, what happened? The Pothos::Topology automatically inserted network IOgress blocks into the topology to connect the blocks within the different processes. The following is a debug graph of the flattened topology thats actually running the design:

Hopefully more great things to come!

Last edited: Thu, Aug 14 2014 - 06:25AM