Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
traits_view = tui.View(
tui.Tabbed(
tui.VGroup(
tui.HGroup(
tui.Item('current_file', editor=tui.EnumEditor(name='svg_files'),
style='simple', width=1.0, show_label=False),
tui.Item('move_backward', show_label=False,
enabled_when="svg_files.index(current_file) != 0"),
tui.Item('move_forward', show_label=False,
enabled_when="svg_files.index(current_file) != len(svg_files)-1"),
),
tui.VSplit(
tui.HSplit(
tui.Item('description', label='Description', show_label=False),
tui.Item('current_xml_view', editor=xml_tree_editor, show_label=False),
),
tui.HSplit(
tui.Item('document', editor=SVGEditor(), show_label=False),
tui.Item('kiva_component', show_label=False),
tui.Item('ref_component', show_label=False),
# TODO: tui.Item('agg_component', show_label=False),
),
),
label='SVG',
),
tui.Item('parsing_sike', style='custom', show_label=False,
label='Parsing Profile'),
tui.Item('drawing_sike', style='custom', show_label=False,
label='Kiva Drawing Profile'),
tui.Item('wx_doc_sike', style='custom', show_label=False,
label='Creating WX document'),
loadaddspectype = Enum('wcs','deimos','astropysics')
titlegroup = HGroup(Item('specleft',show_label=False,enabled_when='currspeci>0'),
spring,
Label('Spectrum #',height=0.5),
Item('currspecip1',show_label=False,editor=RangeEditor(low_name='lowerspecip1',high_name='upperspecip1',mode='spinner')),
Item('_titlestr',style='readonly',show_label=False),
spring,
Item('specright',show_label=False,enabled_when='currspeci<(len(specs)-1)'))
speclistgroup = HGroup(Label('Spectrum List:'),spring,
Item('delcurrspec',show_label=False,enabled_when='len(specs)>1'),
Item('saveloadfile',show_label=False),
Item('savespeclist',show_label=False),
Item('loadspeclist',show_label=False,enabled_when='os.path.exists(saveloadfile)'),
Item('loadaddfile',show_label=False),
Item('loadaddspec',show_label=False,enabled_when='os.path.exists(saveloadfile)'),
Item('loadaddspectype',show_label=False),
spring)
plotformatgroup = HGroup(spring,
Item('fluxformat',show_label=False),
Item('errformat',show_label=False),
Item('scaleerr',label='Scale Error?'),
Item('scaleerrfraclow',label='Lower',enabled_when='scaleerr',editor=TextEditor(evaluate=float)),
Item('scaleerrfrachigh',label='Upper',enabled_when='scaleerr'),
Item('showgrid',label='Grid?'),
Item('showcoords',label='Coords?'),
spring)
featuregroup = HGroup(spring,
Item('showmajorlines',label='Show major?'),
def traits_view(self):
v = okcancel_view(Item('mode', tooltip='Normal: get analyses between now and start of pipeline - hours\n'
'Window: get analyses between now and now - hours'),
Item('hours'),
Item('period', label='Update Period (s)',
tooltip='Default time (s) to delay between "check for new analyses"'),
Item('mass_spectrometer', label='Mass Spectrometer',
editor=EnumEditor(name='available_spectrometers')),
Item('analysis_types', style='custom',
editor=CheckListEditor(name='available_analysis_types',
cols=len(self.available_analysis_types))),
Item('post_analysis_delay', label='Post Analysis Found Delay',
tooltip='Time (min) to delay before next "check for new analyses"'),
Item('verbose'),
title='Configure',
)
return v
# The foreground color of the renderer.
foreground_color = Tuple(Range(0., 1.), Range(0., 1.), Range(0., 1.),
editor=RGBColorEditor,
desc='the foreground color of the scene')
# Offscreen rendering.
offscreen = Bool(desc='if mlab should use offscreen rendering'
' (no window will show up in this case)')
######################################################################
# Traits UI view.
traits_view = View(Group(
Item('backend'),
Item('background_color'),
Item('foreground_color'),
Item('offscreen')
),
resizable=True
)
def traits_view(self):
errbar_grp = VGroup(HGroup(Item('x_end_caps', label='X End Caps'),
Item('y_end_caps', label='Y End Caps'),
Item('error_bar_nsigma', label='NSigma')),
show_border=True,
label='Error Bars')
an_grp = VGroup(Item('analysis_number_sorting', label='Analysis# Order'),
Item('global_analysis_number_sorting', label='Global Sort', tooltip='Applicable only when '
'using Aux Grouping'),
HGroup(Item('include_group_legend', label='Include Group Legend'),
UItem('group_legend_label_attribute', enabled_when='include_group_legend')),
HGroup(Item('use_cmap_analysis_number', label='Use Color Mapping'),
UItem('cmap_analysis_number', enabled_when='use_cmap_analysis_number')),
Item('use_latest_overlay'), show_border=True, label='Analysis #')
label_grp = VGroup(
HGroup(Item('label_box'),
Item('analysis_label_display',
label='Label Format',
width=100,
style='readonly'),
spring,
icon_button_editor('edit_label_format_button', 'cog',
def traits_view(self):
# root_grp = VGroup(Item('root_dir', label='Pychron Directory'),
# show_border=True, label='Root')
user_grp = VGroup(Item('username',
editor=ComboboxEditor(name='_usernames'),
label='Name'),
show_border=True, label='User')
env_grp = VGroup(Item('environment', label='Directory'),
show_border=True, label='Environment')
# login_grp = VGroup(Item('use_login', label='Use Login'),
# Item('multi_user', label='Multi User'),
# label='Login', show_border=True)
o_grp = VGroup(Item('organization', resizable=True, label='Name'),
remote_status_item('Laboratory Repo'),
show_border=True,
label='Organization')
v = View(VGroup(Item('confirm_quit', label='Confirm Quit',
def traits_view(self):
v = View(
VGroup(
VGroup(
HGroup(Item('power', tooltip='Hit Enter for change to take effect'),
Item('units', style='readonly', show_label=False),
spring,
Item('pulse_button',
editor=ButtonEditor(label_value='pulse_label'),
show_label=False,
enabled_when='object.enabled')),
Item('duration', label='Duration (s)', tooltip='Set the laser pulse duration in seconds')),
VGroup(
CustomLabel('object.wait_control.message',
size=14,
weight='bold',
color_name='object.wait_control.message_color'),
HGroup(Spring(width=-5, springy=False),
Item('object.wait_control.high', label='Set Max. Seconds'),
spring, UItem('object.wait_control.continue_button')),
HGroup(Spring(width=-5, springy=False),
an_grp = VGroup(Item('analysis_number_sorting', label='Analysis# Sort'),
Item('use_cmap_analysis_number'),
Item('cmap_analysis_number'),
Item('use_latest_overlay'), show_border=True, label='Analysis #')
label_grp = VGroup(
HGroup(Item('label_box'),
Item('analysis_label_display',
label='Label Format',
width=100,
style='readonly'),
icon_button_editor('edit_label_format', 'cog',
tooltip='Open Label maker')),
self._get_label_font_group(),
show_border=True, label='Label')
inset_grp = VGroup(HGroup(Item('display_inset', label='Use'),
Item('inset_location', label='Location'),
Item('inset_width', label='Width'),
Item('inset_height', label='Height')),
show_border=True,
label='Inset')
mean_grp = VGroup(HGroup(Item('display_mean_indicator', label='Indicator'),
Item('display_mean', label='Value',
enabled_when='display_mean_indicator'),
Item('display_percent_error', label='%Error',
enabled_when='display_mean_indicator'),
Item('mean_sig_figs', label='SigFigs')),
self._get_indicator_font_group(),
show_border=True,
label='Mean')
info_grp = HGroup(Item('show_info', label='Show'),
Item('show_mean_info', label='Mean', enabled_when='show_info'),
object_column(name='fit',
editor=EnumEditor(name='fit_types'),
width=75),
object_column(name='error_type',
editor=EnumEditor(name='error_types'),
width=75, label='Error'),
checkbox_column(name='filter_outliers', label='Out.'),
object_column(name='filter_outlier_iterations', label='Iter.'),
object_column(name='filter_outlier_std_devs', label='SD'),
object_column(name='truncate', label='Trunc.'),
checkbox_column(name='include_baseline_error', label='Inc. BsErr')]
v = View(VGroup(Item('name', editor=EnumEditor(name='names')),
Item('marker', editor=EnumEditor(values=marker_names)),
Item('marker_size'),
HGroup(Item('ymin', label='Min'),
Item('ymax', label='Max'),
show_border=True,
label='Y Limits'),
show_border=True))
aux_plots_grp = Item('aux_plots',
style='custom',
show_label=False,
editor=myTableEditor(columns=cols,
sortable=False,
deletable=False,
clear_selection_on_dclicked=True,
edit_on_first_click=False,
# on_select=lambda *args: setattr(self, 'selected', True),
# selected='selected',
edit_view=v,
def traits_view(self):
v = View(VGroup(Item('consumer_key'),
Item('consumer_secret'),
Item('access_token_key'),
Item('access_token_secret')))
return v