def traits_view(self): cgrp = VGroup( UItem('conflicts', editor=TabularEditor(adapter=ConflictAdapter(), operations=[], multi_select=True, selected='controller.selected', dclicked='controller.dclicked'))) bgrp = VGroup(UItem('controller.accept_our_button'), UItem('controller.accept_their_button'), enabled_when='controller.selected') tgrp = HGroup( VGroup(UItem('our_text', style='custom', editor=TextEditor(read_only=True)), show_border=True, label='Our'), VGroup(UItem('their_text', style='custom', editor=TextEditor(read_only=True)), show_border=True, label='Their')) v = View(VGroup(HGroup(cgrp, bgrp), tgrp), buttons=['OK'], title='Merge', resizable=True) 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): v = View(UItem('console', style='custom', editor=TextEditor(read_only=True)), UItem('message', editor=TextEditor(enter_set=True, auto_set=False)), width=500, height=400, resizable=True) return v
class _stream_seishub_read_view(HasTraits): host = Str("localhost") port = Int(8080) timeout = Int(100) start_time = UTCDateTime("2010-01-01 00:20:03") time_interval = Int(30) network_id = Str("PF") station_id = List(Str("")) location_id = Str("") channel_id = Str("HLE") get_paz = Bool(False) remove_mean = Bool(False) remove_trend = Bool(False) trait_view = View(HGroup(Item('host'), Item('port'), Item('timeout'), label='Server'), HGroup(Item('start_time', editor=TextEditor()), Item('time_interval'), label='Time'), HGroup(Item('remove_mean'), Item('remove_trend'), label='Process'), HGroup(Item('network_id', label='nw'), Item('station_id', label='sta.', height=100, width=120), Item('location_id', label='loc.'), Item('channel_id', label='ch'), Item('get_paz', label='get PAZ'), label='Network'))
class _stream_arklink_read_view(HasTraits): host = Str("webdc.eu") port = Int(18001) timeout = Int(100) start_time = UTCDateTime("2009-08-24 00:20:03") time_interval = Int(30) network_id = Str("BW") station_id = Str("RJOB") location_id = Str("") channel_id = Str("EH*") get_paz = Bool(False) trait_view = View(HGroup(Item('host'), Item('port'), Item('timeout'), label='Server'), HGroup(Item('start_time', editor=TextEditor()), Item('time_interval'), label='Time'), HGroup(Item('network_id', label='nw'), Item('station_id', label='sta.'), Item('location_id', label='loc.'), Item('channel_id', label='ch'), Item('get_paz', label='get PAZ'), label='Network'))
class _tw_gen_view(HasTraits): t_start = UTCDateTime('2009-08-24 00:20:03') width = Int(3600) how_many = Int(10) host = Str("localhost") port = Int(8080) timeout = Int(100) network_id = Str("PF") station_id = Str("FOR") location_id = Str("") channel_id = Str("HLE") trait_view = View(HGroup(Item("t_start", editor=TextEditor()), Item("width", label="width (sec)"), Item("how_many"), label='Time win'), HGroup(Item('host'), Item('port'), Item('timeout'), label='Server'), HGroup(Item('network_id', label='nw'), Item('station_id', label='sta.'), Item('location_id', label='loc.'), Item('channel_id', label='ch'), label='Network'))
class _time_windows_list_generation_view(HasTraits): t_start = UTCDateTime("2009-08-24 00:20:03") width = Int(3600) how_many = Int(10) trait_view = View(Item("t_start", editor=TextEditor()), Item("width", label="width (sec)"), Item("how_many"))
def get_columns(self): cols = [ CheckboxColumn(name='enabled'), CheckboxColumn(name='default'), ObjectColumn(name='kind'), ObjectColumn(name='name'), ObjectColumn(name='username'), ObjectColumn(name='password', format_func=lambda x: '*' * len(x), editor=TextEditor(password=True)), ObjectColumn(name='host'), ObjectColumn(name='dbname', label='Database', editor=EnumEditor(name='names')), ObjectColumn(name='path', style='readonly') ] return cols
def right_group(): return VGroup( HGroup(UItem('right_message', style='readonly'), UItem('right_date', style='readonly')), UItem('right', style='custom', editor=TextEditor(read_only=True)))