for the selected widget are listed the relative signals for each signal there is a dropdown containing all the widgets the user will select the widget that have to listen a specific event
(self, widget, widget_tree)
| 290 | self.build_widget_list_from_tree(child) |
| 291 | |
| 292 | def update(self, widget, widget_tree): |
| 293 | """ for the selected widget are listed the relative signals |
| 294 | for each signal there is a dropdown containing all the widgets |
| 295 | the user will select the widget that have to listen a specific event |
| 296 | """ |
| 297 | self.listeners_list = [] |
| 298 | self.build_widget_list_from_tree(widget_tree) |
| 299 | |
| 300 | self.label.set_text('Signal connections: ' + widget.variable_name) |
| 301 | #del self.container |
| 302 | self.container = gui.VBox(width='100%', height='90%') |
| 303 | self.container.style['justify-content'] = 'flex-start' |
| 304 | self.container.style['overflow-y'] = 'scroll' |
| 305 | |
| 306 | # for all the events of this widget |
| 307 | # isclass instead of ismethod because event methods are replaced with ClassEventConnector |
| 308 | for (setOnEventListenerFuncname, setOnEventListenerFunc) in inspect.getmembers(widget): |
| 309 | # if the member is decorated by decorate_set_on_listener and the function is referred to this event |
| 310 | if issubclass(type(setOnEventListenerFunc), gui.ClassEventConnector): |
| 311 | self.container.append(SignalConnection(widget, |
| 312 | self.listeners_list, |
| 313 | setOnEventListenerFuncname, |
| 314 | setOnEventListenerFunc, |
| 315 | width='100%')) |
| 316 | |
| 317 | self.append(self.container, 'container') |
| 318 | |
| 319 | |
| 320 | class ProjectConfigurationDialog(gui.GenericDialog): |
nothing calls this directly
no test coverage detected