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:
capsul.qt_apps.utils.find_pipelines submodule¶
Functions¶
find_pipelines_from_description()
¶
find_pipeline_and_process()
¶
lists2dict()
¶
- capsul.qt_apps.utils.find_pipelines.find_pipeline_and_process(module_name)[source]¶
Function that return all the Pipeline and Process classes of a module.
All the mdoule path are scanned recuresively. Any pipeline or process will be added to the output.
- capsul.qt_apps.utils.find_pipelines.find_pipelines_from_description(module_name, url=None)[source]¶
Function that list all the pipeline of a module.
- Parameters:
- Returns:
structured_pipelines (hierachic dict) – each key is a sub module of the module. Leafs contain a list with the url to the documentation.
pipelines (list) – a list a pipeline string descriptions.
- capsul.qt_apps.utils.find_pipelines.lists2dict(list_of_pipeline_description, url, d)[source]¶
Convert a list of split module names to a hierarchic dictionary with list leafs that contain the url to the module documentation.
- Parameters:
- Returns:
d – each key is a sub module of the module. Leafs contain a list with the url to the documentation.
- Return type:
hierachic dict