示例#1
0
    def traits_view(self):
        ident_grp = VGroup(Item('irradiation', editor=EnumEditor(name='irradiations')),
                           Item('level', editor=EnumEditor(name='levels')),
                           Item('identifier', editor=EnumEditor(name='identifiers')),
                           Item('aliquot_offset'),
                           Item('step_offset'),
                           Item('dry',
                                tooltip='Do a dry run. Do not save changes to database'),
                           Item('use_secondary', label='Use Secondary DB',
                                tooltip='Also modify the secondary db, e.g. a Mass Spec db.'))

        ogrp = UItem('analyses', editor=TabularEditor(adapter=AnalysisAdapter(),
                                                      editable=False))
        ngrp = UItem('modified_analyses', editor=TabularEditor(adapter=AnalysisAdapter(),
                                                               refresh='refresh',
                                                               multi_select=True,
                                                               selected='selected'))
        agrp = HGroup(ogrp, ngrp)
        v = View(VGroup(ident_grp, agrp),
                 resizable=True,
                 width=600,
                 kind='livemodal',
                 title='Edit Analyses',
                 buttons=['OK', 'Cancel'])
        return v
示例#2
0
 def traits_view(self):
     v = View(
         VGroup(
             HGroup(Item('name', label='Analysis Group Name')),
             VGroup(
                 UItem('items', editor=TabularEditor(adapter=AnalysisAdapter(),
                                                     operations=['delete'])),
                 UItem('ritems', editor=TabularEditor(adapter=AnalysisAdapter(),
                                                      operations=['delete'])))),
         resizable=True,
         buttons=['OK', 'Cancel'],
         kind='livemodal',
         title='Analysis Group Entry')
     return v
示例#3
0
    def traits_view(self):
        include_grp = HGroup(Item('include_analyses', label='Analyses'),
                             Item('include_blanks', label='Blanks'),
                             Item('include_airs', label='Airs'),
                             Item('include_cocktails', label='Cocktails'),
                             label='Include',
                             show_border=True)
        import_grp = VGroup(HGroup(spring, UItem('import_button')),
                            label='Import',
                            show_border=True)
        source_grp = VGroup(Item('object.extractor.dbconn_spec',
                                 style='custom',
                                 show_label=False),
                            HGroup(
                                spring,
                                Item('object.extractor.connect_button',
                                     show_label=False)),
                            label='Source')

        v = View(VGroup(
            HGroup(include_grp, import_grp),
            VGroup(
                HGroup(spring, Item('data_source')),
                VGroup(
                    source_grp,
                    VGroup(HGroup(
                        Item('import_kind', show_label=False),
                        UItem('open_button',
                              visible_when='import_kind=="rid_list"')),
                           UItem('text_selected'),
                           HGroup(
                               Item('names',
                                    show_label=False,
                                    editor=TabularEditor(
                                        adapter=ImportNameAdapter(),
                                        editable=False,
                                        selected='selected',
                                        multi_select=True,
                                        scroll_to_row='scroll_to_row')),
                               Item('imported_names',
                                    show_label=False,
                                    editor=TabularEditor(
                                        adapter=ImportedNameAdapter(),
                                        editable=False))),
                           label='Results')))),
                 kind='livemodal',
                 buttons=['OK', 'Cancel'],
                 title='Import Irradiations')
        return v
示例#4
0
    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
示例#5
0
    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
示例#6
0
 def _groups(self):
     igrp = Group(self._items_grp(), label='Commits')
     tgrp = VGroup(UItem('tags',
                         editor=TabularEditor(adapter=TagAdapter(),
                                              editable=False,
                                              selected='selected')),
                   label='Tags')
     return [self._info_grp(), Tabbed(tgrp, igrp)]
示例#7
0
 def traits_view(self):
     editor = TabularEditor(adapter=ExportAnalysisAdapter(), editable=False)
     v = View(
         VGroup(
             HGroup(Item('kind', label='Export Kind')),
             # VGroup(UItem('object.exporter.destination', style='custom'),
             #        label='Destination', show_border=True),
             UItem('exported_analyses', editor=editor)))
     return v
示例#8
0
 def traits_view(self):
     v = View(
         UItem('labels',
               editor=TabularEditor(editable=False,
                                    selected='selected',
                                    multi_select=True,
                                    dclicked='dclick',
                                    refresh='refresh_needed',
                                    adapter=LabelTabularAdapter())))
     return v
示例#9
0
 def traits_view(self):
     v = View(UItem('analyses', editor=TabularEditor(adapter=AnalysisAdapter(ref=self.ref),
                                                     multi_select=True,
                                                     selected='selected',
                                                     editable=False)),
              title='Select Analyses',
              buttons=['OK', 'Cancel'],
              resizable=True,
              width=500)
     return v
示例#10
0
    def traits_view(self):
        tblgrp = Group(
            UItem('statistics',
                  height=100,
                  editor=TabularEditor(adapter=SeriesStatsTabularAdapter(),
                                       update='update_needed')),
            visible_when='object.plotter_options.show_statistics_as_table',
            label='Stats.')

        v = View(VSplit(self.get_component_view(), tblgrp), resizable=True)
        return v
示例#11
0
 def traits_view(self):
     v = okcancel_view(HGroup(Item('name_filter', label='Name'),
                              Item('user_filter', label='User')),
                       UItem('tags',
                             editor=TabularEditor(
                                 adapter=DataReductionItemAdapter(),
                                 editable=False,
                                 selected='selected')),
                       width=500,
                       title='Select Data Reduction Tag')
     return v
    def traits_view(self):
        v = View(VGroup(
            UItem('projects', editor=TabularEditor(adapter=ProjectAdapter(),
                                                   multi_select=True,
                                                   selected='selected_projects')),
            HGroup(icon_button_editor('delete_button', 'delete',
                                      tooltip='Remove the selected analysis groups from the database',
                                      enabled_when='selected'),
                   spring),
            UItem('groups',
                  editor=TabularEditor(adapter=AnalysisGroupAdapter(),
                                       multi_select=True,
                                       refresh='refresh',
                                       selected='selected'))),
                 resizable=True,
                 width=500,

                 title='Delete Analysis Group',
                 buttons=['OK', 'Cancel'])
        return v
示例#13
0
 def traits_view(self):
     v = View(VGroup(
         UItem('repositories',
               editor=TabularEditor(adapter=RepositoryTabularAdapter(),
                                    selected='selected_repositories',
                                    multi_select=True)),
         UItem('work_offline_button',
               enabled_when='selected_repositories')),
              title='Work Offline',
              resizable=True,
              width=500,
              height=500)
     return v
示例#14
0
 def traits_view(self):
     v = View(HGroup(Item('name_filter', label='Name'),
                     Item('user_filter', label='User')),
              UItem('tags',
                    editor=TabularEditor(adapter=DataReductionItemAdapter(),
                                         editable=False,
                                         selected='selected')),
              buttons=['OK','Cancel'],
              width=500,
              kind='livemodal',
              resizable=True,
              title='Select Data Reduction Tag')
     return v
示例#15
0
    def traits_view(self):
        table = UItem('items', editor=TabularEditor(adapter=ItemAdapter(),
                                                    multi_select=True,
                                                    operations=['delete']))
        tag = HGroup(Item('tagname', label='Tag'),
                     UItem('edit_comment_button'))

        v = View(VGroup(tag, table),
                 resizable=True,
                 width=500,
                 height=400,
                 buttons=['OK', 'Cancel'],
                 kind='livemodal', title='Data Reduction Tagging')
        return v
示例#16
0
    def traits_view(self):
        v = View(Item('tag'),
                 UItem('items',
                       editor=TabularEditor(adapter=ItemAdapter(),
                                            multi_select=True,
                                            operations=['delete'])),
                 HGroup(Item('use_filter',
                             label='Remove "Invalid" analyses from figure'),
                        defined_when='items'),
                 resizable=True,
                 width=500,
                 height=400,
                 buttons=['OK', 'Cancel'],
                 kind='livemodal',
                 title='Tags')

        return v
示例#17
0
 def traits_view(self):
     action_grp = VGroup(
         HGroup(UItem('add_sleep_button', width=-60), UItem('duration')),
         HGroup(UItem('add_info_button', width=-60), UItem('info_str')),
         HGroup(
             Item(
                 'record_valve_actions',
                 tooltip=
                 'Should valve actuations be added to the action list. '
                 'You can also hold down the "Shift" key to suppress addition',
                 label='Record Actions')),
         UItem('actions',
               editor=TabularEditor(adapter=ActionsAdapter(),
                                    operations=['move', 'delete'],
                                    selected='selected',
                                    refresh='refresh_needed',
                                    multi_select=True)))
     v = View(action_grp)
     return v
示例#18
0
    def traits_view(self):
        note_grp = VGroup(UItem('note', style='custom'),
                          show_border=True,
                          label='Note')

        v = okcancel_view(VGroup(
            Item('tag'), note_grp,
            UItem('items',
                  editor=TabularEditor(adapter=ItemAdapter(),
                                       multi_select=True,
                                       selected='selected',
                                       operations=['delete'])),
            HGroup(Item('use_filter',
                        label='Remove "Invalid" analyses from figure'),
                   defined_when='items')),
                          resizable=True,
                          width=500,
                          height=400,
                          title='Tags')

        return v
示例#19
0
 def traits_view(self):
     v = View(
         VGroup(
             HGroup(spring, Item('limit')),
             VSplit(
                 UItem('items',
                       height=0.75,
                       editor=TabularEditor(adapter=CommitAdapter(),
                                            multi_select=True,
                                            editable=False,
                                            selected='selected')),
                 UItem('selected_commit',
                       editor=InstanceEditor(),
                       height=0.25,
                       style='custom')),
             HGroup(
                 spring,
                 icon_button_editor('diff_button',
                                    'edit_diff',
                                    enabled_when='diffable'),
                 UItem('checkout_button', enabled_when='checkoutable'))))
     return v
示例#20
0
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.save_as_options',
                           'save_as',
                           tooltip='Save options with a new name'),
        icon_button_editor('controller.add_options',
                           'add',
                           tooltip='Add new plot options'),
        icon_button_editor('controller.delete_options',
                           'delete',
                           tooltip='Delete current plot options',
                           enabled_when='delete_enabled'),
        icon_button_editor('controller.factory_default',
                           'edit-bomb',
                           enabled_when='selected',
                           tooltip='Apply factory defaults'))

    sgrp = UItem('subview_names',
                 width=-120,
                 editor=TabularEditor(editable=False,
                                      adapter=SubviewAdapter(),
                                      selected='selected_subview'))

    ogrp = UItem('subview', style='custom')
    bgrp = HGroup(sgrp, ogrp)

    v = okcancel_view(VGroup(agrp, bgrp),
                      width=800,
                      height=750,
                      resizable=True,
                      title=title)
    return v
示例#21
0
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
示例#22
0
 def _items_grp(self):
     return UItem('items',
                  editor=TabularEditor(adapter=CommitAdapter(),
                                       editable=False,
                                       selected='selected'))