def create_settings_dock(self): settings_d = InnerDock(self.layout, 'Settings', toggle_button=True, size=(1, 1)) self.init_on_off_button(settings_d.layout) create_param_combobox(settings_d.layout, 'Max Freq', (0, 1), ['Auto', '60 Hz', '80 Hz', '100 Hz', '120 Hz'], partial(self.scale_axis, axis_name='x')) create_param_combobox(settings_d.layout, 'Max Uv', (0, 2), [ 'Auto', '1000 uv', '10000 uv', '100000 uv', '1000000 uv', '10000000 uv' ], partial(self.scale_axis, axis_name='y')) create_param_combobox(settings_d.layout, 'Log', (0, 3), ['False', 'True'], self.log_axis) create_param_combobox(settings_d.layout, 'Filter', (0, 4), ['No filter', 'Bandpass', 'Bandstop', 'Both'], self.show_filter) self.combo_to_filter = { 'No filter': [], 'Bandpass': ['bandpass'], 'Bandstop': ['bandstop'], 'Both': ['bandpass', 'bandstop'] } create_param_combobox( settings_d.layout, 'Ch On', (0, 5), ['ch 1', 'ch 2', 'ch 3', 'ch 4', 'ch 5', 'ch 6', 'ch 7', 'ch 8'], self.ch_on_off, editable=False) self.dock_area.addDock(settings_d.dock, 'top')
def add_pin_settings_to_layout(self, layout): self.gr, self.ch_layout = create_gr() for i, (s_name, s) in enumerate(self.settings.items()): create_param_combobox(self.ch_layout, None, (i % 5, i // 5), s, conn_func=partial( self.change_hardware_settings, s_name), editable=False, tip=s_name) layout.addWidget(self.gr, self.ch, 0)
def init_modify_curve_layout(self): settings_d = InnerDock(self.layout, 'Settings', toggle_button=True, size=(1, 1)) # Stop/Start button self.init_on_off_button(settings_d.layout) # modify_curve_gr, modify_curve_layout = create_gr() create_param_combobox( settings_d.layout, 'Ch to move', ( 0, 1, 1, 1 ), # TODO: ALEXM: change to have a hboxlayout instead of a qboxlayout [str(ch + 1) for ch in range(self.gv.N_CH)], self.change_pos_and_angle_of_signal, cols=1, editable=False) # Position pos_l = create_txt_label('Position') settings_d.layout.addWidget(pos_l, 0, 2, 1, 3) self.triplet_box = TripletBox(self.gv, name='position', col=2, layout=settings_d.layout, colors=(blue_plane, green_plane, red_plane)) # Angle angle_l = create_txt_label('Angle') settings_d.layout.addWidget(angle_l, 0, 5, 1, 3) self.triplet_angle = TripletBox(self.gv, name='angle', col=5, layout=settings_d.layout, colors=(blue_plane, green_plane, red_plane)) # Save to file DataSaver( self.gv.main_window, self.gv, settings_d.layout, # TODO: ALEXM: Add a tooltip saving_type='Save', pos=(0, 8), size=(1, 1), save_file_button=True, choose_b_size=(1, 1)) # return modify_curve_layout, modify_curve_gr self.show_3D_viz_b(settings_d.layout) self.dock_area.addDock(settings_d.dock)
def create_all_combobox(self, start_stop_l): create_param_combobox( start_stop_l, 'Vertical scale', (0, 1), ['Auto', '10 uv', '100 uv', '1000 uv', '10000 uv', '100000 uv'], conn_func=self.main_eeg_dock.scale_y_axis) create_param_combobox(start_stop_l, 'Horizontal scale', (0, 2), ['5s', '7s', '10s'], editable=False) create_param_combobox( start_stop_l, 'Nb of columns', (0, 3), ['1', '2', '4'], editable=False, conn_func=self.main_eeg_dock.change_num_plot_per_row) create_param_combobox(start_stop_l, 'Aliasing', (0, 4), ['on', 'off'], editable=False, conn_func=self.start_aliasing)