def __init__(self, parent, buttons, row, column, **kwargs): Frame.Frame.__init__(self, parent, c.TEST_TAB, row, column, **kwargs) self.addChildWidgets( (OptionMenu.TargetChoosingMenu(self.widget, c.TEST_TARGET, 0, 1, (c.TEST_NONE, c.TEST_RANDOM), columnspan=2), Textboxes.ColorTextboxFrame(self.widget, c.TEST_COLOR, 0, 3, default_value="#ffffb3"), OptionMenu.TargetChoosingMenu(self.widget, c.TEST_STANDBY, 1, 1, (c.TEST_NONE, ), columnspan=2), Textboxes.LabelTextbox(self.widget, c.TEST_TIME, 2, 0, command=int, default_value=1, default_disability=True, default_disablers=[c.TEST_UNLIMITED]), Checkbutton.Checkbutton(self.widget, c.TEST_UNLIMITED, 2, 2, columnspan=2, command=self.enableTime, default_value=1), ResultsFrame(self.widget, buttons, 4, 0, columnspan=4), IdentificationOptionsFrame(self.widget, 5, 0, columnspan=4)))
def __init__(self, parent, name, disabled, row, **kwargs): Frame.Frame.__init__(self, parent, name, row, 0, padx=0, pady=0, **kwargs) self.addChildWidgets(( Checkbutton.Checkbutton(self.widget, name, 0, 0, command=self.enableTextboxes, default_value=not disabled), Textboxes.Textbox( self.widget, c.HARMONIC_WEIGHT, 0, 1, default_disability=disabled, default_disablers=self.getDefaultDisabler(disabled), allow_zero=True), Textboxes.Textbox( self.widget, c.HARMONIC_DIFFERENCE, 0, 2, default_disability=disabled, default_disablers=self.getDefaultDisabler(disabled), allow_zero=True), ))
def __init__(self, parent, button_commands, **kwargs): forward, backward, right, left, stop = button_commands Frame.Frame.__init__(self, parent, c.ROBOT_TAB, 0, 0, **kwargs) self.addChildWidgets( (OptionMenu.TargetChoosingMenu(self.widget, c.ROBOT_OPTION_FORWARD, 0, 1, (c.ROBOT_NONE, )), OptionMenu.TargetChoosingMenu(self.widget, c.ROBOT_OPTION_BACKWARD, 1, 1, (c.ROBOT_NONE, )), OptionMenu.TargetChoosingMenu(self.widget, c.ROBOT_OPTION_RIGHT, 2, 1, (c.ROBOT_NONE, )), OptionMenu.TargetChoosingMenu(self.widget, c.ROBOT_OPTION_LEFT, 3, 1, (c.ROBOT_NONE, )), OptionMenu.TargetChoosingMenu(self.widget, c.ROBOT_OPTION_STOP, 4, 1, (c.ROBOT_NONE, )), Buttons.Button(self.widget, c.ROBOT_TEST, 0, 3, command=forward), Buttons.Button(self.widget, c.ROBOT_TEST, 1, 3, command=backward), Buttons.Button(self.widget, c.ROBOT_TEST, 2, 3, command=right), Buttons.Button(self.widget, c.ROBOT_TEST, 3, 3, command=left), Buttons.Button(self.widget, c.ROBOT_TEST, 4, 3, command=stop), Textboxes.LabelTextbox(self.widget, c.STREAM_X, 5, 0, command=int, allow_negative=True, allow_zero=True), Textboxes.LabelTextbox(self.widget, c.STREAM_Y, 5, 2, command=int, allow_negative=True, allow_zero=True), Checkbutton.Checkbutton(self.widget, c.ROBOT_STREAM, 5, 4, command=self.enableCoordinates, default_value=1), Textboxes.LabelTextbox(self.widget, c.STREAM_WIDTH, 6, 0, command=int, allow_negative=True, allow_zero=True, default_value=320), Textboxes.LabelTextbox(self.widget, c.STREAM_HEIGHT, 6, 2, command=int, allow_negative=True, allow_zero=True, default_value=240), self.getDisableButton(7, 0)))
def __init__(self, parent, row, column, monitorFreqChanged, **kwargs): Frame.Frame.__init__(self, parent, c.WINDOW_TAB, row, column, **kwargs) self.monitorFreqChanged = monitorFreqChanged self.loading_default_value = True monitor_names = self.getMonitorNames() monitor_command = lambda: self.updateMonitorFreqTextbox( self.widgets_dict[c.WINDOW_MONITOR].widget, self.widgets_dict[ c.WINDOW_MONITOR].variable, self.widgets_dict[c.WINDOW_FREQ]) refresh_command = lambda: self.refreshMonitorNames( self.widgets_dict[c.WINDOW_MONITOR].widget, self.widgets_dict[ c.WINDOW_MONITOR].variable, self.widgets_dict[c.WINDOW_FREQ]) self.addChildWidgets( (Textboxes.LabelTextbox(self.widget, c.WINDOW_WIDTH, 0, 0, command=int, default_value=800), Textboxes.LabelTextbox(self.widget, c.WINDOW_HEIGHT, 0, 2, command=int, default_value=600), Textboxes.ColorTextboxFrame(self.widget, c.WINDOW_COLOR, 0, 4, default_value="#000000"), Textboxes.LabelTextbox(self.widget, c.WINDOW_FREQ, 1, 0, command=self.freqTextboxCommand, default_value=self.getMonitorFrequency( monitor_names[0])), Buttons.Button(self.widget, c.WINDOW_REFRESH, 1, 2, command=refresh_command), OptionMenu.OptionMenu(self.widget, c.WINDOW_MONITOR, 2, 1, monitor_names, command=monitor_command, columnspan=3), self.getDisableButton(2, 4)))
def __init__(self, parent, name, row, column, **kwargs): Frame.Frame.__init__(self, parent, name, row, column, **kwargs) Tkinter.Label(self.widget, text=name).grid(row=0, column=0) self.addChildWidgets(( Checkbutton.Checkbutton(self.widget, c.TEST_ALWAYS_DELETE, 0, 2, columnspan=2), Textboxes.LabelTextbox(self.widget, c.TEST_RESULT_COUNTER, 1, 0, default_value=1), Textboxes.LabelTextbox(self.widget, c.TEST_RESULT_THRESHOLD, 1, 2, allow_zero=True), ))
def __init__(self, parent, deleteTab, **kwargs): DisableDeleteNotebookTab.DisableDeleteNotebookTab.__init__( self, parent, c.NORMAL_EEG_TAB, **kwargs) self.addChildWidgets(( Textboxes.LabelTextbox(self.widget, c.RECORDING_LENGTH, 0, 0, default_disablers=c.NORMAL_EEG_TAB, default_disability=True), self.getDisableDeleteFrame(1, 0, deleteTab), ))
def __init__(self, parent, row, column, **kwargs): Frame.Frame.__init__(self, parent, c.OPTIONS_FRAME, row, column, **kwargs) windows = c.WINDOW_FUNCTION_NAMES detrends = c.DETREND_NAMES filters = c.FILTER_NAMES interpolations = c.INTERPOLATE_NAMES self.addChildWidgets( (OptionMenu.OptionMenu(self.widget, c.OPTIONS_DETREND, 0, 1, detrends, command=self.enableBreak), OptionMenu.OptionMenu(self.widget, c.OPTIONS_WINDOW, 0, 4, windows, command=self.enableWindow), OptionMenu.OptionMenu(self.widget, c.OPTIONS_INTERPOLATE, 1, 1, interpolations), OptionMenu.OptionMenu(self.widget, c.OPTIONS_FILTER, 1, 4, filters, command=self.enableFilter), Textboxes.LabelTextbox(self.widget, c.OPTIONS_STEP, 2, 0, command=int, default_value=32), Textboxes.LabelTextbox(self.widget, c.OPTIONS_LENGTH, 2, 2, command=int, default_value=512), Checkbutton.Checkbutton(self.widget, c.OPTIONS_NORMALISE, 2, 4, columnspan=2), Textboxes.LabelTextbox(self.widget, c.OPTIONS_BREAK, 3, 0, command=int, allow_zero=True), Textboxes.LabelTextbox(self.widget, c.OPTIONS_ARG, 3, 2, command=int, allow_zero=True, default_disability=True, default_disablers=[c.OPTIONS_WINDOW]), Textboxes.LabelTextbox(self.widget, c.OPTIONS_FROM, 4, 0, command=float, allow_zero=True, default_disability=True, default_disablers=[c.OPTIONS_FILTER]), Textboxes.LabelTextbox(self.widget, c.OPTIONS_TO, 4, 2, command=float, allow_zero=True, default_disability=True, default_disablers=[c.OPTIONS_FILTER]), Textboxes.LabelTextbox(self.widget, c.OPTIONS_TAPS, 4, 4, command=int, allow_zero=True, default_disability=True, default_disablers=[c.OPTIONS_FILTER])))