def init_on_off_button(self, layout):
     btn('Start',
         layout, (0, 0),
         func_conn=self.start,
         color=dark_blue_tab,
         toggle=True,
         txt_color=white,
         min_width=100)
 def on_off_button(self):
     """Assign pushbutton for starting and stoping the stream"""
     btn('Start classification',
         self.layout, (0, 0),
         func_conn=self.start,
         color=dark_blue_tab,
         toggle=True,
         txt_color=white)
 def create_buttons(self, layout):
     """Assign pushbutton for starting"""
     btn('Start',
         layout, (0, 0),
         toggle=True,
         max_width=100,
         func_conn=self.main_eeg_dock.start_timers,
         color=dark_blue_tab,
         txt_color=white)
 def create_write_hardware_dock(self):
     write_hardware_d = InnerDock(
             self.layout, 'Write to hardware', b_pos=(0, 4), toggle_button=True,
             size=(1, 1), b_checked=True)
     self.write_hardware_l_e = QtGui.QLineEdit('x1040000X')
     write_hardware_d.layout.addWidget(self.write_hardware_l_e)
     btn('Write serial', write_hardware_d.layout,
         func_conn=self.send_byte_to_hardware, pos=(0, 1))
     self.dock_area.addDock(write_hardware_d.dock)
 def assign_n_to_ch(self, ch, ch_layout):
     ch_number_action = ChNumberAction(self.timers, ch)
     # +1 so the number str start at 1
     self.btn = btn(
             name=str(ch + 1), layout=ch_layout, pos=(0, 0),
             func_conn=ch_number_action.stop_ch, color=button_colors[ch],
             toggle=True, max_width=19, max_height=19,
             tip=f'Start/Stop the ch{ch+1} signal')
     self.btns.append(self.btn)
    def assign_action_to_ch(self, ch, ch_layout):
        max_width = 17
        max_height = 18
        # Average
        actn_btn = ActionButton(
                ch_layout, 0, self.gv, ch, conn_func='avg')
        btn('A', ch_layout, (0, 8), action=actn_btn,
                toggle=True, tip='Show average value of queue',
                max_width=max_width, max_height=max_height, color=dark_blue_tab,
                txt_color=white)
        # Max
        actn_btn = ActionButton(
                ch_layout, 1, self.gv, ch, conn_func='max')
        btn('M', ch_layout, (1, 8), action=actn_btn,
                toggle=True, tip='Show max value of queue',
                max_width=max_width, max_height=max_height, color=dark_blue_tab,
                txt_color=white)
        # Detection
        actn_btn = ActionButton(
                ch_layout, 2, self.gv, ch, conn_func='filter',
                plot_creator=self)
        btn('F',ch_layout, (2, 8), action=actn_btn,
                toggle=True, tip='''Show the size of the fft window on which
                the fft is calculated for all ch''', max_width=max_width,
                max_height=max_height, color=dark_blue_tab, txt_color=white)

        self.create_color_button(ch, ch_layout)
Esempio n. 7
0
 def create_button(self, main_layout, name):
     if self.b_orientation is not None:
         button = RotatedButton(
                 name, orientation=self.b_orientation)
         button.setMaximumWidth(20)
         button.setCheckable(True)
         button.clicked.connect(self.open)
         main_layout.addWidget(button, *self.b_pos)
     else:
         button = btn(
                 name, main_layout, self.b_pos, func_conn=self.open,
                 toggle=True, max_height=18, font_size=10)
         button.b.setChecked(self.b_checked)
Esempio n. 8
0
 def show_3D_viz_b(self, layout):
     btn('Show 3D',
         layout, (1, 0),
         func_conn=self.show_3D_viz,
         color=grey3,
         txt_color=white)