本文整理汇总了Python中pychron.envisage.icon_button_editor.icon_button_editor函数的典型用法代码示例。如果您正苦于以下问题:Python icon_button_editor函数的具体用法?Python icon_button_editor怎么用?Python icon_button_editor使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了icon_button_editor函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: traits_view
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
开发者ID:NMGRL,项目名称:pychron,代码行数:27,代码来源:panes.py
示例2: traits_view
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
开发者ID:OSUPychron,项目名称:pychron,代码行数:25,代码来源:plotter_options_manager.py
示例3: view
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
开发者ID:NMGRL,项目名称:pychron,代码行数:27,代码来源:views.py
示例4: traits_view
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
开发者ID:NMGRL,项目名称:pychron,代码行数:29,代码来源:gains_edit_view.py
示例5: traits_view
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
开发者ID:UManPychron,项目名称:pychron,代码行数:29,代码来源:tableview.py
示例6: _get_truncate_group
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
开发者ID:NMGRL,项目名称:pychron,代码行数:28,代码来源:experiment_panes.py
示例7: traits_view
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
开发者ID:UManPychron,项目名称:pychron,代码行数:25,代码来源:laser_panes.py
示例8: traits_view
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
开发者ID:UManPychron,项目名称:pychron,代码行数:26,代码来源:hops_editor.py
示例9: traits_view
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
开发者ID:OSUPychron,项目名称:pychron,代码行数:33,代码来源:panes.py
示例10: traits_view
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))
开发者ID:NMGRL,项目名称:pychron,代码行数:34,代码来源:sample_view.py
示例11: traits_view
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
开发者ID:OSUPychron,项目名称:pychron,代码行数:34,代码来源:laser_panes.py
示例12: traits_view
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
开发者ID:UManPychron,项目名称:pychron,代码行数:35,代码来源:panes.py
示例13: traits_view
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
开发者ID:OSUPychron,项目名称:pychron,代码行数:32,代码来源:views.py
示例14: traits_view
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
开发者ID:UManPychron,项目名称:pychron,代码行数:28,代码来源:labnumber_entry_panes.py
示例15: traits_view
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
开发者ID:kenlchen,项目名称:pychron,代码行数:34,代码来源:level_editor.py
示例16: traits_view
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
开发者ID:NMGRL,项目名称:pychron,代码行数:35,代码来源:panes.py
示例17: _get_truncate_group
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
开发者ID:UManPychron,项目名称:pychron,代码行数:34,代码来源:experiment_panes.py
示例18: traits_view
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
开发者ID:UManPychron,项目名称:pychron,代码行数:9,代码来源:table_filter.py
示例19: traits_view
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
开发者ID:UManPychron,项目名称:pychron,代码行数:10,代码来源:client.py
示例20: traits_view
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
开发者ID:OSUPychron,项目名称:pychron,代码行数:10,代码来源:dataset_recall_editor.py
注:本文中的pychron.envisage.icon_button_editor.icon_button_editor函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论