def traits_view(self): pgrp = HGroup( UItem('stage_manager.calibrated_position_entry', tooltip='Enter a position e.g 1 for a hole, ' 'or 3,4 for X,Y'), icon_button_editor( 'stage_manager.autocenter_button', 'find', tooltip='Do an autocenter at the current location', enabled_when='stage_manager.autocenter_manager.use_autocenter' ), icon_button_editor( 'stage_manager.manual_override_position_button', 'edit-move', tooltip= 'Manual define the X,Y coordinates for current position', enabled_when='stage_manager.calibrated_position_entry'), label='Calibrated Position', show_border=True) hgrp = HGroup( UItem('stage_manager.stop_button'), UItem('stage_manager.home'), UItem('stage_manager.home_option', editor=EnumEditor(name='stage_manager.home_options'))) tabs = self._get_tabs() v = View(VGroup(hgrp, pgrp, tabs)) return v
def traits_view(self): cols = [ObjectColumn(name='name', editable=False), ObjectColumn(name='user', editable=False), CheckboxColumn(name='omit_ideo'), CheckboxColumn(name='omit_spec'), CheckboxColumn(name='omit_iso'), CheckboxColumn(name='omit_series')] editor = TableEditor(columns=cols, selected='selected', sortable=False, ) v = View(UItem('tags', editor=editor), HGroup( icon_button_editor('add_tag_button', 'add', tooltip='Add a tag'), icon_button_editor('delete_tag_button', 'delete', tooltip='Delete selected tags'), icon_button_editor('save_button', 'database_save', tooltip='Save changes from the "Tag" table to the database')), UItem('items', editor=TabularEditor(adapter=ItemAdapter(), multi_select=True, operations=['delete'])), HGroup(Item('use_filter', label='Remove "Invalid" analyses from figure')), resizable=True, width=500, height=400, buttons=['OK', 'Cancel'], kind='livemodal', title='Tags') return v
def traits_view(self): db_auth_grp = Group(Item('host', editor=TextEditor(enter_set=True, auto_set=False), width=125, label='Host'), Item('username', label='User', editor=TextEditor(enter_set=True, auto_set=False)), Item('password', label='Password', editor=TextEditor(enter_set=True, auto_set=False, password=True)), enabled_when='kind=="mysql"', show_border=True, label='Authentication') fav_grp = VGroup( Item('fav_name', show_label=False), Item('favorites', show_label=False, width=100, editor=ListStrEditor(editable=False, adapter=FavoritesAdapter(), selected='object.selected')), HGroup(icon_button_editor('add_favorite', 'add', tooltip='Add saved connection'), icon_button_editor('delete_favorite', 'delete', tooltip='Delete saved connection'), icon_button_editor('test_connection_button', 'database_connect', tooltip='Test connection'), Spring(width=10, springy=False), Label('Status:'), CustomLabel('_connected_label', label='Status', weight='bold', color_name='_connected_color'), spring, show_labels=False)) db_grp = Group(HGroup( Item('kind', show_label=False), Item('name', label='Database Name', editor=EnumEditor(name='_names'), visible_when='kind=="mysql"')), HGroup(fav_grp, db_auth_grp, visible_when='kind=="mysql"'), VGroup(Item('path', label='Database File'), visible_when='kind=="sqlite"'), show_border=True, label='Pychron DB') return View(db_grp)
def traits_view(self): grp = VGroup(UItem('scanner.new_scanner', tooltip='Open a new magnet scan', enabled_when='scanner.new_scanner_enabled'), HGroup(icon_button_editor('scanner.start_scanner', 'start', tooltip='Start the magnet scan', enabled_when='scanner.start_scanner_enabled'), icon_button_editor('scanner.stop_scanner', 'stop', tooltip='Stop the magnet scan', enabled_when='scanner.stop_scanner_enabled'), icon_button_editor('scanner.clear_graph_button', 'clear')), HGroup(Item('scanner.step', format_str='%0.5f'), UItem('scanner.scan_time_length')), HGroup(Item('scanner.min_dac', label='Min', format_str='%0.5f'), Item('scanner.max_dac', label='Max', format_str='%0.5f'), icon_button_editor('scanner.use_mftable_limits', 'foo', tooltip='Set DAC limits based on the Magnetic Field Table'), show_border=True, label='Limits'), HGroup(Item('scanner.scan_min_dac', label='Min', format_str='%0.5f'), Item('scanner.scan_max_dac', label='max', format_str='%0.5f'), label='Scan Min/Max', show_border=True), show_border=True, label='Scanner') v = View(grp) return v
def traits_view(self): from pychron.pychron_constants import ISOTOPES cols = [ ObjectColumn(name='name', label='', width=20, editable=False), ObjectColumn(name='isotope', editor=EnumEditor(values=ISOTOPES)), ObjectColumn(name='detector', editor=EnumEditor(values=self.detectors)), ObjectColumn(name='deflection', )] v = View(VGroup(HGroup(Item('counts', tooltip='Number of measurements at this position'), Item('settle', label='Settle (s)', tooltip='Delay in seconds after magnet move and before measurement')), UItem('positions', editor=myTableEditor(columns=cols, sortable=False, clear_selection_on_dclicked=True, selected='selected')), HGroup(icon_button_editor('add_position_button', 'add', tooltip='Add isotope/detector to measure'), icon_button_editor('remove_position_button', 'delete', tooltip='Remove selected isotope/detector', enabled_when='selected')))) return v
def traits_view(self): pos_grp = VGroup(UItem('move_enabled_button'), VGroup(HGroup(Item('position'), UItem('object.stage_manager.stage_map_name', editor=EnumEditor(name='object.stage_manager.stage_map_names')), UItem('stage_stop_button')), Item('x', editor=RangeEditor(low=-25.0, high=25.0)), Item('y', editor=RangeEditor(low=-25.0, high=25.0)), Item('z', editor=RangeEditor(low=-25.0, high=25.0)), enabled_when='_move_enabled'), label='Positioning') # ogrp = Group(UItem('optics_client', style='custom'), # label='Optics') # cgrp = Group(UItem('controls_client', style='custom'), # defined_when='controls_client', # label='Controls') tgrp = Group( # cgrp, # ogrp, pos_grp, layout='tabbed') egrp = HGroup(UItem('enabled_led', editor=LEDEditor()), UItem('enable', editor=ButtonEditor(label_value='enable_label')), UItem('fire_laser_button', enabled_when='enabled'), Item('output_power', label='Power'), UItem('units'), spring, icon_button_editor('snapshot_button', 'camera'), icon_button_editor('test_connection_button', 'connect', tooltip='Test Connection')) v = View(VGroup(egrp, tgrp)) return v
def traits_view(self): main_grp = self._get_browser_group() hgrp = HGroup(icon_button_editor('filter_by_button', 'find', tooltip='Filter analyses using defined criteria'), # icon_button_editor('graphical_filter_button', # 'chart_curve_go', # tooltip='Filter analyses graphically'), icon_button_editor('find_references_button', '', tooltip='Find references associated with current selection'), icon_button_editor('toggle_view', 'arrow_switch', tooltip='Toggle between Sample and Time views'), spring, CustomLabel('datasource_url', color='maroon')) bgrp = HGroup(spring, UItem('pane.append_button'), UItem('pane.replace_button')) v = View(VGroup(hgrp, main_grp, bgrp), # buttons=['Cancel'], # Action(name='Append', # action='append_analyses'), # Action(name='Replace', # action='replace_analyses')], handler=BrowserViewHandler(), title='Browser', resizable=True) return v
def traits_view(self): pr_group = VGroup(HGroup(icon_button_editor('add_production_button', 'database_add', tooltip='Add a Production Ratio'), icon_button_editor('edit_production_button', 'database_edit', enabled_when='selected_production', tooltip='Edit Production Ratio')), VSplit(UItem('productions', editor=TabularEditor(adapter=ProductionAdapter(), editable=False, selected='selected_production')), UItem('selected_production', style='custom')), label='Production Ratios') editor = TabularEditor(adapter=TrayAdapter(), editable=False, selected='selected_tray') tray_grp = VGroup(HGroup(icon_button_editor('add_tray_button', 'add', tooltip='Add a tray from file')), HSplit(UItem('trays', editor=editor, width=0.25), UItem('canvas', editor=ComponentEditor(), width=0.75)), label='Tray') v = View(Item('name'), VGroup(UItem('level_note', style='custom'), label='Level Note', show_border=True), Group( pr_group, tray_grp, layout='tabbed'), resizable=True, width=550, height=650, title=self.title, kind='livemodal', buttons=['OK', 'Cancel']) return v
def traits_view(self): v = View(VGroup( HGroup( UItem('description', editor=EnumEditor(name='descriptions')), Item('new_description', width=-250)), HGroup( icon_button_editor( 'scan_button', 'foo', tooltip='Scan pyscripts for occurences of the valve/switch ' 'description'), icon_button_editor('apply_button', 'bar', enabled_when='new_description')), UItem('found', editor=TabularEditor(selected='selected', multi_select=True, adapter=ScriptItemAdapter())), UItem('script_text', style='custom', editor=TextEditor(read_only=True))), title='Switch Renamer', resizable=True, width=700, height=500) return v
def traits_view(self): v = View( VGroup( HGroup( icon_button_editor("append_button", "add", tooltip=self._add_tooltip), icon_button_editor("replace_button", "arrow_refresh", tooltip=self._replace_tooltip), icon_button_editor("clear_button", "delete", tooltip=self._clear_tooltip), icon_button_editor( "configure_filter_button", "filter", tooltip="Configure/Apply a filter", enabled_when="items" ), ), HGroup( UItem("previous_selection", editor=EnumEditor(name="previous_selections")), icon_button_editor("configure_button", "cog", tooltip=self.configure_history_tooltip), ), HGroup(spring, CustomLabel("cs_label"), spring, Item("auto_sort")), UItem( "items", editor=myTabularEditor( adapter=self.adapter, operations=["move", "delete"], editable=True, drag_external=True, selected="selected", dclicked="dclicked", refresh="refresh_needed", multi_select=True, column_clicked="column_clicked", ), ), ) ) return v
def traits_view(self): irrad = HGroup( spacer(), Item('irradiation', width=-150, editor=EnumEditor(name='irradiations')), icon_button_editor('edit_irradiation_button', 'database_edit', enabled_when='edit_irradiation_enabled', tooltip='Edit irradiation'), icon_button_editor('add_irradiation_button', 'database_add', tooltip='Add irradiation')) level = HGroup( spacer(), Label('Level:'), spacer(-23), UItem('level', width=-150, editor=EnumEditor(name='levels')), icon_button_editor('edit_level_button', 'database_edit', tooltip='Edit level', enabled_when='edit_level_enabled'), icon_button_editor('add_level_button', 'database_add', tooltip='Add level')) conn = HGroup(spring, CustomLabel('datasource_url', color='maroon'), spring) v = View(VGroup(conn, irrad, level)) return v
def traits_view(self): a = UItem('histories', editor=TabularEditor(adapter=GainHistoryAdapter(), editable=False, selected='selected')) b = UItem('selected', style='custom', editor=InstanceEditor(view=View( UItem('gains', editor=TabularEditor(editable=False, adapter=GainAdapter()))))) dview = View(HGroup(UReadonly('name'), 'gain')) egrp = VGroup(HGroup(icon_button_editor('apply_button', 'apply')), UItem('object.spectrometer.detectors', editor=ListEditor( mutable=False, style='custom', editor=InstanceEditor(view=dview))), show_border=True, label='Edit Detector Gains') v = View(VGroup( HGroup( icon_button_editor( 'apply_history_button', 'apply', tooltip= 'Set gains to values stored with the selected history', enabled_when='selected')), HSplit(a, b), egrp), width=650, title='View Detector Gain Histories', resizable=True) return v
def _get_main_view(self): return VGroup( HGroup( Item('predefined_label', editor=EnumEditor(name='predefined_labels'))), UItem('attributes', editor=ListStrEditor(editable=False, activated='activated')), HGroup( UItem('label'), icon_button_editor('clear_button', 'clear', tooltip='Clear current label'), icon_button_editor( 'add_label_button', 'add', enabled_when='add_enabled', tooltip='Save current label to the predefined list'), icon_button_editor( 'delete_label_button', 'delete', enabled_when='delete_enabled', tooltip='Remove current label from the predefined list'), label='Label', show_border=True), HGroup(UItem('example', style='readonly'), label='Example', show_border=True))
def traits_view(self): v = View(VGroup( HGroup( Item('plotter_options', show_label=False, editor=EnumEditor(name='plotter_options_list'), tooltip='List of available plot options'), icon_button_editor( 'add_options', 'add', tooltip='Add new plot options', ), icon_button_editor( 'delete_options', 'delete', tooltip='Delete current plot options', enabled_when='object.plotter_options.name!="Default"', ), icon_button_editor('save_options', 'disk', tooltip='Save changes to options'), icon_button_editor('factory_default', 'edit-bomb', tooltip='Apply factory defaults')), HGroup( UItem('use_formatting_options'), UItem('formatting_option', enabled_when='use_formatting_options')), Item('plotter_options', show_label=False, style='custom')), resizable=True) return v
def traits_view(self): irrad = HGroup( spacer(), Item("irradiation", width=-150, editor=EnumEditor(name="irradiations")), icon_button_editor( "edit_irradiation_button", "database_edit", enabled_when="edit_irradiation_enabled", tooltip="Edit irradiation", ), icon_button_editor("add_irradiation_button", "database_add", tooltip="Add irradiation"), icon_button_editor("import_irradiation_button", "database_go", tooltip="Import irradiation"), ) level = HGroup( spacer(), Label("Level:"), spacer(-23), UItem("level", width=-150, editor=EnumEditor(name="levels")), icon_button_editor( "edit_level_button", "database_edit", tooltip="Edit level", enabled_when="edit_level_enabled" ), icon_button_editor("add_level_button", "database_add", tooltip="Add level"), ) v = View(VGroup(irrad, level)) return v
def traits_view(self): v = View( VGroup(Item('check_on_startup', label='Check for updates at startup'), VGroup(remote_status_item(), Item('use_tag', label='Use Production'), Item('version_tag', editor=EnumEditor(name='_tags'), enabled_when='use_tag'), Item('branch', editor=EnumEditor(name='_branches'), enabled_when='not use_tag', label='Branch'), HGroup(icon_button_editor( 'checkout_branch_button', 'bricks', tooltip='Checkout selected branch'), icon_button_editor('pull_button', 'arrow_down', tooltip='Update Branch'), enabled_when='not use_tag'), show_border=True, label='Update Repo'), label='Update', show_border=True)) return v
def traits_view(self): v = View( VGroup(HGroup( Item('plotter_options', show_label=False, editor=EnumEditor(name='plotter_options_list'), tooltip='List of available plot options'), icon_button_editor('add_options', 'add', tooltip='Add new plot options', ), icon_button_editor('delete_options', 'delete', tooltip='Delete current plot options', enabled_when='object.plotter_options.name!="Default"', ), icon_button_editor('save_options', 'disk', tooltip='Save changes to options'), icon_button_editor('factory_default', 'edit-bomb', tooltip='Apply factory defaults')), HGroup(UItem('use_formatting_options'), UItem('formatting_option', enabled_when='use_formatting_options')), Item('plotter_options', show_label=False, style='custom')), resizable=True) return v
def _get_browser_tool_group(self): hgrp = HGroup( icon_button_editor( 'filter_by_button', 'find', tooltip='Search for analyses using defined criteria'), icon_button_editor( 'advanced_filter_button', 'magnifier', tooltip='Advanced Search. e.g. search by intensity'), icon_button_editor('load_recent_button', 'edit-history-2', tooltip='Load recent analyses'), icon_button_editor( 'find_references_button', '3d_glasses', enabled_when='find_references_enabled', tooltip='Find references associated with current selection'), icon_button_editor('refresh_selectors_button', 'arrow_refresh', tooltip='Refresh the database selectors' ' e.g PI, Project, Load, Irradiation, etc'), UItem('object.dvc.data_source', editor=EnumEditor(name='object.dvc.data_sources')), spring, CustomLabel('datasource_url', color='maroon'), show_border=True) return hgrp
def traits_view(self): main_grp = self._get_browser_group() v = View( VGroup( HGroup( # icon_button_editor('advanced_query', 'application_form_magnify', # tooltip='Advanced Query'), icon_button_editor('filter_by_button', 'find', tooltip='Filter analyses using defined criteria'), icon_button_editor('graphical_filter_button', 'chart_curve_go', # enabled_when='samples', tooltip='Filter analyses graphically'), icon_button_editor('toggle_view', 'arrow_switch', tooltip='Toggle between Sample and Time views'), spring, UItem('use_focus_switching', tooltip='Show/Hide Filters on demand'), Spring(springy=False, width=10), icon_button_editor('toggle_focus', 'arrow_switch', enabled_when='use_focus_switching', tooltip='Toggle Filter and Result focus'), spring, CustomLabel('datasource_url', color='maroon'), ), main_grp), # handler=TablesHandler() # handler=UnselectTabularEditorHandler(selected_name='selected_projects') ) return v
def _get_truncate_group(self): grp = VGroup(HGroup(run_factory_item('use_simple_truncation', label='Use Simple'), icon_button_editor(run_factory_name('clear_conditionals'), 'delete', tooltip='Clear Conditionals from selected runs')), BorderHGroup(run_factory_uitem('trunc_attr', editor=myEnumEditor(name=run_factory_name('trunc_attrs'))), run_factory_uitem('trunc_comp'), run_factory_uitem('trunc_crit'), spacer(-10), run_factory_item('trunc_start', label='Start Count'), label='Simple'), BorderHGroup(run_factory_item('conditionals_path', editor=myEnumEditor(name=run_factory_name('conditionals')), label='Path'), icon_button_editor(run_factory_name('edit_conditionals_button'), 'table_edit', enabled_when=run_factory_name('conditionals_path'), tooltip='Edit the selected conditionals file'), icon_button_editor(run_factory_name('new_conditionals_button'), 'table_add', tooltip='Add a new conditionals file. Duplicated currently ' 'selected file if applicable'), icon_button_editor(run_factory_name('apply_conditionals_button'), 'arrow_left', tooltip='Apply conditionals file to selected analyses'), label='File'), enabled_when=queue_factory_name('ok_make'), label='Run Conditionals') return grp
def traits_view(self): pos_grp = VGroup(HGroup(Item('position'), Item('use_autocenter', label='Autocenter')), Item('x', editor=RangeEditor(low=-25.0, high=25.0)), Item('y', editor=RangeEditor(low=-25.0, high=25.0)), Item('z', editor=RangeEditor(low=-25.0, high=25.0)), label='Positioning') ogrp = Group(UItem('optics_client', style='custom'), label='Optics') cgrp = Group(UItem('controls_client', style='custom'), defined_when='controls_client', label='Controls') tgrp = Group(cgrp, ogrp, pos_grp, layout='tabbed') egrp = HGroup(UItem('enabled_led', editor=LEDEditor()), UItem('enable', editor=ButtonEditor(label_value='enable_label')), spring, icon_button_editor('snapshot_button', 'camera'), icon_button_editor('test_connection_button', 'connect', tooltip='Test Connection')) v = View(VGroup(egrp, tgrp)) return v
def traits_view(self): analysis_tools = VGroup(HGroup(UItem('analysis_table.analysis_set', width=-90, editor=EnumEditor(name='analysis_table.analysis_set_names')), icon_button_editor('analysis_table.add_analysis_set_button', 'add', enabled_when='analysis_table.items', tooltip='Add current analyses to an analysis set'), icon_button_editor('add_analysis_group_button', 'database_add', enabled_when='analysis_table.items', tooltip='Add current analyses to an analysis group')), HGroup(UItem('analysis_table.analysis_filter_parameter', width=-90, editor=EnumEditor(name='analysis_table.analysis_filter_parameters')), UItem('analysis_table.analysis_filter'))) agrp = Group(VGroup(analysis_tools, UItem('analysis_table.analyses', width=0.4, editor=myTabularEditor( adapter=self.model.analysis_table.tabular_adapter, operations=['move', 'delete'], column_clicked='analysis_table.column_clicked', refresh='analysis_table.refresh_needed', selected='analysis_table.selected', dclicked='analysis_table.dclicked', multi_select=self.pane.multi_select, drag_external=True, scroll_to_row='analysis_table.scroll_to_row', stretch_last_section=False)), defined_when=self.pane.analyses_defined, show_border=True, label='Analyses')) sample_grp = self._get_sample_group() return View(HSplit(sample_grp, agrp))
def traits_view(self): v = View(VGroup( HGroup(icon_button_editor('append_button', 'add', tooltip=self._add_tooltip), icon_button_editor('replace_button', 'arrow_refresh', tooltip=self._replace_tooltip), icon_button_editor('clear_button', 'delete', tooltip=self._clear_tooltip), icon_button_editor('configure_filter_button', 'filter', tooltip='Configure/Apply a filter', enabled_when='items')), HGroup(UItem('previous_selection', editor=EnumEditor(name='previous_selections')), icon_button_editor('configure_button', 'cog', tooltip=self.configure_history_tooltip)), HGroup(spring, CustomLabel('cs_label'), spring, Item('auto_sort')), UItem('items', editor=myTabularEditor(adapter=self.adapter_klass(), operations=['move', 'delete'], editable=True, drag_external=True, selected='selected', dclicked='dclicked', refresh='refresh_needed', multi_select=True, column_clicked='column_clicked')))) return v
def traits_view(self): irrad = HGroup( spacer(), Item('irradiation', width=-150, editor=EnumEditor(name='irradiations')), icon_button_editor('edit_irradiation_button', 'database_edit', enabled_when='edit_irradiation_enabled', tooltip='Edit irradiation'), icon_button_editor('add_irradiation_button', 'database_add', tooltip='Add irradiation')) level = HGroup( spacer(), Label('Level:'), spacer(-23), UItem('level', width=-150, editor=EnumEditor(name='levels')), icon_button_editor('edit_level_button', 'database_edit', tooltip='Edit level', enabled_when='edit_level_enabled'), icon_button_editor('add_level_button', 'database_add', tooltip='Add level')) v = View(VGroup(irrad, level)) return v
def traits_view(self): irrad = HGroup( spacer(), Item('irradiation', width=-150, editor=myEnumEditor(name='irradiations')), icon_button_editor('edit_irradiation_button', 'database_edit', enabled_when='edit_irradiation_enabled', tooltip='Edit irradiation'), icon_button_editor('add_irradiation_button', 'database_add', tooltip='Add irradiation'), icon_button_editor('import_irradiation_button', 'database_go', tooltip='Import irradiation')) level = HGroup( spacer(), Label('Level:'), spacer(-23), UItem('level', width=-150, editor=myEnumEditor(name='levels')), icon_button_editor('edit_level_button', 'database_edit', tooltip='Edit level', enabled_when='edit_level_enabled'), icon_button_editor('add_level_button', 'database_add', tooltip='Add level')) v = View(VGroup(irrad, level)) return v
def traits_view(self): def make_name(name): return 'object.analysis_table.{}'.format(name) g1 = HGroup(UItem(make_name('analysis_filter_parameter'), width=-90, editor=EnumEditor(name=make_name('analysis_filter_parameters'))), icon_button_editor(make_name('configure_analysis_table'), 'cog', tooltip='Configure analysis table')) g2 = UItem(make_name('analysis_filter'), editor=ComboboxEditor(name=make_name('analysis_filter_values'))) analysis_tools = VGroup(g1, g2, defined_when=self.pane.analyses_defined) g1 = HGroup(UItem('sample_filter_parameter', width=-90, editor=EnumEditor(name='sample_filter_parameters')), icon_button_editor('configure_sample_table', 'cog', tooltip='Configure Sample Table'), icon_button_editor('clear_sample_table', 'clear', tooltip='Clear Sample Table')) g2 = UItem('sample_filter', editor=ComboboxEditor(name='sample_filter_values')) sample_tools = VGroup(g1, g2) v = View(HGroup(sample_tools, analysis_tools)) return v
def _get_truncate_group(self): grp = VGroup( HGroup(run_factory_item('use_simple_truncation', label='Use Simple'), icon_button_editor(run_factory_name('clear_conditionals'), 'delete', tooltip='Clear Conditionals from selected runs' # enabled_when=run_factory_name('edit_mode') )), HGroup( run_factory_item('trunc_attr', editor=EnumEditor(name=run_factory_name('trunc_attrs')), show_label=False), run_factory_item('trunc_comp', show_label=False), run_factory_item('trunc_crit', show_label=False), spacer(-10), run_factory_item('trunc_start', label='Start Count'), show_border=True, #enabled_when = run_factory_name('use_simple_truncation'), label='Simple'), HGroup( run_factory_item('conditionals_path', editor=EnumEditor(name=run_factory_name('conditionals')), label='Path'), icon_button_editor(run_factory_name('edit_conditionals_button'), 'table_edit', enabled_when=run_factory_name('conditionals_path'), tooltip='Edit the selected conditionals file'), icon_button_editor(run_factory_name('new_conditionals_button'), 'table_add', tooltip='Add a new conditionals file. Duplicated currently ' 'selected file if applicable'), show_border=True, label='File'), label='Run Conditionals') return grp
def traits_view(self): a = UItem('histories', editor=TabularEditor(adapter=GainHistoryAdapter(), editable=False, selected='selected')) b = UItem('selected', style='custom', editor=InstanceEditor(view=View(UItem('gains', editor=TabularEditor(editable=False, adapter=GainAdapter()))))) dview = View(HGroup(UReadonly('name'), 'gain')) egrp = VGroup( HGroup(icon_button_editor('apply_button', 'apply')), UItem('object.spectrometer.detectors', editor=ListEditor(mutable=False, style='custom', editor=InstanceEditor(view=dview))), show_border=True, label='Edit Detector Gains') v = View(VGroup(HGroup(icon_button_editor('apply_history_button', 'apply', tooltip='Set gains to values stored with the selected history', enabled_when='selected')), HSplit(a, b), egrp), width=650, title='View Detector Gain Histories', resizable=True) return v
def traits_view(self): auth_grp = VGroup(Item('host'), Item('user'), Item('password'), show_border=True, label='Authentication') v = View(VGroup(auth_grp, HGroup(icon_button_editor('check_status_button', 'database_go_fatcow', tooltip='Check slave status. Equivalent to "Show Slave Status"'), icon_button_editor('start_button', 'start', tooltip='Start replication. Equivalent to "Start Slave"', enabled_when='not running'), icon_button_editor('stop_button', 'stop', tooltip='Stop replication. Equivalent to "Stop Slave"', enabled_when='running'), icon_button_editor('skip_button', 'skip_occurrence', tooltip='Set global skip counter.\n' 'Equivalent to "Stop Slave;' 'Set GLOBAL SQL_SKIP_COUNTER=N;Start Slave;"\n' 'where N is the number of SQL statements to skip'), UItem('skip_count', tooltip='Number of SQL statements to skip')), UItem('status_items', editor=TabularEditor(adapter=StatusItemsAdapter(), editable=False)), VGroup(UReadonly('last_error', height=200, style_sheet='color: red; font-weight: bold'), label='Error', show_border=True), label='Slave', show_border=True)) v.width = 500 return v
def _get_truncate_group(self): grp = VGroup(HGroup(run_factory_item('use_simple_truncation', label='Use Simple'), icon_button_editor(run_factory_name('clear_conditionals'), 'delete', tooltip='Clear Conditionals from selected runs' # enabled_when=run_factory_name('edit_mode') )), HGroup(run_factory_item('trunc_attr', editor=EnumEditor(name=run_factory_name('trunc_attrs')), show_label=False), run_factory_item('trunc_comp', show_label=False), run_factory_item('trunc_crit', show_label=False), spacer(-10), run_factory_item('trunc_start', label='Start Count'), show_border=True, # enabled_when = run_factory_name('use_simple_truncation'), label='Simple'), HGroup(run_factory_item('conditionals_path', editor=EnumEditor(name=run_factory_name('conditionals')), label='Path'), icon_button_editor(run_factory_name('edit_conditionals_button'), 'table_edit', enabled_when=run_factory_name('conditionals_path'), tooltip='Edit the selected conditionals file'), icon_button_editor(run_factory_name('new_conditionals_button'), 'table_add', tooltip='Add a new conditionals file. Duplicated currently ' 'selected file if applicable'), show_border=True, label='File'), enabled_when=queue_factory_name('ok_make'), label='Run Conditionals') return grp
def view(title): agrp = HGroup( Item("selected", show_label=False, editor=EnumEditor(name="names"), tooltip="List of available plot options"), icon_button_editor("controller.save_options", "disk", tooltip="Save changes to options"), icon_button_editor("controller.add_options", "add", tooltip="Add new plot options"), icon_button_editor( "controller.factory_default", "edit-bomb", enabled_when="selected", tooltip="Apply factory defaults" ), ) # icon_button_editor('controller.delete_options', # 'delete', # tooltip='Delete current plot options', # enabled_when='object.plotter_options.name!="Default"', ), # sgrp = VGroup(UItem('selected_subview', # editor=ListStrEditor(name='subview_names'))) sgrp = UItem( "subview_names", width=-120, editor=TabularEditor(editable=False, adapter=SubviewAdapter(), selected="selected_subview"), ) # sgrp = VGroup(UItem('selected_subview', editor=EnumEditor(name='subview_names'))) ogrp = UItem("subview", style="custom") bgrp = HGroup(sgrp, ogrp) v = View(VGroup(agrp, bgrp), width=750, height=750, resizable=True, title=title, buttons=["OK", "Cancel"]) return v
def traits_view(self): grp = VGroup(UItem('scanner.new_scanner', tooltip='Open a new magnet scan', enabled_when='scanner.new_scanner_enabled'), HGroup(icon_button_editor('scanner.start_scanner', 'start', tooltip='Start the magnet scan', enabled_when='scanner.start_scanner_enabled'), icon_button_editor('scanner.stop_scanner', 'stop', tooltip='Stop the magnet scan', enabled_when='scanner.stop_scanner_enabled'), icon_button_editor('scanner.clear_graph_button', 'clear')), HGroup(Item('scanner.step', format_str='%0.5f'), UItem('scanner.scan_time_length')), HGroup(Item('scanner.min_dac', label='Min', format_str='%0.5f'), Item('scanner.max_dac', label='Max', format_str='%0.5f'), icon_button_editor('scanner.use_mftable_limits', 'foo', tooltip='Set DAC limits based on the Magnetic Field Table'), show_border=True, label='Limits'), HGroup(Item('scanner.scan_min_dac', label='Min', format_str='%0.5f'), Item('scanner.scan_max_dac', label='max', format_str='%0.5f'), label='Scan Min/Max', show_border=True), show_border=True, label='Scanner') v = View(grp) return v
def traits_view(self): pos_grp = VGroup( UItem('move_enabled_button'), VGroup(HGroup( Item('position'), UItem('object.stage_manager.stage_map_name', editor=EnumEditor( name='object.stage_manager.stage_map_names')), UItem('stage_stop_button')), Item('x', editor=RangeEditor(low=-25.0, high=25.0)), Item('y', editor=RangeEditor(low=-25.0, high=25.0)), Item('z', editor=RangeEditor(low=-25.0, high=25.0)), enabled_when='_move_enabled'), label='Positioning') calibration_grp = VGroup( UItem('tray_calibration.style', enabled_when='not tray_calibration.isCalibrating()'), UItem('tray_calibration.calibrate', editor=ButtonEditor( label_value='tray_calibration.calibration_step')), HGroup( Item('tray_calibration.x', format_str='%0.3f', style='readonly'), Item('tray_calibration.y', format_str='%0.3f', style='readonly')), Item('tray_calibration.rotation', format_str='%0.3f', style='readonly'), Item('tray_calibration.scale', format_str='%0.4f', style='readonly'), Item('tray_calibration.error', format_str='%0.2f', style='readonly'), UItem('tray_calibration.calibrator', style='custom', editor=InstanceEditor()), CustomLabel('tray_calibration.calibration_help', color='green', height=75, width=300), label='Tray Calibration') tgrp = Group(pos_grp, calibration_grp, layout='tabbed') egrp = HGroup( UItem('enabled_led', editor=LEDEditor()), UItem('enable', editor=ButtonEditor(label_value='enable_label')), UItem('fire_laser_button', enabled_when='enabled'), Item('output_power', label='Power'), UItem('units'), spring, icon_button_editor('snapshot_button', 'camera'), icon_button_editor('test_connection_button', 'connect', tooltip='Test Connection')) v = View(VGroup(egrp, tgrp)) return v
def traits_view(self): notegrp = VGroup(Item('retain_note', tooltip='Retain the Note for the next hole', label='Lock'), Item('note', style='custom', show_label=False), show_border=True, label='Note') viewgrp = VGroup( HGroup(Item('use_cmap', label='Color Map'), UItem('cmap_name', enabled_when='use_cmap')), Item('show_hole_numbers'), Item('show_labnumbers'), Item('show_weights'), # Item('show_spans'), show_border=True, label='View') load_grp = VGroup( Item('username', editor=ComboboxEditor(name='available_user_names')), HGroup( Item('load_name', editor=EnumEditor(name='loads'), label='Loads'), icon_button_editor('add_button', 'add', tooltip='Add a load'), icon_button_editor('delete_button', 'delete', tooltip='Delete selected load'), icon_button_editor('archive_button', 'application-x-archive', tooltip='Archive a set of loads')), label='Load', show_border=True) samplegrp = VGroup( Item('irradiation', editor=ComboboxEditor(name='irradiations', refresh='refresh_irradiation')), Item('level', editor=ComboboxEditor(name='levels', refresh='refresh_level')), # Item('level'), Item('labnumber', editor=ComboboxEditor(name='labnumbers', refresh='refresh_labnumber')), Item('sample_info', style='readonly'), HGroup( Item('weight', label='Weight (mg)'), Item('retain_weight', label='Lock', tooltip='Retain the Weight for the next hole')), HGroup(Item('npositions', label='NPositions'), Item('auto_increment')), enabled_when='load_name', show_border=True, label='Sample') v = View(VGroup(load_grp, samplegrp, notegrp, viewgrp)) return v
def traits_view(self): self.sample_tabular_adapter.columns = [('Sample', 'name'), ('Material', 'material')] # tgrp = HGroup(icon_button_editor('clear_button', 'table_lightning', # enabled_when='selected', # tooltip='Clear contents of selected positions')) pi_grp = VGroup(UItem('principal_investigator', editor=EnumEditor(name='principal_investigators')), show_border=True, label='Principal Investigator') project_grp = VGroup(UItem('projects', editor=FilterTabularEditor(editable=False, use_fuzzy=True, selected='selected_projects', adapter=ProjectAdapter(), multi_select=True), width=175), show_border=True, label='Projects') sample_grp = VGroup(HGroup(UItem('sample_filter_parameter', editor=EnumEditor(name='sample_filter_parameters')), UItem('sample_filter', editor=ComboboxEditor(name='sample_filter_values'), width=75), # icon_button_editor('edit_sample_button', 'database_edit', # tooltip='Edit sample in database'), # icon_button_editor('add_sample_button', 'database_add', # tooltip='Add sample to database') icon_button_editor('clear_sample_button', 'clear', tooltip='Clear selected sample')), UItem('samples', editor=TabularEditor(adapter=self.sample_tabular_adapter, editable=False, selected='selected_samples', dclicked='dclicked', multi_select=True, column_clicked='column_clicked', stretch_last_section=False), width=75)) jgrp = HGroup(UItem('j'), Label(PLUSMINUS_ONE_SIGMA), UItem('j_err'), icon_button_editor('estimate_j_button', 'cog'), show_border=True, label='J') ngrp = HGroup(UItem('note'), UItem('weight'), show_border=True, label='Note') sgrp = HGroup(UItem('invert_flag'), Item('selection_freq', label='Freq'), show_border=True, label='Selection') v = View(VSplit(VGroup(HGroup(sgrp, jgrp), ngrp, pi_grp, project_grp), sample_grp, style_sheet=load_stylesheet('labnumber_entry'))) return v
def traits_view(self): cancel_tt = '''Cancel current run and continue to next run''' stop_tt = '''Cancel current run and stop queue''' start_tt = '''Start current experiment queue. Will continue to next opened queue when completed''' truncate_tt = '''Stop the current measurement process and continue to the next step in the measurement script''' truncate_style_tt = '''Normal= measure_iteration stopped at current step script continues Quick= measure_iteration stopped at current step script continues using abbreviated_count_ratio*counts''' end_tt = '''Stop the queue and the end of the current run''' schedule_tt = '''Set a scheduled start time''' v = View( HGroup( UItem('alive', editor=LEDEditor(colors=['red', 'green'], radius=30)), spacer(-20), icon_button_editor('pane.start_button', 'start', enabled_when='can_start', tooltip=start_tt), icon_button_editor('pane.configure_scheduled_button', 'calendar', enabled_when='can_start', tooltip=schedule_tt), icon_button_editor('pane.stop_button', 'stop', enabled_when='not can_start', tooltip=stop_tt), spacer(-20), Item('end_at_run_completion', label='Stop at Completion', tooltip=end_tt), spacer(-20), icon_button_editor( 'pane.abort_run_button', 'cancel', # enabled_when='can_cancel', tooltip=cancel_tt), spacer(-20), icon_button_editor('pane.truncate_button', 'lightning', enabled_when='measuring', tooltip=truncate_tt), UItem('truncate_style', enabled_when='measuring', tooltip=truncate_style_tt), UItem('pane.show_conditionals_button'), spacer(-75), CustomLabel('object.experiment_status.label', color_name='object.experiment_status.color', size=24, weight='bold'), spring)) return v
def traits_view(self): index_grp = VGroup(HGroup( Item('index_attr', editor=EnumEditor(name='attrs'), label='X Attr.'), Item('index_time_units', label='Units', visible_when='index_attr=="timestamp"')), HGroup( Item('index_error', label='Show'), Item('index_end_caps', label='End Caps', enabled_when='index_error'), Item('index_nsigma', label='NSigma', enabled_when='index_error')), label='X Error', show_border=True) value_grp = VGroup(HGroup( Item('value_attr', editor=EnumEditor(name='attrs'), label='Y Attr.'), Item('value_time_units', label='Units', visible_when='value_attr=="timestamp"')), HGroup( Item('value_error', label='Show'), Item('value_end_caps', label='End Caps', enabled_when='value_error'), Item('value_nsigma', label='NSigma', enabled_when='value_error')), label='Y Error', show_border=True) marker_grp = VGroup(Item('marker'), Item('marker_size', label='Size'), Item('marker_color', label='Color'), show_border=True) datasource_grp = HGroup( Item('datasource'), UItem('datasource_name', style='readonly', visible_when='use_file_source'), icon_button_editor('open_file_button', 'document-open', visible_when='use_file_source"')) v = View(HGroup(Item('auto_refresh'), icon_button_editor('refresh_plot_needed', 'refresh')), datasource_grp, index_grp, value_grp, marker_grp, Item('fit'), resizable=True) return v
def traits_view(self): v = View(HGroup(spring, icon_button_editor('add_button', 'add'), icon_button_editor('remove_button', 'delete', visible_when='removable'), UItem('parameter', editor=EnumEditor(name='parameters')), UItem('comparator', editor=EnumEditor(name='comparators')), UItem('criterion'), UItem('secondary_criterion', visible_when='comparator=="between"'))) return v
def traits_view(self): cols = [ ObjectColumn(name='name', label='', editable=False), ObjectColumn(name='counts'), ObjectColumn(name='settle', label='Settle (s)'), ObjectColumn(name='isotopes_label', editable=False, width=175, label='Isotopes') ] hgrp = VGroup( UItem('object.hop_sequence.hops', editor=myTableEditor(columns=cols, clear_selection_on_dclicked=True, sortable=False, selected='selected')), HGroup( icon_button_editor('add_hop_button', 'add', tooltip='Add peak hop'), icon_button_editor('remove_hop_button', 'delete', tooltip='Delete selected peak hop', enabled_when='selected'))) sgrp = UItem('selected', style='custom', editor=InstanceEditor()) grp = HSplit(hgrp, sgrp) save_action = Action(name='Save', image=icon('document-save'), enabled_when='object.saveable', action='save') save_as_acion = Action( name='Save As', image=icon('document-save-as'), action='save_as', enabled_when='object.saveasable', ) teditor = myTextEditor(bgcolor='#F7F6D0', fontsize=12, fontsize_name='fontsize', wrap=False, tab_width=15) v = View( VGroup( VGroup(grp, label='Editor'), VGroup(UItem('object.text', editor=teditor, style='custom'), label='Text')), # toolbar=ToolBar(), width=690, title=self.title, buttons=['OK', save_action, save_as_acion], resizable=True) return v
def traits_view(self): project_grp = VGroup( # HGroup(spacer(), # Label('Filter'), # UItem('project_filter', # width=75), # icon_button_editor('clear_selection_button', # 'cross', # tooltip='Clear selected'), # icon_button_editor('edit_project_button', 'database_edit', # tooltip='Edit selected project in database'), # icon_button_editor('add_project_button', 'database_add', # tooltip='Add project to database') # ), UItem('projects', editor=FilterTabularEditor(editable=False, selected='selected_projects', adapter=ProjectAdapter(), multi_select=False), width=75)) sample_grp = VGroup( HGroup( #Label('Filter'), UItem('sample_filter_parameter', editor=EnumEditor(name='sample_filter_parameters')), UItem('sample_filter', width=75), UItem('sample_filter', editor=EnumEditor(name='sample_filter_values'), width=-25), #UItem('filter_non_run_samples', # tooltip='Omit non-analyzed samples'), icon_button_editor('configure_sample_table', 'cog', tooltip='Configure Sample Table'), icon_button_editor('edit_sample_button', 'database_edit', tooltip='Edit sample in database'), icon_button_editor('add_sample_button', 'database_add', tooltip='Add sample to database')), UItem('samples', editor=TabularEditor( adapter=self.sample_tabular_adapter, editable=False, selected='selected_sample', multi_select=False, column_clicked='column_clicked', stretch_last_section=False ), width=75 ) ) v = View(VSplit(project_grp, sample_grp)) return v
def traits_view(self): v = okcancel_view( HGroup(icon_button_editor('add_button', 'add'), icon_button_editor('remove_button', 'delete')), UItem('actions', style='custom', editor=ListEditor(use_notebook=True, selected='selected', page_name='.label'))) return v
def traits_view(self): v = View(HGroup( icon_button_editor('fire', 'lightning', enabled_when='not firing', tooltip='Fire laser'), icon_button_editor('stop', 'stop', enabled_when='firing', tooltip='Stop firing'), UItem('fire_mode')), Item('nburst')) return v
def traits_view(self): ctrl_grp = HGroup(icon_button_editor('first_button', 'arrow-left-double-2'), icon_button_editor('prev_button', 'arrow-left-2'), icon_button_editor('next_button', 'arrow-right-2'), icon_button_editor('last_button', 'arrow-right-double-2')) v = View(VGroup(ctrl_grp, UItem('selected', editor=EnumEditor(name='available_names')), UItem('selection_tool', style='custom', editor=InstanceEditor()))) return v
def traits_view(self): v = View(HGroup( icon_button_editor('fire', 'lightning', enabled_when='not firing', tooltip='Fire laser'), icon_button_editor('stop', 'stop', enabled_when='firing', tooltip='Stop firing'), UItem('fire_mode')), Item('nburst')) return v
def traits_view(self): pigrp = HGroup(UItem('principal_investigator', editor=ComboboxEditor(name='principal_investigators', use_filter=False)), icon_button_editor('configure_pi_button', 'cog', tooltip='Set optional values for Principal Investigator'), icon_button_editor('add_principal_investigator_button', 'add', enabled_when='principal_investigator', tooltip='Add a principal investigator'), label='PrincipalInvestigator', show_border=True) prgrp = HGroup(UItem('project', # editor=EnumEditor(name='projects')), editor=ComboboxEditor(name='projects', use_filter=False)), UItem('generate_project_button', tooltip='Generate a default name for this project'), UItem('set_optionals_button', tooltip='Set optional values for current project'), icon_button_editor('add_project_button', 'add', enabled_when='project', tooltip='Add a project'), enabled_when='project_enabled', label='Project', show_border=True) mgrp = HGroup(UItem('material', editor=EnumEditor(name='materials')), # editor=ComboboxEditor(name='materials', use_filter=False)), UItem('grainsize', editor=ComboboxEditor(name='grainsizes', use_filter=False)), # icon_button_editor('add_material_button', 'add', # enabled_when='material', # tooltip='Add a material'), label='Material', show_border=True) sgrp = VGroup(HGroup(UItem('sample'), icon_button_editor('configure_sample_button', 'cog', tooltip='Set additional sample ' 'attributes'), icon_button_editor('add_sample_button', 'add', enabled_when='add_sample_enabled', tooltip='Add a sample')), VGroup(UItem('note', style='custom'), label='Note', show_border=True), enabled_when='sample_enabled', label='Sample', show_border=True) v = View(VGroup(pigrp, prgrp, mgrp, sgrp, CustomLabel('pane.help_str') )) return v
def _get_info_group(self): grp = Group( HGroup( run_factory_item('selected_irradiation', show_label=False, editor=EnumEditor(name=run_factory_name('irradiations'))), run_factory_item('selected_level', show_label=False, editor=EnumEditor(name=run_factory_name('levels')))), HGroup(run_factory_item('special_labnumber', show_label=False, editor=EnumEditor(values=SPECIAL_NAMES)), run_factory_item('run_block', show_label=False, editor=EnumEditor(name=run_factory_name('run_blocks'))), icon_button_editor(run_factory_name('edit_run_blocks'), 'cog'), run_factory_item('frequency_model.frequency', width=50), icon_button_editor(run_factory_name('edit_frequency_button'),'cog'), # run_factory_item('freq_before', label='Before'), # run_factory_item('freq_after', label='After'), spring), HGroup(run_factory_item('labnumber', tooltip='Enter a Labnumber', width=100, editor=ComboboxEditor(name=run_factory_name('labnumbers'))), run_factory_item('aliquot', width=50), spring), HGroup(run_factory_item('flux'), Label(u'\u00b1'), run_factory_item('flux_error', show_label=False), icon_button_editor(run_factory_name('save_flux_button'), 'database_save', tooltip='Save flux to database'), enabled_when=run_factory_name('labnumber')), HGroup( run_factory_item('weight', label='Weight (mg)', tooltip='(Optional) Enter the weight of the sample in mg. ' 'Will be saved in Database with analysis'), run_factory_item('comment', tooltip='(Optional) Enter a comment for this sample. ' 'Will be saved in Database with analysis'), run_factory_item('auto_fill_comment', show_label=False, tooltip='Auto fill "Comment" with IrradiationLevel:Hole, e.g A:9'), # run_factory_item('comment_template', # editor=EnumEditor(name=run_factory_name('comment_templates')), # show_label=False), icon_button_editor(run_factory_name('edit_comment_template'), 'cog', tooltip='Edit comment template')), show_border=True, label='Sample Info') return grp
def traits_view(self): igrp=VGroup(UItem('ideogram_visible'), icon_button_editor('ideogram_options_button', 'cog', enabled_when='ideogram_visible'), label='Ideogram',show_border=True) sgrp=VGroup( UItem('spectrum_visible'), icon_button_editor('spectrum_options_button', 'cog', enabled_when='spectrum_visible'), label='Spectrum',show_border=True) v=View(VGroup(igrp,sgrp)) return v
def traits_view(self): notegrp = VGroup( Item('retain_note', tooltip='Retain the Note for the next hole', label='Lock'), Item('note', style='custom', show_label=False), show_border=True, label='Note') viewgrp = VGroup( HGroup(Item('use_cmap', label='Color Map'), UItem('cmap_name', enabled_when='use_cmap')), Item('show_hole_numbers'), Item('show_labnumbers'), Item('show_weights'), # Item('show_spans'), show_border=True, label='View') load_grp = VGroup(Item('username', editor=ComboboxEditor(name='available_user_names')), HGroup(Item('load_name', editor=EnumEditor(name='loads'), label='Loads'), icon_button_editor('add_button', 'add', tooltip='Add a load'), icon_button_editor('delete_button', 'delete', tooltip='Delete selected load'), icon_button_editor('archive_button', 'application-x-archive', tooltip='Archive a set of loads')), label='Load', show_border=True) samplegrp = VGroup( Item('irradiation', editor=ComboboxEditor(name='irradiations', refresh='refresh_irradiation')), Item('level', editor=ComboboxEditor(name='levels', refresh='refresh_level')), # Item('level'), Item('labnumber', editor=ComboboxEditor(name='labnumbers', refresh='refresh_labnumber')), Item('sample_info', style='readonly'), HGroup( Item('weight', label='Weight (mg)'), Item('retain_weight', label='Lock', tooltip='Retain the Weight for the next hole')), HGroup(Item('npositions', label='NPositions'), Item('auto_increment')), enabled_when='load_name', show_border=True, label='Sample') v = View( VGroup( load_grp, samplegrp, notegrp, viewgrp)) return v
def traits_view(self): cancel_tt = '''Cancel current run and continue to next run''' stop_tt = '''Cancel current run and stop queue''' start_tt = '''Start current experiment queue. Will continue to next opened queue when completed''' truncate_tt = '''Stop the current measurement process and continue to the next step in the measurement script''' truncate_style_tt = '''Normal= measure_iteration stopped at current step script continues Quick= measure_iteration stopped at current step script continues using abbreviated_count_ratio*counts''' end_tt = '''Stop the queue and the end of the current run''' schedule_tt = '''Set a scheduled start time''' v = View(HGroup(UItem('alive', editor=LEDEditor(colors=['red', 'green'], radius=30)), spacer(-20), icon_button_editor('pane.start_button', 'start', enabled_when='can_start', tooltip=start_tt), icon_button_editor('pane.configure_scheduled_button', 'calendar', enabled_when='can_start', tooltip=schedule_tt), icon_button_editor('pane.stop_button', 'stop', enabled_when='not can_start', tooltip=stop_tt), spacer(-20), Item('end_at_run_completion', label='Stop at Completion', tooltip=end_tt), spacer(-20), icon_button_editor('pane.abort_run_button', 'cancel', # enabled_when='can_cancel', tooltip=cancel_tt), spacer(-20), icon_button_editor('pane.truncate_button', 'lightning', enabled_when='measuring', tooltip=truncate_tt), UItem('truncate_style', enabled_when='measuring', tooltip=truncate_style_tt), UItem('pane.show_conditionals_button'), spacer(-75), CustomLabel('object.experiment_status.label', color_name='object.experiment_status.color', size=24, weight='bold'), spring)) return v
def traits_view(self): v = View( HGroup( spring, icon_button_editor('add_button', 'add'), icon_button_editor('remove_button', 'delete', visible_when='removable'), UItem('parameter', editor=EnumEditor(name='parameters')), UItem('comparator', editor=EnumEditor(name='comparators')), UItem('criterion'), UItem('secondary_criterion', visible_when='comparator=="between"'))) return v
def traits_view(self): egrp = VGroup(HGroup(Item('ex'), Item('ey')), BorderHGroup(icon_button_editor('increment_down_x', 'arrow_left'), icon_button_editor('increment_up_x', 'arrow_right'), UItem('x_magnitude'), label='X'), BorderHGroup(icon_button_editor('increment_up_y', 'arrow_up'), icon_button_editor('increment_down_y', 'arrow_down'), UItem('y_magnitude'), label='Y'), BorderHGroup(UItem('width'), icon_button_editor('width_increment_minus_button', 'delete'), icon_button_editor('width_increment_plus_button', 'add'), label='Width'), BorderHGroup(UItem('height'), icon_button_editor('height_increment_minus_button', 'delete'), icon_button_editor('height_increment_plus_button', 'add'), label='Height'), UItem('save_button')) g = VGroup(UItem('groups', style='custom', editor=ListEditor(use_notebook=True, page_name='.name', selected='selected_group', editor=InstanceEditor()))) v = View(VGroup(g, egrp)) return v
def traits_view(self): pigrp = HGroup( UItem('principal_investigator', editor=ComboboxEditor(name='principal_investigators')), icon_button_editor('add_principal_investigator_button', 'add', enabled_when='principal_investigator', tooltip='Add a principal investigator'), label='PrincipalInvestigator', show_border=True) prgrp = HGroup(UItem('project', editor=ComboboxEditor(name='projects')), icon_button_editor('add_project_button', 'add', enabled_when='project', tooltip='Add a project'), enabled_when='project_enabled', label='Project', show_border=True) mgrp = HGroup(UItem('material', editor=ComboboxEditor(name='materials')), UItem('grainsize', editor=ComboboxEditor(name='grainsizes')), icon_button_editor('add_material_button', 'add', enabled_when='material', tooltip='Add a material'), label='Material', show_border=True) sgrp = HGroup(UItem('sample'), icon_button_editor('add_sample_button', 'add', enabled_when='sample', tooltip='Add a sample'), enabled_when='sample_enabled', label='Sample', show_border=True) v = View(VGroup( pigrp, prgrp, mgrp, sgrp, )) return v
def traits_view(self): v = View( VGroup( HGroup( icon_button_editor('up_button', 'arrow_left', tooltip='Go back one directory'), CustomLabel('up_directory_name', size=14, color='maroon'), spring), VSplit( VGroup( UItem('directories', editor=TabularEditor( selected='selected_directory', dclicked='directory_dclicked', editable=False, adapter=ScriptBrowserAdapter()), height=0.25), HGroup( Label('Current Dir.'), CustomLabel('selected_directory_name', size=14, color='maroon'))), UItem('items', editor=TabularEditor(selected='selected', dclicked='dclicked', editable=False, adapter=ScriptBrowserAdapter()), height=0.75)))) return v
def traits_view(self): dbconngrp = VGroup(Item('name'), Item('host'), Item('username'), Item('password'), HGroup( icon_button_editor('test_connection_button', 'database_connect', tooltip='Test connection'), Spring(width=10, springy=False), Label('Status:'), CustomLabel('_connected_label', label='Status', weight='bold', color_name='_connected_color')), label='Database Connection', show_border=True) csgrp = VGroup(Item('use_connection_status', label='Use Connection Status', tooltip='Enable connection status checking'), Item('connection_status_period', label='Period (s)', tooltip='Check connection status every X seconds', enabled_when='use_connection_status'), label='Connection Status', show_border=True) v = View(VGroup(dbconngrp, csgrp)) return v
def traits_view(self): comms_grp = VGroup(UItem('communication_grp', style='custom'), visible_when='comms_visible', show_border=True, label='Communications') scan_grp = VGroup(Item('scan.enabled'), VGroup(Item('scan.graph'), Item('scan.record'), Item('scan.auto_start'), Item('scan.period'), enabled_when='scan.enabled'), UItem('save_button'), show_border=True, label='Scan') v = View(VGroup( HGroup( UReadonly('config_name'), icon_button_editor('save_button', 'document-save', enabled_when='config_path')), comms_grp, scan_grp), height=500, resizable=True) return v
def traits_view(self): nodes = [ TreeNode( node_for=[Hierarchy], children='children', auto_open=True, # on_click=self.model._on_click, label='name', ), TreeNode(node_for=[FilePath], label='name') ] v = View( VGroup( HGroup(Item('chronology_visible', label='View Chronology'), icon_button_editor('filter_by_date_button', 'calendar'), UItem('date_filter')), HGroup(Item('filter_hierarchy_str', label='Name Filter')), UItem('object.hierarchy.chronology', editor=TabularEditor(editable=False, selected='selected_root', dclicked='dclicked', adapter=FilePathAdapter()), visible_when='chronology_visible'), UItem('hierarchy', visible_when='not chronology_visible', show_label=False, editor=TreeEditor(auto_open=1, selected='selected_root', dclick='dclicked', nodes=nodes, editable=False)))) return v