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): 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): 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): 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=TabularEditor(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): 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=TabularEditor(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): irrad = HGroup( spacer(), Item('irradiation', width=-150, editor=EnumEditor(name='irradiations')), icon_button_editor('edit_irradiation_button', 'database_edit', enabled_when='edit_irradiation_enabled'), icon_button_editor('add_irradiation_button', 'database_add')) level = HGroup( spacer(), Label('Level:'), spacer(-23), UItem('level', width=-150, editor=EnumEditor(name='levels')), icon_button_editor('edit_level_button', 'database_edit', enabled_when='edit_level_enabled'), icon_button_editor('add_level_button', 'database_add')) conn = HGroup(spring, CustomLabel('datasource_url', color='maroon'), spring) v = View(VGroup(conn, irrad, level)) return v
def traits_view(self): magnet_pos_grp = HGroup( UItem('_detector', editor=EnumEditor(name='detector_names')), UItem('isotope', editor=EnumEditor(name='isotopes')), icon_button_editor( 'set_magnet_position_button', 'arrow_left', tooltip='Apply Detector/Isotope magnet position')) magnet_grp = VGroup(magnet_pos_grp, UItem('magnet', style='custom', editor=InstanceEditor()), label='Magnet') detector_grp = VGroup(HGroup(spring, Label('Deflection'), Spring(springy=False, width=70)), Item('detectors', show_label=False, editor=ListEditor(style='custom', mutable=False, editor=InstanceEditor())), show_border=True, label='Detectors') rise_grp = UItem('rise_rate', style='custom') source_grp = UItem('source', style='custom', editor=InstanceEditor()) # cols = [ObjectColumn(name='text', label='Text', # width=0.40, ), # ObjectColumn(name='data_x', # format='%0.1f', # width=0.22, # label='Time(s)', editable=False), # ObjectColumn(name='data_y', # format='%0.4f', # width=0.22, # label='Intensity', editable=False), # CheckboxColumn(name='visible', width=0.12)] graph_cntrl_grp = VGroup( Item('graph_scan_width', label='Scan Width (mins)'), Item('graph_scale', label='Scale'), Item('graph_y_auto', label='Autoscale Y'), Item('graph_ymax', label='Max', format_str='%0.3f'), Item('graph_ymin', label='Min', format_str='%0.3f'), HGroup( icon_button_editor('clear_button', 'clear', tooltip='Clear and reset graph'), spring), show_border=True, label='Graph') control_grp = Group(magnet_grp, rise_grp, source_grp, layout='tabbed') v = View( VGroup( HGroup( Item( 'spectrometer_configuration', label='Configuration', editor=EnumEditor(name='spectrometer_configurations')), icon_button_editor( 'set_spectrometer_configuration', 'brick-go', tooltip='set selected spectrometer configuration'), spacer(10), Item('integration_time', editor=EnumEditor(name='integration_times'), label='Integration Time(s)')), HGroup(graph_cntrl_grp, detector_grp), control_grp)) return v
def traits_view(self): magnet_grp = VGroup( HGroup( UItem('_detector', editor=EnumEditor(name='detector_names')), UItem('isotope', editor=EnumEditor(name='isotopes'))), UItem('magnet', style='custom'), # UItem('scanner', style='custom'), label='Magnet') detector_grp = VGroup( HGroup( spring, Label('Deflection'), Spring(springy=False, width=70)), Item('detectors', show_label=False, editor=ListEditor(style='custom', mutable=False, editor=InstanceEditor())), label='Detectors') rise_grp = UItem('rise_rate', style='custom') source_grp = UItem('source', style='custom') # cols = [ObjectColumn(name='text', label='Text', # width=0.40, ), # ObjectColumn(name='data_x', # format='%0.1f', # width=0.22, # label='Time(s)', editable=False), # ObjectColumn(name='data_y', # format='%0.4f', # width=0.22, # label='Intensity', editable=False), # CheckboxColumn(name='visible', width=0.12)] graph_cntrl_grp = VGroup( Item('graph_scan_width', label='Scan Width (mins)'), Item('graph_scale', label='Scale'), Item('graph_y_auto', label='Autoscale Y'), Item('graph_ymax', label='Max', format_str='%0.3f'), Item('graph_ymin', label='Min', format_str='%0.3f'), HGroup(icon_button_editor('clear_button', 'clear', tooltip='Clear and reset graph'), spring), # HGroup( # icon_button_editor('start_record_button','media-record', # tooltip='Start recording', # enabled_when='not _recording'), # icon_button_editor('stop_record_button', # 'media-playback-stop', # tooltip='Stop recording', # enabled_when='_recording'), # icon_button_editor('add_marker_button', 'flag', # enabled_when='_recording'), # show_border=True, # label='Record Scan'), # HGroup( # icon_button_editor('snapshot_button', 'camera'), # show_border=True, label='Snapshot', ), # VGroup(HGroup(icon_button_editor('clear_all_markers_button', 'delete', # tooltip='Remove all markers'), # icon_button_editor('object.graph.add_visual_marker_button', 'add'), # Item('object.graph.marker_text', label='Text'), # Item('object.graph.marker_tool.label_with_intensity', # tooltip='Label marker with isotopic intensity', # label='Intensity')), # # UItem('object.graph.markers', editor=TableEditor(columns=cols, # selection_mode='rows', # sortable=False, # deletable=True)), # show_border=True, label='Markers'), label='Graph') control_grp = Group( graph_cntrl_grp, detector_grp, rise_grp, magnet_grp, source_grp, layout='tabbed') v = View( VGroup( HGroup(Item('spectrometer_configuration', label='Configuration', editor=EnumEditor(name='spectrometer_configurations')), icon_button_editor('set_spectrometer_configuration', 'brick-go', tooltip='set selected spectrometer configuration'), spacer(10), Item('integration_time', label='Integration Time(s)')), control_grp)) return v
def traits_view(self): magnet_pos_grp = HGroup( UItem('_detector', editor=EnumEditor(name='detector_names')), UItem('isotope', editor=EnumEditor(name='isotopes')), icon_button_editor('set_magnet_position_button', 'arrow_left', tooltip='Apply Detector/Isotope magnet position')) magnet_grp = VGroup(magnet_pos_grp, UItem('magnet', style='custom', editor=InstanceEditor()), label='Magnet') detector_grp = VGroup( HGroup( spring, Label('Deflection'), Spring(springy=False, width=70)), Item('detectors', show_label=False, editor=ListEditor(style='custom', mutable=False, editor=InstanceEditor())), show_border=True, label='Detectors') rise_grp = UItem('rise_rate', style='custom') source_grp = UItem('source', style='custom', editor=InstanceEditor()) # cols = [ObjectColumn(name='text', label='Text', # width=0.40, ), # ObjectColumn(name='data_x', # format='%0.1f', # width=0.22, # label='Time(s)', editable=False), # ObjectColumn(name='data_y', # format='%0.4f', # width=0.22, # label='Intensity', editable=False), # CheckboxColumn(name='visible', width=0.12)] graph_cntrl_grp = VGroup( Item('graph_scan_width', label='Scan Width (mins)'), Item('graph_scale', label='Scale'), Item('graph_y_auto', label='Autoscale Y'), Item('graph_ymax', label='Max', format_str='%0.3f'), Item('graph_ymin', label='Min', format_str='%0.3f'), HGroup(icon_button_editor('clear_button', 'clear', tooltip='Clear and reset graph'), spring), show_border=True, label='Graph') control_grp = Group(magnet_grp, rise_grp, source_grp, layout='tabbed') v = View( VGroup( HGroup(Item('spectrometer_configuration', label='Configuration', editor=EnumEditor(name='spectrometer_configurations')), icon_button_editor('set_spectrometer_configuration', 'brick-go', tooltip='set selected spectrometer configuration'), spacer(10), Item('integration_time', editor=EnumEditor(name='integration_times'), label='Integration Time(s)')), HGroup(graph_cntrl_grp, detector_grp), control_grp)) return v
def traits_view(self): def hitem(n, l, **kw): return HGroup(Label(l), spring, Item(n, show_label=False, **kw), Spring(springy=False, width=275)) magnet_grp = VGroup( HGroup( UItem('detector', editor=EnumEditor(name='detectors')), UItem('isotope', editor=EnumEditor(name='isotopes') )), UItem('magnet', style='custom'), UItem('scanner', style='custom'), label='Magnet' ) detector_grp = VGroup( HGroup( spring, Label('Deflection'), Spring(springy=False, width=70), ), Item('detectors', show_label=False, editor=ListEditor(style='custom', mutable=False, editor=InstanceEditor())), label='Detectors' ) rise_grp = UItem('rise_rate', style='custom') source_grp = UItem('source', style='custom') graph_cntrl_grp = VGroup( Item('graph_scan_width', label='Scan Width (mins)'), Item('graph_scale', label='Scale'), Item('graph_y_auto', label='Autoscale Y'), Item('graph_ymax', label='Max', format_str='%0.3f'), Item('graph_ymin', label='Min', format_str='%0.3f'), HGroup(UItem('record_button', editor=ButtonEditor(label_value='record_label')), Item('add_marker_button', show_label=False, enabled_when='_recording')), label='Graph' ) control_grp = Group( graph_cntrl_grp, detector_grp, rise_grp, magnet_grp, source_grp, layout='tabbed') v = View( VGroup( HGroup(spacer(10), Item('integration_time', label='Integration Time(s)')), control_grp ), # Group( # magnet_grp, # detector_grp, # layout='tabbed' ) # ) return v