view_controller module

class package.views.view_controller.ViewController

Bases: object

ViewController contains the event listeners for each widget.

create_channel_dict()

Read current channel names from LSL and return a dictionary. :return: channel name dictionary

keyPressEvent(event)

Event listeners for different key button pressed Example: When there is a channel name been typed in channel names box in Sub channel manager in

Oscilloscope, and change scale is checked, pressing up and down button will increase and decrease that channels’ scale respectively

onActivated_checkbox_bandpass()

Event listener for check box in front of Bandpass filter in Oscilloscope tab. Check to bandpass filter displayed signal.

onActivated_checkbox_car()

Event listener for check box in front of CAR filter in Oscilloscope tab. Apply Common Average Reference filter to displayed data if checked.

onActivated_checkbox_notch()

Event listener for check box in front of notch filter in Oscilloscope tab. Check to notch filter displayed signal.

onActivated_combobox_scale()

Event listener for scale of data in Scale Manager of Oscilloscope tab

onClicked_button_Main_switch(pressed)

Event listener for main switch down the experimenter GUI

onClicked_button_bad_epoch()

Event listener for bad epoch button in Online Experimente tab Record bad epochs during the experiment, the bad epoch number will be saved to Run1/bad_epochs.csv :return:

onClicked_button_bp()

Event listener for Apply BP button in Filter Manager in Oscilloscope tab Apply BPF to displaying data

onClicked_button_create_sequence()

Event listener for create sequence button in Experimental Protocol tab. The listed tasks will be iterated ‘group number’ times in the Task table

onClicked_button_define_task_add()

Event listener for Add button in Task manager in Experimental Protocal tab

onClicked_button_define_task_done()

Event listener for Done button in Task manager in Experimental protocol tab. By clicking Done button, no more new tasks could be added.

onClicked_button_notch()

Event listener for Apply Notch in Filter Manager in Oscilloscope tab Apply notch filter to displaying data

onClicked_button_randomize()

Event listener for Randomize button in Experimental protocol Randomize the order of tasks in Task table

onClicked_button_rec(pressed)

Start the recording when recording button been clicked

onClicked_button_save_event_number()

Event listener for save button in Event and File Management tab. Save task name and event number to Run1/event.csv

onClicked_button_save_protocol()

Event listener for Save current protocol button in Experimental protocol tab. Save task table to a csv file.

onClicked_button_save_subject_information()

Event listener for ‘save’ button on subject information tab. The subject information typed in GUI will be saved to subject.txt

onClicked_button_scope_switch(pressed)
onClicked_button_start_SV()

Event listener for task button

onClicked_button_temp_clear()

Event listener for Clear button in Online Experiment tab Clear MRCP plot

onClicked_button_temp_mean()

Event listener for Mean button in Online Experiment tab Calculate mean of all templates

onClicked_button_temp_remove()

Event listener for Remove button in Onlin Experiment tab. Remove selected trials

onClicked_button_temp_view()

Event listener for View button in Online Experiment tab. View selected trials

onClicked_button_test()
onClicked_button_train()
onClicked_button_update_channel_name()

Update channel name by double clicking channel name in channel manager and click update channel name to update them in Oscilloscope

onClicked_experimental_protocol_finish()

Event listener for Finish button in experimental protocol tab. Disable all inputs in this tab and save Task table into variable to be used for generating tasks.

onClicked_toolButton_choose_image_task()

Event listener for three dot button next to choose image for task in Experiment Protocal tab

onClicked_toolButton_choose_sound_task()

Event listener for three dot button next to choose sound for task in Experiment Protocal tab

onClicked_toolButton_load_protocol()

Event listener for load exp. protocol button Open folder to choose existing experimental protocol files

onDoubleClicked_channel_table()
onSelectionChanged_table()

Update highlighted channels in Channel Manager when different channels are selected

onValueChanged_spinbox_time()

Event listener for spinbox of time in Scale Manager of Oscilloscope tab