Workflow that brings together a few modules as tabs in a unifying parent module.

(Jean Christophe Fillion Robin) #21

Agreed. The next set of commits should enable that.

(Jean Christophe Fillion Robin) #22

In addition of supporting Slicer --designer where the Slicer launcher is available, the cross-platform approach to start Qt designer is to run SlicerDesigner executable found in the bin directory.

It was needed to configure a launcher because on macOS it is not possible to run ./Slicer --designer from an install tree.

Based on tomorrow nightly build, we may have to tweak the packaging of designer on Windows and macOS. After this is tested, we will initiate the 4.10.1 release process.

(Adam Rankin) #23

Just an FYI to all, I have recently stumbled upon this issue.

I will work on a fix, but until then, the slicer.util.loadUI() approach can’t load re-usable widgets from extensions.

(Normand Robert) #24

Looking at someone else’s code and noticed that they use ScriptedLoadableModuleWidget.setup(self). If one starts from the python generated module template this function is not called and the template instead has code to produce a reload button reload and test button and connections and a method to reload modules.

(Steve Pieper) #25

The older templates included the developer section, but now they use the superclass:

Is that not working?

(Normand Robert) #26

I ran the script more than a year ago. Could be my fault. Will check.

(Normand Robert) #27

Yep I was using a template I generated too long ago…

(Normand Robert) #28

I have thinking about UI reuse a bit more (as opposed to logic reuse). Do you all agree that it is just a case of putting all the UI stuff in a new class… let’s call it ModuleNameWidgetUI with some constructor expecting a layout whereby said class is also designed so that MRML node(s) can be “passed in” and for each MRML “passed in” the node selection widget is not created and the “passed in” value is used instead?

(Andras Lasso) #29

The current design is that each module offers a number of reusable widgets. The module widget is built up a couple of these widgets. This results in much simpler design and more clean interfaces than trying to make a large monolithic module widget highly configurable with lots of options.

Some module widgets may contain sections that are not available directly as reusable widgets (we did not have the extra time to do that or did not think that there would be a strong need for it). If you want to reuse such sections in your module then the solution is to factor out those parts as a separate widget - as it has been done several times in the past.