4.3.9. Multiple Widgets

Adding a second widget to the library can be done by following these instructions.

widgets

A new hpp header file and a new widget implementation cpp. Remember to define the interface of the widget using properties, signals and slots.

plugin

Add a new header hpp file for the plugin, and an implementation. Remember the workaround for includeFile() method. Another modification is needed in the Collection class: you need to add to the m_widgets member list the new widget plugin.

showcase

At this point you can add the widget using drag and drop. Remember to create entries for the new properties, and connect them to the new widget.

bindings

Add to the bindings.xml the new class. Remember to add special event handling if you have introduce overriden methods. Modify the wscript to include in src and target files the new cpp files for the bound python class.

showcasepy

At this point you can add the widget using drag and drop. Remember to create entries for the new properties, and connect them to the new widget.

taurus

Create a new python module, and create the TaurusController and TaurusWidget new classes.

In any case, no new WAF modules are needed, since every module already deliver artefacts that consider multiple possible widgets.