GUI¶
Graphic interface to launch analyses
Main Window¶
Filter/group sessions¶
Display metadata¶
Analysises list¶
- class cicada.gui.cicada_analysis_tree_gui.AnalysisTreeApp(parent, config_handler, analyses_instances, to_parameters_button=None)[source]¶
- create_tree_model()[source]¶
Create the tree model Returns: the tree model, an instance of QAnalysisTreeModel
- doubleClickedItem(idx)[source]¶
Method called when the user double click in the tree :param idx: Index of the branch clicked
Returns:
- load_arguments_parameters_section()[source]¶
Used to load the parameters section with widgets, based on the current selection in the tree. If the selection is not on any valid tree item, nothing will happen Returns: None
- set_data(data_to_analyse, data_format)[source]¶
Give to the tree the data that the analysis classes will be given to analyze. Allows the tree to inactivate the analyses for which the data don’t fulfill the requierements :param data_to_analyse: a list of data in a given format (could be nwb or other) :param data_format: format of the data, must be a string. So far only “nwb” is supported
Returns: None
- class cicada.gui.cicada_analysis_tree_gui.QAnalysisTreeModel(tree_item, parent=None)[source]¶
- class cicada.gui.cicada_analysis_tree_gui.QAnalysisTreeView(tree_item, config_handler, parent=None)[source]¶
- cicada.gui.cicada_analysis_tree_gui.fill_tree_item_with_dict(root_tree, instances_dict)[source]¶
Recursive function that fills the root_tree according to data in instances_dict. :param root_tree: instance of TreeItem :param instances_dict: Contains instance of cicada_analysis, in a hierarchy similar to the one we want the tree to be :return:
Overview of analysises¶
- class cicada.gui.cicada_analysis_overview.AnalysisOverview(config_handler, parent=None)[source]¶
Class containing the overview linked to an analysis
- add_analysis_overview(cicada_analysis, analysis_id, obj)[source]¶
Add widgets to track the corresponding analysis :param cicada_analysis: CicadaAnalysis instance :type cicada_analysis: CicadaAnalysis :param analysis_id: Randomly generated ID linked to the analysis :type analysis_id: str :param obj: The analysis window’s object itself :type obj: object
- class cicada.gui.cicada_analysis_overview.AnalysisState(analysis_id, cicada_analysis, parent=None, without_bringing_to_front=False)[source]¶
Class containing the name of the analysis and the subjects analysed
Analysis parameters¶
- class cicada.gui.cicada_analysis_parameters_gui.AnalysisData(cicada_analysis, arguments_section_widget, config_handler, parent=None)[source]¶
- class cicada.gui.cicada_analysis_parameters_gui.AnalysisPackage(cicada_analysis, analysis_name, name, main_window, config_handler, parent=None)[source]¶
Widget containing the whole analysis window
- bring_to_front(window_id, event)[source]¶
Bring corresponding window to the front (re-routed from the double click method)
- Parameters
window_id (QWidget) – Analysis Widget object
event (QEvent) – Double click event
- class cicada.gui.cicada_analysis_parameters_gui.AnalysisParametersApp(thread_name, progress_bar, analysis_name, config_handler, parent=None)[source]¶
Class containing the parameters widgets
- create_widgets(cicada_analysis)[source]¶
- Parameters
cicada_analysis (CicadaAnalysis) – Chosen analysis
- load_arguments()[source]¶
Will open a FileDialog to select a yaml file used to load arguments used for a previous analysis
- run_analysis()[source]¶
Check if the parameters are valid and then create a thread which will run the analysis
- class cicada.gui.cicada_analysis_parameters_gui.CheckBoxWidget(analysis_arg, parent=None)[source]¶
Used to set a boolean value
- class cicada.gui.cicada_analysis_parameters_gui.ColorDialogWidget(analysis_arg, show_alpha_channel, parent=None)[source]¶
Widget used to select a color
- set_value(value)[source]¶
- Parameters
value – a list or tuple of 3 or 4 float between 0.0 to 1.0, RGB or RGBA values, the A representing the alpha
Returns:
- class cicada.gui.cicada_analysis_parameters_gui.ComboBoxWidget(analysis_arg, parent=None)[source]¶
- add_multiple_combo_boxes(session_id, choices_dict, legends, index)[source]¶
Allows to add multiple combo boxes, each changing the content of the next one for on given session_id :param session_id: :param choices_dict: each key represent a content to put in the list and the value could be either None, either :param another dict which keys will be the content of the next ComboBox etc… or instead of a dict as value it: :param could be a list that will define the content.: :param legends: :param index:
Returns:
- class cicada.gui.cicada_analysis_parameters_gui.EmittingErrStream(parent=None)[source]¶
Class managing the std.err redirection
- class cicada.gui.cicada_analysis_parameters_gui.EmittingStream(parent=None)[source]¶
Class managing the std.out redirection
- class cicada.gui.cicada_analysis_parameters_gui.FileDialogWidget(analysis_arg, directory_only, extensions=None, parent=None)[source]¶
Create a widget that will contain a button to open a FileDialog and a label to display the file or directory choosen A label will also explain what this parameter do
- get_value()[source]¶
Return the argument
- Returns
Dictionary with the set value
- Return type
result_dict (dict)
- class cicada.gui.cicada_analysis_parameters_gui.FinalMeta(name, bases, namespace, **kwargs)[source]¶
- class cicada.gui.cicada_analysis_parameters_gui.FloatLineEditWidget(analysis_arg, parent=None)[source]¶
- class cicada.gui.cicada_analysis_parameters_gui.GroupElements(group_widget, group_name, group_elements, grid_layout, with_color=False, default_color=None)[source]¶
Used by GroupsFromCheckboxesWidget to display groups content with the possibility to remove one
- get_color()[source]¶
Returns: a tuple of 4 floats representing RGBA with values from 0.0 to 1.0, or None if no color is define
- class cicada.gui.cicada_analysis_parameters_gui.GroupsFromCheckboxesWidget(analysis_arg, choices_attr_name, with_color=False, add_custom_group_field=False, custom_group_validation_fct=None, custom_group_processor_fct=None, parent=None)[source]¶
Display multiple choice that can be selected individually or as group to create new instances. There is also a text field to select all items based on their content (string). Option for a text field allowing to name elements that composed the group, without being in the list
- get_value()[source]¶
Returns: a dict with key is a string representing the group and value is a list with first a list with the elements of the group (strings), and second a color (a tuple of 4 floats representing RGBA with values from 0.0 to 1.0, or None if no color is define)
- set_value(value)[source]¶
Set the value. :param value: value is a dict with key is a string representing the group and value is a list with first a list
with the elements of the group (strings), and second a color (a tuple of 4 floats representing RGBA with values from 0.0 to 1.0, or None if no color is define) Returns: None
- class cicada.gui.cicada_analysis_parameters_gui.ListCheckboxWidget(analysis_arg, choices_attr_name, parent=None)[source]¶
Allows multiple choices
- select_all(session_id)[source]¶
select all items :param session_id: None or session of which select items :return:
- set_value(value)[source]¶
Set the value. :param value: value is either a string or integer or float, or a list. If a list, then item whose value matches :param one of the elements in the list will be checkeds:
Returns: None
- class cicada.gui.cicada_analysis_parameters_gui.MyFileDialogQButton(key_name, file_dialog, file_dialogs_dict, parent=None)[source]¶
Special button for opening file dialog
- class cicada.gui.cicada_analysis_parameters_gui.MyQComboBox[source]¶
Special instance of ComboBox allowing to handle change so that it is connected to other combo_boxes
- class cicada.gui.cicada_analysis_parameters_gui.MyQFrame(analysis_arg=None, parent=None, with_description=True)[source]¶
- class cicada.gui.cicada_analysis_parameters_gui.MySelectButton(parent, title, tooltip_text, select_all=False, session_id=None)[source]¶
- class cicada.gui.cicada_analysis_parameters_gui.ProgressBar(remaining_time_label, parent=None)[source]¶
Class containing the progress bar of the current analysis
- update_progress_bar(time_elapsed, increment_value=0, new_set_value=0)[source]¶
Update the progress bar in the analysis widget and the corresponding remaining time :param time_elapsed: Time elepased since beginning of analysis, in seconds :type time_elapsed: float :param increment_value: Value that should be added to the current value of the progress bar :type increment_value: float :param new_set_value: Value that should be set as the current value of the progress bar :type new_set_value: float
Returns:
- class cicada.gui.cicada_analysis_parameters_gui.RemainingTime(parent=None)[source]¶
Class containing the remaining time of the analysis
- static correct_time_converter(time_to_convert)[source]¶
Convert a float in a correct duration value :param time_to_convert: Float value representing seconds to be converted in a correct duration with MM.SS :type time_to_convert: float
- Returns
String of the correct duration
- Return type
time_text (str)
- update_remaining_time(progress_value, time_elapsed, done=False)[source]¶
Update the remaining time :param progress_value: Current progress bar value :type progress_value: float :param time_elapsed: Time elepased since the beginning of the analysis (in sec) :type time_elapsed: float :param done: True if the analysis is done and false if still running :type done: bool
- class cicada.gui.cicada_analysis_parameters_gui.SameFamilyWidgetsContainer(widgets, parent=None)[source]¶
A QFrame used to group widgets that belongs to a same group. Just useful for visual purposes
- class cicada.gui.cicada_analysis_parameters_gui.SliderWidget(analysis_arg, parent=None)[source]¶
Used to set a numerical value
- class cicada.gui.cicada_analysis_parameters_gui.Worker(name, cicada_analysis, analysis_arguments_handler, parent)[source]¶
Thread to manage multiple analysises at the same time