capsul.qt_apps module¶
Graphical applications. This section is normally not meant to be real function / class libraries but rather applications. There are a few widgets here, though, but it is not recommended to use them in custom applications.
capsul.qt_apps.main_window submodule¶
capsul.qt_apps.pipeline_viewer_app submodule¶
capsul.qt_apps.utils submodule¶
capsul.qt_apps.utils.application submodule¶
Classes¶
Application
¶
EmittingStream
¶
- class capsul.qt_apps.utils.application.Application(extra_options=None)[source]¶
Base Application class.
Used to set some user options
Method to initialize the Application class.
The capsulview application can be executed with command line options (that can also be passed to the class constructor as extra_options). From the command line, we can set the debug level with the -d option: * debug * info * warning * error * critical
For example: >>> capsulview -d debug
The default mode is error.
From the command line we can also redirect all messages to a graphical message box with the -r option: >>> capsulview -r
- Parameters:
extra_options (list (optional)) – some additional options that are not passed through the command line.
capsul.qt_apps.utils.fill_treectrl submodule¶
Functions¶
fill_treectrl()
¶
add_tree_nodes()
¶
- capsul.qt_apps.utils.fill_treectrl.add_tree_nodes(parent_item, menu, match, parent_module='')[source]¶
Add the menu to tree control if match in current module name or child modules.
The match is insensitive to the cast.
- Parameters:
parent_item (QTreeWidgetItem (mandatory)) – a tree control item where we want to insert the menu
menu (hierachic dict (mandatory)) – each key is a sub module of the module. Leafs contain a list with the url to the documentation.
match (str (mandatory)) – the string used to filter the menu items
parent_module (str (optional)) – the parent module string description (‘module.sub_module’)
- capsul.qt_apps.utils.fill_treectrl.fill_treectrl(treectrl, menu, match='')[source]¶
Fill a tree control with the different menu items.
This procedure is able to filter the menu items. Loadable pipelines appear in bold in the tree control. Insert three elements (current module name, url, parent module name) When the url and then parent module name are different from ‘None’ we have reached a leaf that contain a pipeline description.
- Parameters:
treectrl (QTreeControl (mandatory)) – the tree control where we want to insert the menu
menu (hierachic dict (mandatory)) – each key is a sub module of the module. Leafs contain a list with the url to the documentation.
match (str (optional)) – the string used to filter the menu items
Recursive search in tree.
The search procedure is insensitive to the cast.
- Parameters:
menu (hierachic dict (mandatory)) – each key is a sub module of the module. Leafs contain a list with the url to the documentation.
match (str (mandatory)) – the string used to filter the menu items
- Returns:
is_included – True if we found match in the tree, False otherwise.
- Return type: