Example #1
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
Example #2
0
    def traits_view(self):
        cols = [CheckboxColumn(name='use'),
                ObjectColumn(name='name', editable=False)]

        editor = TableEditor(columns=cols,
                             selected='selected_device')
        v = View(UItem('devices', editor=editor))
        return v
 def traits_view(self):
     cols = [ObjectColumn(name='name', editable=False),
             ObjectColumn(name='connected', editable=False)]
     v = View(UItem('connectables',
                    editor=TableEditor(editable=False,
                                       sortable=False,
                                       columns=cols)))
     return v
Example #4
0
    def traits_view(self):
        ncols = [
            ObjectColumn(name='name', editable=False),
            ObjectColumn(name='value')
        ]

        bcols = [
            ObjectColumn(name='name', editable=False),
            CheckboxColumn(name='value')
        ]

        v = okcancel_view(HGroup(
            UItem(
                'numeric_options',
                editor=TableEditor(columns=ncols),
            ), UItem('bool_options', editor=TableEditor(columns=bcols))),
                          title='Script Options')
        return v
Example #5
0
    def traits_view(self):
        cols = [
            CheckboxColumn(name='use'),
            ObjectColumn(name='name', editable=False)
        ]

        editor = TableEditor(columns=cols, selected='selected_device')

        cols = [
            ObjectColumn(name='name', label='Name'),
            ObjectColumn(name='last_value', label='Value'),
            ObjectColumn(name='last_time_str', label='Timestamp')
        ]

        veditor = TableEditor(columns=cols, editable=False)

        v = View(
            VSplit(UItem('devices', editor=editor),
                   UItem('values', editor=veditor)))
        return v
Example #6
0
    def traits_view(self):
        ncols = [
            ObjectColumn(name='name', editable=False),
            ObjectColumn(name='value')
        ]

        bcols = [
            ObjectColumn(name='name', editable=False),
            CheckboxColumn(name='value')
        ]

        v = View(HGroup(
            UItem(
                'numeric_options',
                editor=TableEditor(columns=ncols),
            ), UItem('bool_options', editor=TableEditor(columns=bcols))),
                 resizable=True,
                 title='Script Options',
                 buttons=['OK', 'Cancel'])
        return v
Example #7
0
 def traits_view(self):
     cols = [
         ObjectColumn(name='binding', editor=KeyBindingEditor()),
         ObjectColumn(name='description', editable=False, width=400)
     ]
     v = View(UItem('bindings', editor=TableEditor(columns=cols)),
              width=500,
              height=600,
              title='Edit Key Bindings',
              kind='livemodal',
              buttons=['OK', 'Cancel'],
              resizable=True)
     return v
    def traits_view(self):
        cols = [ObjectColumn(name='name', label='Component'),
                MagnitudeColumn(name='value',
                                label=''),
                ObjectColumn(name='value', label='Value',
                             width=100,
                             format_func=lambda x: floatfmt(x, n=5))]
        editor = TableEditor(columns=cols,
                             sortable=False,
                             editable=False)

        e1 = BorderVGroup(UItem('error_components', editor=editor), label='With J Err.')
        e2 = BorderVGroup(UItem('error_components2', editor=editor), label='With Position Err.')
        v = View(HGroup(e1, e2))
        return v
Example #9
0
    def traits_view(self):
        cols = [
            ObjectColumn(name='name', label='Component'),
            MagnitudeColumn(name='value', label='', width=200),
            ObjectColumn(name='value',
                         label='Value',
                         format_func=lambda x: floatfmt(x, n=2))
        ]
        editor = TableEditor(columns=cols, sortable=False, editable=False)

        v = View(
            VGroup(
                # Item('pie_enabled', label='Show Pie Chart',
                #      visible_when='pie_enabled'),
                HGroup(Item('pie_enabled', label='Show Pie Chart')),
                VGroup(UItem('error_components', editor=editor),
                       visible_when='not pie_enabled'),
                VSplit(UItem('error_components', editor=editor),
                       UItem('pie_canvas', editor=ComponentEditor()),
                       visible_when='pie_enabled')))
        return v