Last active
March 17, 2021 18:07
-
-
Save nicoddemus/9ceaf6890116fe167eb1a62a6991d76d to your computer and use it in GitHub Desktop.
mypy slow with nested dict call
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def GetFields(): | |
| fields = dict( | |
| tabs=dict( | |
| _id='tabs', | |
| caption='', | |
| caption_cmd='', | |
| caption_color_expr='', | |
| caption_horizontal_size_policy='Preferred', | |
| caption_vertical_size_policy='Fixed', | |
| cmd='', | |
| create_caption=True, | |
| create_page_cmd='', | |
| enable_expr='', | |
| label_alignment='Qt::AlignLeading|Qt::AlignVCenter', | |
| orientation='horizontal', | |
| refresh_on='', | |
| tool_tip_expr='""', | |
| values=[], | |
| values_cmd='', | |
| visible_expr='', | |
| sub_fields=[ | |
| ('variables_tab', dict( | |
| _id='tab', | |
| caption=tr('Input'), | |
| caption_cmd='', | |
| caption_color_expr='', | |
| caption_horizontal_size_policy='Preferred', | |
| caption_refresh='', | |
| caption_vertical_size_policy='Fixed', | |
| cmd='', | |
| create_caption=True, | |
| enable_expr='', | |
| enable_refresh='', | |
| label_alignment='Qt::AlignLeading|Qt::AlignVCenter', | |
| orientation='horizontal', | |
| spacer_resize_policy='Maximum', | |
| tool_tip=tr(''), | |
| tool_tip_expr='""', | |
| tool_tip_refresh='', | |
| visible_expr='', | |
| visible_refresh='', | |
| sub_fields=[ | |
| ('splitter', dict( | |
| _id='splitter', | |
| split_orientation='Vertical', | |
| sub_fields=[ | |
| ('variables_page', dict( | |
| _id='splitter_page', | |
| enable_expr='', | |
| visible_expr='', | |
| visible_refresh='', | |
| sub_fields=[ | |
| ('variables_splitter', dict( | |
| _id='splitter', | |
| split_orientation='Horizontal', | |
| sub_fields=[ | |
| ('variables_declaration_page', dict( | |
| _id='splitter_page', | |
| enable_expr='', | |
| visible_expr='', | |
| visible_refresh='', | |
| sub_fields=[ | |
| ('variables', dict( | |
| _id='subject_table', | |
| alternate_row_colors=False, | |
| background_color_expr='', | |
| background_color_refresh='', | |
| caption=tr('Variables'), | |
| caption_cmd='', | |
| caption_color_expr='', | |
| caption_horizontal_size_policy='Preferred', | |
| caption_refresh='', | |
| caption_vertical_size_policy='Fixed', | |
| cmd='controller.variables_data_variables', | |
| cmd_get_set=('', ''), | |
| create_caption=True, | |
| dynamic_properties={}, | |
| editing_status_cmd='', | |
| enable_expr='', | |
| enable_refresh='', | |
| hidden_subject_indexes_cmd='', | |
| hidden_subject_indexes_refresh='', | |
| label_alignment='Qt::AlignLeading|Qt::AlignVCenter', | |
| max_number_of_lines=0, | |
| min_number_of_lines=5, | |
| orientation='vertical', | |
| pasting_creates_new_rows=True, | |
| resize_columns_automatically=True, | |
| selected_cell_cmd='controller.selected_cell', | |
| selection_cmd='', | |
| selection_mode='single_row', | |
| should_trigger_modify_while_import=False, | |
| show_horizontal_header=True, | |
| show_vertical_header=False, | |
| sorting_enabled=False, | |
| tool_tip=tr(''), | |
| tool_tip_expr='""', | |
| tool_tip_refresh='', | |
| visible_expr='', | |
| visible_refresh='', | |
| sub_fields=[ | |
| ('tool_bar', dict( | |
| _id='table_tool_bar', | |
| enable_expr='controller.enable_predicate()', | |
| enable_refresh='callback:controller.enable_callback', | |
| show_buttons=['custom_add', 'remove', 'remove_all'], | |
| visible_expr='', | |
| visible_refresh='', | |
| sub_fields=[ | |
| ('custom_add', dict( | |
| _id='tool_button', | |
| align='left', | |
| auto_raise=True, | |
| caption='', | |
| caption_cmd='', | |
| caption_color_expr='', | |
| caption_horizontal_size_policy='Preferred', | |
| caption_vertical_size_policy='Fixed', | |
| checkable=False, | |
| cmd='controller.NewVariable()', | |
| create_caption=True, | |
| enable_expr='', | |
| height=20, | |
| img=':xgui/table_add', | |
| label_alignment='Qt::AlignLeading|Qt::AlignVCenter', | |
| orientation='horizontal', | |
| refresh_on='', | |
| tool_tip_expr='""', | |
| visible_expr='', | |
| whats_this='', | |
| width=20, | |
| )), | |
| ], | |
| )), | |
| ('variable_name', dict( | |
| _id='variable_name_column', | |
| caption=tr('Name'), | |
| caption_cmd='', | |
| cmd='item.name', | |
| enable_expr='controller.enable_predicate()', | |
| enable_refresh='callback:controller.enable_callback', | |
| nonsense_expr='', | |
| nonsense_refresh='', | |
| nonsense_symbol_expr='', | |
| nonsense_symbol_refresh='', | |
| read_only_expr='', | |
| read_only_refresh='', | |
| resize_mode='resize_to_contents', | |
| tool_tip=tr(''), | |
| tool_tip_expr='""', | |
| validation_expr='', | |
| visible_expr='', | |
| visible_refresh='', | |
| width=-1, | |
| )), | |
| ('variable_value', dict( | |
| _id='variable_column', | |
| caption=tr('Base Value'), | |
| caption_cmd='', | |
| cmd='item.val', | |
| enable_expr='controller.enable_predicate()', | |
| enable_refresh='callback:controller.enable_callback', | |
| nonsense_expr='', | |
| nonsense_refresh='', | |
| nonsense_symbol_expr='', | |
| nonsense_symbol_refresh='', | |
| read_only_expr='', | |
| read_only_refresh='', | |
| resize_mode='resize_to_contents', | |
| tool_tip=tr(''), | |
| tool_tip_expr='""', | |
| validation_expr='', | |
| visible_expr='', | |
| visible_refresh='', | |
| width=-1, | |
| )), | |
| ], | |
| )), | |
| ], | |
| )), | |
| ('variables_values_page', dict( | |
| _id='splitter_page', | |
| enable_expr='', | |
| visible_expr='', | |
| visible_refresh='', | |
| sub_fields=[ | |
| ('variables_values_group', dict( | |
| _id='group', | |
| add_spacer=False, | |
| caption='', | |
| caption_cmd='', | |
| caption_color_expr='', | |
| caption_horizontal_size_policy='Preferred', | |
| caption_vertical_size_policy='Fixed', | |
| cmd='', | |
| create_caption=True, | |
| dynamic_properties={}, | |
| enable_expr='controller.enable_predicate()', | |
| horizontal_size_type='Preferred', | |
| label_alignment='Qt::AlignLeading|Qt::AlignVCenter', | |
| orientation='horizontal', | |
| refresh_on='callback:controller.enable_callback', | |
| spacer_resize_policy='Expanding', | |
| style='invisible', | |
| tool_tip_expr='""', | |
| vertical_size_type='Fixed', | |
| visible_expr='', | |
| sub_fields=[ | |
| ('variables_values_editors', dict( | |
| _id='editors', | |
| before_set_data_cmd='', | |
| caption='', | |
| caption_horizontal_size_policy='Preferred', | |
| caption_vertical_size_policy='Fixed', | |
| cmd='controller.current_value_editor', | |
| create_caption=False, | |
| create_page_cmd='controller.CreatePage', | |
| dynamic_properties={}, | |
| indent=False, | |
| label_alignment='Qt::AlignLeading|Qt::AlignVCenter', | |
| obtain_data_cmd='controller.GetDataFromKey', | |
| obtain_editor_id_cmd='controller.GetEditorIdFromKey', | |
| orientation='horizontal', | |
| vertical_size_policy='Expanding', | |
| )), | |
| ], | |
| )), | |
| ], | |
| )), | |
| ], | |
| )), | |
| ], | |
| )), | |
| ('expressions_page', dict( | |
| _id='splitter_page', | |
| enable_expr='', | |
| visible_expr='', | |
| visible_refresh='', | |
| sub_fields=[ | |
| ('expressions_group', dict( | |
| _id='group', | |
| add_spacer=False, | |
| caption='', | |
| caption_cmd='', | |
| caption_color_expr='', | |
| caption_horizontal_size_policy='Preferred', | |
| caption_vertical_size_policy='Fixed', | |
| cmd='', | |
| create_caption=True, | |
| dynamic_properties={}, | |
| enable_expr='', | |
| horizontal_size_type='Preferred', | |
| label_alignment='Qt::AlignLeading|Qt::AlignVCenter', | |
| orientation='horizontal', | |
| refresh_on='', | |
| spacer_resize_policy='Expanding', | |
| style='invisible', | |
| tool_tip_expr='""', | |
| vertical_size_type='Fixed', | |
| visible_expr='', | |
| sub_fields=[ | |
| ('expressions', dict( | |
| _id='subject_table', | |
| alternate_row_colors=False, | |
| background_color_expr='', | |
| background_color_refresh='', | |
| caption=tr('Expressions'), | |
| caption_cmd='', | |
| caption_color_expr='', | |
| caption_horizontal_size_policy='Preferred', | |
| caption_refresh='', | |
| caption_vertical_size_policy='Fixed', | |
| cmd='controller.variables_data_expressions', | |
| cmd_get_set=('', ''), | |
| create_caption=True, | |
| dynamic_properties={}, | |
| editing_status_cmd='', | |
| enable_expr='', | |
| enable_refresh='', | |
| hidden_subject_indexes_cmd='', | |
| hidden_subject_indexes_refresh='', | |
| label_alignment='Qt::AlignLeading|Qt::AlignVCenter', | |
| max_number_of_lines=0, | |
| min_number_of_lines=5, | |
| orientation='vertical', | |
| pasting_creates_new_rows=True, | |
| resize_columns_automatically=True, | |
| selected_cell_cmd='', | |
| selection_cmd='', | |
| selection_mode='single_cell', | |
| should_trigger_modify_while_import=False, | |
| show_horizontal_header=True, | |
| show_vertical_header=False, | |
| sorting_enabled=False, | |
| tool_tip=tr(''), | |
| tool_tip_expr='""', | |
| tool_tip_refresh='', | |
| visible_expr='', | |
| visible_refresh='', | |
| sub_fields=[ | |
| ('expression_name', dict( | |
| _id='string_column', | |
| caption=tr('Name'), | |
| caption_cmd='', | |
| cmd='item.name', | |
| enable_expr='controller.enable_predicate()', | |
| enable_refresh='callback:controller.enable_callback', | |
| nonsense_expr='', | |
| nonsense_refresh='', | |
| nonsense_symbol_expr='', | |
| nonsense_symbol_refresh='', | |
| read_only_expr='"True"', | |
| read_only_refresh='', | |
| resize_mode='resize_to_contents', | |
| style='edit', | |
| tool_tip=tr(''), | |
| tool_tip_expr='""', | |
| validation_expr='', | |
| visible_expr='', | |
| visible_refresh='', | |
| width=-1, | |
| )), | |
| ('expression_value', dict( | |
| _id='parametric_expression_column', | |
| caption=tr('Value'), | |
| caption_cmd='', | |
| cmd='item.expression', | |
| enable_expr='controller.enable_predicate()', | |
| enable_refresh='callback:controller.enable_callback', | |
| nonsense_expr='', | |
| nonsense_refresh='', | |
| nonsense_symbol_expr='', | |
| nonsense_symbol_refresh='', | |
| read_only_expr='', | |
| read_only_refresh='', | |
| resize_mode='resize_to_contents', | |
| tool_tip=tr(''), | |
| tool_tip_expr='""', | |
| validation_expr='', | |
| visible_expr='', | |
| visible_refresh='', | |
| width=-1, | |
| )), | |
| ], | |
| )), | |
| ('expression_instructions', dict( | |
| _id='text', | |
| caption='', | |
| caption_cmd='', | |
| caption_color_expr='', | |
| caption_horizontal_size_policy='Preferred', | |
| caption_vertical_size_policy='Fixed', | |
| cmd='controller.ExpressionInstructions()', | |
| create_caption=False, | |
| enable_expr='', | |
| format_expr='', | |
| label_alignment='Qt::AlignLeading|Qt::AlignVCenter', | |
| orientation='horizontal', | |
| read_only_expr='True', | |
| refresh_on='', | |
| style='label', | |
| tool_tip_expr='""', | |
| validation_callback=None, | |
| value='', | |
| visible_expr='', | |
| )), | |
| ], | |
| )), | |
| ], | |
| )), | |
| ], | |
| )), | |
| ], | |
| )), | |
| ('runs_tab', dict( | |
| _id='tab', | |
| caption=tr('Runs'), | |
| caption_cmd='', | |
| caption_color_expr='', | |
| caption_horizontal_size_policy='Preferred', | |
| caption_refresh='', | |
| caption_vertical_size_policy='Fixed', | |
| cmd='', | |
| create_caption=True, | |
| enable_expr='controller.enable_predicate()', | |
| enable_refresh='callback:controller.enable_callback', | |
| label_alignment='Qt::AlignLeading|Qt::AlignVCenter', | |
| orientation='horizontal', | |
| spacer_resize_policy='Maximum', | |
| tool_tip=tr(''), | |
| tool_tip_expr='""', | |
| tool_tip_refresh='', | |
| visible_expr='', | |
| visible_refresh='', | |
| sub_fields=[ | |
| ('runs_tab_description', dict( | |
| _id='text', | |
| caption='', | |
| caption_cmd='', | |
| caption_color_expr='', | |
| caption_horizontal_size_policy='Preferred', | |
| caption_vertical_size_policy='Fixed', | |
| cmd='', | |
| create_caption=False, | |
| enable_expr='', | |
| format_expr='', | |
| label_alignment='Qt::AlignLeading|Qt::AlignVCenter', | |
| orientation='horizontal', | |
| read_only_expr='', | |
| refresh_on='', | |
| style='label', | |
| tool_tip_expr='""', | |
| validation_callback=None, | |
| value='', | |
| visible_expr='', | |
| )), | |
| ('runs_tab_total_runs_label', dict( | |
| _id='text', | |
| caption='Total Runs', | |
| caption_cmd='', | |
| caption_color_expr='', | |
| caption_horizontal_size_policy='Preferred', | |
| caption_vertical_size_policy='Fixed', | |
| cmd='controller.GetTotalRunsCaption()', | |
| create_caption=True, | |
| enable_expr='', | |
| format_expr='', | |
| label_alignment='Qt::AlignLeading|Qt::AlignVCenter', | |
| orientation='horizontal', | |
| read_only_expr='', | |
| refresh_on='controller.enabled_total_runs', | |
| style='label', | |
| tool_tip_expr='""', | |
| validation_callback=None, | |
| value='', | |
| visible_expr='', | |
| )), | |
| ('runs_tab_enabled_runs_label', dict( | |
| _id='text', | |
| caption='Enabled Runs', | |
| caption_cmd='', | |
| caption_color_expr='', | |
| caption_horizontal_size_policy='Preferred', | |
| caption_vertical_size_policy='Fixed', | |
| cmd='controller.GetEnabledRunsCaption()', | |
| create_caption=True, | |
| enable_expr='', | |
| format_expr='', | |
| label_alignment='Qt::AlignLeading|Qt::AlignVCenter', | |
| orientation='horizontal', | |
| read_only_expr='', | |
| refresh_on='controller.enabled_total_runs', | |
| style='label', | |
| tool_tip_expr='""', | |
| validation_callback=None, | |
| value='', | |
| visible_expr='', | |
| )), | |
| ('toolbar', dict( | |
| _id='tool_bar', | |
| caption='', | |
| caption_cmd='', | |
| caption_color_expr='', | |
| caption_horizontal_size_policy='Preferred', | |
| caption_vertical_size_policy='Fixed', | |
| cmd='', | |
| create_caption=True, | |
| enable_expr='', | |
| frame_shape='NoFrame', | |
| label_alignment='Qt::AlignLeading|Qt::AlignVCenter', | |
| orientation='horizontal', | |
| refresh_on='', | |
| spacer_resize_policy='MinimumExpanding', | |
| tool_tip_expr='""', | |
| visible_expr='', | |
| sub_fields=[ | |
| ('btn_enable_selected', dict( | |
| _id='tool_button', | |
| align='left', | |
| auto_raise=True, | |
| caption='', | |
| caption_cmd='', | |
| caption_color_expr='', | |
| caption_horizontal_size_policy='Preferred', | |
| caption_vertical_size_policy='Fixed', | |
| checkable=False, | |
| cmd='controller.CheckSelectedRuns()', | |
| create_caption=True, | |
| enable_expr='', | |
| height=20, | |
| img=':xgui/check_all.png', | |
| label_alignment='Qt::AlignLeading|Qt::AlignVCenter', | |
| orientation='horizontal', | |
| refresh_on='', | |
| tool_tip_expr='""', | |
| visible_expr='', | |
| whats_this='', | |
| width=20, | |
| )), | |
| ('btn_disable_selected', dict( | |
| _id='tool_button', | |
| align='left', | |
| auto_raise=True, | |
| caption='', | |
| caption_cmd='', | |
| caption_color_expr='', | |
| caption_horizontal_size_policy='Preferred', | |
| caption_vertical_size_policy='Fixed', | |
| checkable=False, | |
| cmd='controller.UnCheckSelectedRuns()', | |
| create_caption=True, | |
| enable_expr='', | |
| height=20, | |
| img=':xgui/uncheck_all.png', | |
| label_alignment='Qt::AlignLeading|Qt::AlignVCenter', | |
| orientation='horizontal', | |
| refresh_on='', | |
| tool_tip_expr='""', | |
| visible_expr='', | |
| whats_this='', | |
| width=20, | |
| )), | |
| ], | |
| )), | |
| ('runs_tab_table', dict( | |
| _id='dynamic_table', | |
| caption=tr(''), | |
| caption_cmd='', | |
| caption_color_expr='', | |
| caption_horizontal_size_policy='Preferred', | |
| caption_refresh='', | |
| caption_vertical_size_policy='Fixed', | |
| cmd='controller.table_contents', | |
| create_caption=False, | |
| dynamic_properties={}, | |
| editable=False, | |
| enable_expr='', | |
| enable_refresh='', | |
| horizontal_header='controller.horizontal_header', | |
| horizontal_stretchable=False, | |
| label_alignment='Qt::AlignLeading|Qt::AlignVCenter', | |
| orientation='vertical', | |
| refresh_on='data.on_run_list_change', | |
| selection_cmd='controller.selection', | |
| selection_mode='multi_row', | |
| text_color_cmd='', | |
| tool_tip=tr(''), | |
| tool_tip_expr='""', | |
| tool_tip_refresh='', | |
| vertical_header='', | |
| visible_expr='', | |
| visible_refresh='', | |
| )), | |
| ('runs_tab_table_notes_label', dict( | |
| _id='text', | |
| caption='', | |
| caption_cmd='', | |
| caption_color_expr='', | |
| caption_horizontal_size_policy='Preferred', | |
| caption_vertical_size_policy='Fixed', | |
| cmd='controller.GetTableNotes()', | |
| create_caption=False, | |
| enable_expr='', | |
| format_expr='', | |
| label_alignment='Qt::AlignLeading|Qt::AlignVCenter', | |
| orientation='horizontal', | |
| read_only_expr='', | |
| refresh_on='controller.enabled_total_runs', | |
| style='label', | |
| tool_tip_expr='""', | |
| validation_callback=None, | |
| value='', | |
| visible_expr='', | |
| )), | |
| ], | |
| )), | |
| ], | |
| ), | |
| ) | |
| return fields |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from typing import Dict, Any | |
| def GetFields(): | |
| fields: Dict[Any, Any] = { | |
| 'tabs': { | |
| '_id': 'tabs', | |
| 'caption': '', | |
| 'caption_cmd': '', | |
| 'caption_color_expr': '', | |
| 'caption_horizontal_size_policy': 'Preferred', | |
| 'caption_vertical_size_policy': 'Fixed', | |
| 'cmd': '', | |
| 'create_caption': True, | |
| 'create_page_cmd': '', | |
| 'enable_expr': '', | |
| 'label_alignment': 'Qt::AlignLeading|Qt::AlignVCenter', | |
| 'orientation': 'horizontal', | |
| 'refresh_on': '', | |
| 'tool_tip_expr': '""', | |
| 'values': [], | |
| 'values_cmd': '', | |
| 'visible_expr': '', | |
| 'sub_fields': [ | |
| ( | |
| 'variables_tab', | |
| { | |
| '_id': 'tab', | |
| 'caption': tr('Input'), | |
| 'caption_cmd': '', | |
| 'caption_color_expr': '', | |
| 'caption_horizontal_size_policy': 'Preferred', | |
| 'caption_refresh': '', | |
| 'caption_vertical_size_policy': 'Fixed', | |
| 'cmd': '', | |
| 'create_caption': True, | |
| 'enable_expr': '', | |
| 'enable_refresh': '', | |
| 'label_alignment': 'Qt::AlignLeading|Qt::AlignVCenter', | |
| 'orientation': 'horizontal', | |
| 'spacer_resize_policy': 'Maximum', | |
| 'tool_tip': tr(''), | |
| 'tool_tip_expr': '""', | |
| 'tool_tip_refresh': '', | |
| 'visible_expr': '', | |
| 'visible_refresh': '', | |
| 'sub_fields': [ | |
| ( | |
| 'splitter', | |
| { | |
| '_id': 'splitter', | |
| 'split_orientation': 'Vertical', | |
| 'sub_fields': [ | |
| ( | |
| 'variables_page', | |
| { | |
| '_id': 'splitter_page', | |
| 'enable_expr': '', | |
| 'visible_expr': '', | |
| 'visible_refresh': '', | |
| 'sub_fields': [ | |
| ( | |
| 'variables_splitter', | |
| { | |
| '_id': 'splitter', | |
| 'split_orientation': 'Horizontal', | |
| 'sub_fields': [ | |
| ( | |
| 'variables_declaration_page', | |
| { | |
| '_id': 'splitter_page', | |
| 'enable_expr': '', | |
| 'visible_expr': '', | |
| 'visible_refresh': '', | |
| 'sub_fields': [ | |
| ( | |
| 'variables', | |
| { | |
| '_id': 'subject_table', | |
| 'alternate_row_colors': False, | |
| 'background_color_expr': '', | |
| 'background_color_refresh': '', | |
| 'caption': tr( | |
| 'Variables' | |
| ), | |
| 'caption_cmd': '', | |
| 'caption_color_expr': '', | |
| 'caption_horizontal_size_policy': 'Preferred', | |
| 'caption_refresh': '', | |
| 'caption_vertical_size_policy': 'Fixed', | |
| 'cmd': 'controller.variables_data_variables', | |
| 'cmd_get_set': ( | |
| '', | |
| '', | |
| ), | |
| 'create_caption': True, | |
| 'dynamic_properties': {}, | |
| 'editing_status_cmd': '', | |
| 'enable_expr': '', | |
| 'enable_refresh': '', | |
| 'hidden_subject_indexes_cmd': '', | |
| 'hidden_subject_indexes_refresh': '', | |
| 'label_alignment': 'Qt::AlignLeading|Qt::AlignVCenter', | |
| 'max_number_of_lines': 0, | |
| 'min_number_of_lines': 5, | |
| 'orientation': 'vertical', | |
| 'pasting_creates_new_rows': True, | |
| 'resize_columns_automatically': True, | |
| 'selected_cell_cmd': 'controller.selected_cell', | |
| 'selection_cmd': '', | |
| 'selection_mode': 'single_row', | |
| 'should_trigger_modify_while_import': False, | |
| 'show_horizontal_header': True, | |
| 'show_vertical_header': False, | |
| 'sorting_enabled': False, | |
| 'tool_tip': tr( | |
| '' | |
| ), | |
| 'tool_tip_expr': '""', | |
| 'tool_tip_refresh': '', | |
| 'visible_expr': '', | |
| 'visible_refresh': '', | |
| 'sub_fields': [ | |
| ( | |
| 'tool_bar', | |
| { | |
| '_id': 'table_tool_bar', | |
| 'enable_expr': 'controller.enable_predicate()', | |
| 'enable_refresh': 'callback:controller.enable_callback', | |
| 'show_buttons': [ | |
| 'custom_add', | |
| 'remove', | |
| 'remove_all', | |
| ], | |
| 'visible_expr': '', | |
| 'visible_refresh': '', | |
| 'sub_fields': [ | |
| ( | |
| 'custom_add', | |
| { | |
| '_id': 'tool_button', | |
| 'align': 'left', | |
| 'auto_raise': True, | |
| 'caption': '', | |
| 'caption_cmd': '', | |
| 'caption_color_expr': '', | |
| 'caption_horizontal_size_policy': 'Preferred', | |
| 'caption_vertical_size_policy': 'Fixed', | |
| 'checkable': False, | |
| 'cmd': 'controller.NewVariable()', | |
| 'create_caption': True, | |
| 'enable_expr': '', | |
| 'height': 20, | |
| 'img': ':xgui/table_add', | |
| 'label_alignment': 'Qt::AlignLeading|Qt::AlignVCenter', | |
| 'orientation': 'horizontal', | |
| 'refresh_on': '', | |
| 'tool_tip_expr': '""', | |
| 'visible_expr': '', | |
| 'whats_this': '', | |
| 'width': 20, | |
| }, | |
| ), | |
| ], | |
| }, | |
| ), | |
| ( | |
| 'variable_name', | |
| { | |
| '_id': 'variable_name_column', | |
| 'caption': tr( | |
| 'Name' | |
| ), | |
| 'caption_cmd': '', | |
| 'cmd': 'item.name', | |
| 'enable_expr': 'controller.enable_predicate()', | |
| 'enable_refresh': 'callback:controller.enable_callback', | |
| 'nonsense_expr': '', | |
| 'nonsense_refresh': '', | |
| 'nonsense_symbol_expr': '', | |
| 'nonsense_symbol_refresh': '', | |
| 'read_only_expr': '', | |
| 'read_only_refresh': '', | |
| 'resize_mode': 'resize_to_contents', | |
| 'tool_tip': tr( | |
| '' | |
| ), | |
| 'tool_tip_expr': '""', | |
| 'validation_expr': '', | |
| 'visible_expr': '', | |
| 'visible_refresh': '', | |
| 'width': -1, | |
| }, | |
| ), | |
| ( | |
| 'variable_value', | |
| { | |
| '_id': 'variable_column', | |
| 'caption': tr( | |
| 'Base Value' | |
| ), | |
| 'caption_cmd': '', | |
| 'cmd': 'item.val', | |
| 'enable_expr': 'controller.enable_predicate()', | |
| 'enable_refresh': 'callback:controller.enable_callback', | |
| 'nonsense_expr': '', | |
| 'nonsense_refresh': '', | |
| 'nonsense_symbol_expr': '', | |
| 'nonsense_symbol_refresh': '', | |
| 'read_only_expr': '', | |
| 'read_only_refresh': '', | |
| 'resize_mode': 'resize_to_contents', | |
| 'tool_tip': tr( | |
| '' | |
| ), | |
| 'tool_tip_expr': '""', | |
| 'validation_expr': '', | |
| 'visible_expr': '', | |
| 'visible_refresh': '', | |
| 'width': -1, | |
| }, | |
| ), | |
| ], | |
| }, | |
| ), | |
| ], | |
| }, | |
| ), | |
| ( | |
| 'variables_values_page', | |
| { | |
| '_id': 'splitter_page', | |
| 'enable_expr': '', | |
| 'visible_expr': '', | |
| 'visible_refresh': '', | |
| 'sub_fields': [ | |
| ( | |
| 'variables_values_group', | |
| { | |
| '_id': 'group', | |
| 'add_spacer': False, | |
| 'caption': '', | |
| 'caption_cmd': '', | |
| 'caption_color_expr': '', | |
| 'caption_horizontal_size_policy': 'Preferred', | |
| 'caption_vertical_size_policy': 'Fixed', | |
| 'cmd': '', | |
| 'create_caption': True, | |
| 'dynamic_properties': {}, | |
| 'enable_expr': 'controller.enable_predicate()', | |
| 'horizontal_size_type': 'Preferred', | |
| 'label_alignment': 'Qt::AlignLeading|Qt::AlignVCenter', | |
| 'orientation': 'horizontal', | |
| 'refresh_on': 'callback:controller.enable_callback', | |
| 'spacer_resize_policy': 'Expanding', | |
| 'style': 'invisible', | |
| 'tool_tip_expr': '""', | |
| 'vertical_size_type': 'Fixed', | |
| 'visible_expr': '', | |
| 'sub_fields': [ | |
| ( | |
| 'variables_values_editors', | |
| { | |
| '_id': 'editors', | |
| 'before_set_data_cmd': '', | |
| 'caption': '', | |
| 'caption_horizontal_size_policy': 'Preferred', | |
| 'caption_vertical_size_policy': 'Fixed', | |
| 'cmd': 'controller.current_value_editor', | |
| 'create_caption': False, | |
| 'create_page_cmd': 'controller.CreatePage', | |
| 'dynamic_properties': {}, | |
| 'indent': False, | |
| 'label_alignment': 'Qt::AlignLeading|Qt::AlignVCenter', | |
| 'obtain_data_cmd': 'controller.GetDataFromKey', | |
| 'obtain_editor_id_cmd': 'controller.GetEditorIdFromKey', | |
| 'orientation': 'horizontal', | |
| 'vertical_size_policy': 'Expanding', | |
| }, | |
| ), | |
| ], | |
| }, | |
| ), | |
| ], | |
| }, | |
| ), | |
| ], | |
| }, | |
| ), | |
| ], | |
| }, | |
| ), | |
| ( | |
| 'expressions_page', | |
| { | |
| '_id': 'splitter_page', | |
| 'enable_expr': '', | |
| 'visible_expr': '', | |
| 'visible_refresh': '', | |
| 'sub_fields': [ | |
| ( | |
| 'expressions_group', | |
| { | |
| '_id': 'group', | |
| 'add_spacer': False, | |
| 'caption': '', | |
| 'caption_cmd': '', | |
| 'caption_color_expr': '', | |
| 'caption_horizontal_size_policy': 'Preferred', | |
| 'caption_vertical_size_policy': 'Fixed', | |
| 'cmd': '', | |
| 'create_caption': True, | |
| 'dynamic_properties': {}, | |
| 'enable_expr': '', | |
| 'horizontal_size_type': 'Preferred', | |
| 'label_alignment': 'Qt::AlignLeading|Qt::AlignVCenter', | |
| 'orientation': 'horizontal', | |
| 'refresh_on': '', | |
| 'spacer_resize_policy': 'Expanding', | |
| 'style': 'invisible', | |
| 'tool_tip_expr': '""', | |
| 'vertical_size_type': 'Fixed', | |
| 'visible_expr': '', | |
| 'sub_fields': [ | |
| ( | |
| 'expressions', | |
| { | |
| '_id': 'subject_table', | |
| 'alternate_row_colors': False, | |
| 'background_color_expr': '', | |
| 'background_color_refresh': '', | |
| 'caption': tr( | |
| 'Expressions' | |
| ), | |
| 'caption_cmd': '', | |
| 'caption_color_expr': '', | |
| 'caption_horizontal_size_policy': 'Preferred', | |
| 'caption_refresh': '', | |
| 'caption_vertical_size_policy': 'Fixed', | |
| 'cmd': 'controller.variables_data_expressions', | |
| 'cmd_get_set': ('', ''), | |
| 'create_caption': True, | |
| 'dynamic_properties': {}, | |
| 'editing_status_cmd': '', | |
| 'enable_expr': '', | |
| 'enable_refresh': '', | |
| 'hidden_subject_indexes_cmd': '', | |
| 'hidden_subject_indexes_refresh': '', | |
| 'label_alignment': 'Qt::AlignLeading|Qt::AlignVCenter', | |
| 'max_number_of_lines': 0, | |
| 'min_number_of_lines': 5, | |
| 'orientation': 'vertical', | |
| 'pasting_creates_new_rows': True, | |
| 'resize_columns_automatically': True, | |
| 'selected_cell_cmd': '', | |
| 'selection_cmd': '', | |
| 'selection_mode': 'single_cell', | |
| 'should_trigger_modify_while_import': False, | |
| 'show_horizontal_header': True, | |
| 'show_vertical_header': False, | |
| 'sorting_enabled': False, | |
| 'tool_tip': tr(''), | |
| 'tool_tip_expr': '""', | |
| 'tool_tip_refresh': '', | |
| 'visible_expr': '', | |
| 'visible_refresh': '', | |
| 'sub_fields': [ | |
| ( | |
| 'expression_name', | |
| { | |
| '_id': 'string_column', | |
| 'caption': tr( | |
| 'Name' | |
| ), | |
| 'caption_cmd': '', | |
| 'cmd': 'item.name', | |
| 'enable_expr': 'controller.enable_predicate()', | |
| 'enable_refresh': 'callback:controller.enable_callback', | |
| 'nonsense_expr': '', | |
| 'nonsense_refresh': '', | |
| 'nonsense_symbol_expr': '', | |
| 'nonsense_symbol_refresh': '', | |
| 'read_only_expr': '"True"', | |
| 'read_only_refresh': '', | |
| 'resize_mode': 'resize_to_contents', | |
| 'style': 'edit', | |
| 'tool_tip': tr( | |
| '' | |
| ), | |
| 'tool_tip_expr': '""', | |
| 'validation_expr': '', | |
| 'visible_expr': '', | |
| 'visible_refresh': '', | |
| 'width': -1, | |
| }, | |
| ), | |
| ( | |
| 'expression_value', | |
| { | |
| '_id': 'parametric_expression_column', | |
| 'caption': tr( | |
| 'Value' | |
| ), | |
| 'caption_cmd': '', | |
| 'cmd': 'item.expression', | |
| 'enable_expr': 'controller.enable_predicate()', | |
| 'enable_refresh': 'callback:controller.enable_callback', | |
| 'nonsense_expr': '', | |
| 'nonsense_refresh': '', | |
| 'nonsense_symbol_expr': '', | |
| 'nonsense_symbol_refresh': '', | |
| 'read_only_expr': '', | |
| 'read_only_refresh': '', | |
| 'resize_mode': 'resize_to_contents', | |
| 'tool_tip': tr( | |
| '' | |
| ), | |
| 'tool_tip_expr': '""', | |
| 'validation_expr': '', | |
| 'visible_expr': '', | |
| 'visible_refresh': '', | |
| 'width': -1, | |
| }, | |
| ), | |
| ], | |
| }, | |
| ), | |
| ( | |
| 'expression_instructions', | |
| { | |
| '_id': 'text', | |
| 'caption': '', | |
| 'caption_cmd': '', | |
| 'caption_color_expr': '', | |
| 'caption_horizontal_size_policy': 'Preferred', | |
| 'caption_vertical_size_policy': 'Fixed', | |
| 'cmd': 'controller.ExpressionInstructions()', | |
| 'create_caption': False, | |
| 'enable_expr': '', | |
| 'format_expr': '', | |
| 'label_alignment': 'Qt::AlignLeading|Qt::AlignVCenter', | |
| 'orientation': 'horizontal', | |
| 'read_only_expr': 'True', | |
| 'refresh_on': '', | |
| 'style': 'label', | |
| 'tool_tip_expr': '""', | |
| 'validation_callback': None, | |
| 'value': '', | |
| 'visible_expr': '', | |
| }, | |
| ), | |
| ], | |
| }, | |
| ), | |
| ], | |
| }, | |
| ), | |
| ], | |
| }, | |
| ), | |
| ], | |
| }, | |
| ), | |
| ( | |
| 'runs_tab', | |
| { | |
| '_id': 'tab', | |
| 'caption': tr('Runs'), | |
| 'caption_cmd': '', | |
| 'caption_color_expr': '', | |
| 'caption_horizontal_size_policy': 'Preferred', | |
| 'caption_refresh': '', | |
| 'caption_vertical_size_policy': 'Fixed', | |
| 'cmd': '', | |
| 'create_caption': True, | |
| 'enable_expr': 'controller.enable_predicate()', | |
| 'enable_refresh': 'callback:controller.enable_callback', | |
| 'label_alignment': 'Qt::AlignLeading|Qt::AlignVCenter', | |
| 'orientation': 'horizontal', | |
| 'spacer_resize_policy': 'Maximum', | |
| 'tool_tip': tr(''), | |
| 'tool_tip_expr': '""', | |
| 'tool_tip_refresh': '', | |
| 'visible_expr': '', | |
| 'visible_refresh': '', | |
| 'sub_fields': [ | |
| ( | |
| 'runs_tab_description', | |
| { | |
| '_id': 'text', | |
| 'caption': '', | |
| 'caption_cmd': '', | |
| 'caption_color_expr': '', | |
| 'caption_horizontal_size_policy': 'Preferred', | |
| 'caption_vertical_size_policy': 'Fixed', | |
| 'cmd': '', | |
| 'create_caption': False, | |
| 'enable_expr': '', | |
| 'format_expr': '', | |
| 'label_alignment': 'Qt::AlignLeading|Qt::AlignVCenter', | |
| 'orientation': 'horizontal', | |
| 'read_only_expr': '', | |
| 'refresh_on': '', | |
| 'style': 'label', | |
| 'tool_tip_expr': '""', | |
| 'validation_callback': None, | |
| 'value': '', | |
| 'visible_expr': '', | |
| }, | |
| ), | |
| ( | |
| 'runs_tab_total_runs_label', | |
| { | |
| '_id': 'text', | |
| 'caption': 'Total Runs', | |
| 'caption_cmd': '', | |
| 'caption_color_expr': '', | |
| 'caption_horizontal_size_policy': 'Preferred', | |
| 'caption_vertical_size_policy': 'Fixed', | |
| 'cmd': 'controller.GetTotalRunsCaption()', | |
| 'create_caption': True, | |
| 'enable_expr': '', | |
| 'format_expr': '', | |
| 'label_alignment': 'Qt::AlignLeading|Qt::AlignVCenter', | |
| 'orientation': 'horizontal', | |
| 'read_only_expr': '', | |
| 'refresh_on': 'controller.enabled_total_runs', | |
| 'style': 'label', | |
| 'tool_tip_expr': '""', | |
| 'validation_callback': None, | |
| 'value': '', | |
| 'visible_expr': '', | |
| }, | |
| ), | |
| ( | |
| 'runs_tab_enabled_runs_label', | |
| { | |
| '_id': 'text', | |
| 'caption': 'Enabled Runs', | |
| 'caption_cmd': '', | |
| 'caption_color_expr': '', | |
| 'caption_horizontal_size_policy': 'Preferred', | |
| 'caption_vertical_size_policy': 'Fixed', | |
| 'cmd': 'controller.GetEnabledRunsCaption()', | |
| 'create_caption': True, | |
| 'enable_expr': '', | |
| 'format_expr': '', | |
| 'label_alignment': 'Qt::AlignLeading|Qt::AlignVCenter', | |
| 'orientation': 'horizontal', | |
| 'read_only_expr': '', | |
| 'refresh_on': 'controller.enabled_total_runs', | |
| 'style': 'label', | |
| 'tool_tip_expr': '""', | |
| 'validation_callback': None, | |
| 'value': '', | |
| 'visible_expr': '', | |
| }, | |
| ), | |
| ( | |
| 'toolbar', | |
| { | |
| '_id': 'tool_bar', | |
| 'caption': '', | |
| 'caption_cmd': '', | |
| 'caption_color_expr': '', | |
| 'caption_horizontal_size_policy': 'Preferred', | |
| 'caption_vertical_size_policy': 'Fixed', | |
| 'cmd': '', | |
| 'create_caption': True, | |
| 'enable_expr': '', | |
| 'frame_shape': 'NoFrame', | |
| 'label_alignment': 'Qt::AlignLeading|Qt::AlignVCenter', | |
| 'orientation': 'horizontal', | |
| 'refresh_on': '', | |
| 'spacer_resize_policy': 'MinimumExpanding', | |
| 'tool_tip_expr': '""', | |
| 'visible_expr': '', | |
| 'sub_fields': [ | |
| ( | |
| 'btn_enable_selected', | |
| { | |
| '_id': 'tool_button', | |
| 'align': 'left', | |
| 'auto_raise': True, | |
| 'caption': '', | |
| 'caption_cmd': '', | |
| 'caption_color_expr': '', | |
| 'caption_horizontal_size_policy': 'Preferred', | |
| 'caption_vertical_size_policy': 'Fixed', | |
| 'checkable': False, | |
| 'cmd': 'controller.CheckSelectedRuns()', | |
| 'create_caption': True, | |
| 'enable_expr': '', | |
| 'height': 20, | |
| 'img': ':xgui/check_all.png', | |
| 'label_alignment': 'Qt::AlignLeading|Qt::AlignVCenter', | |
| 'orientation': 'horizontal', | |
| 'refresh_on': '', | |
| 'tool_tip_expr': '""', | |
| 'visible_expr': '', | |
| 'whats_this': '', | |
| 'width': 20, | |
| }, | |
| ), | |
| ( | |
| 'btn_disable_selected', | |
| { | |
| '_id': 'tool_button', | |
| 'align': 'left', | |
| 'auto_raise': True, | |
| 'caption': '', | |
| 'caption_cmd': '', | |
| 'caption_color_expr': '', | |
| 'caption_horizontal_size_policy': 'Preferred', | |
| 'caption_vertical_size_policy': 'Fixed', | |
| 'checkable': False, | |
| 'cmd': 'controller.UnCheckSelectedRuns()', | |
| 'create_caption': True, | |
| 'enable_expr': '', | |
| 'height': 20, | |
| 'img': ':xgui/uncheck_all.png', | |
| 'label_alignment': 'Qt::AlignLeading|Qt::AlignVCenter', | |
| 'orientation': 'horizontal', | |
| 'refresh_on': '', | |
| 'tool_tip_expr': '""', | |
| 'visible_expr': '', | |
| 'whats_this': '', | |
| 'width': 20, | |
| }, | |
| ), | |
| ], | |
| }, | |
| ), | |
| ( | |
| 'runs_tab_table', | |
| { | |
| '_id': 'dynamic_table', | |
| 'caption': tr(''), | |
| 'caption_cmd': '', | |
| 'caption_color_expr': '', | |
| 'caption_horizontal_size_policy': 'Preferred', | |
| 'caption_refresh': '', | |
| 'caption_vertical_size_policy': 'Fixed', | |
| 'cmd': 'controller.table_contents', | |
| 'create_caption': False, | |
| 'dynamic_properties': {}, | |
| 'editable': False, | |
| 'enable_expr': '', | |
| 'enable_refresh': '', | |
| 'horizontal_header': 'controller.horizontal_header', | |
| 'horizontal_stretchable': False, | |
| 'label_alignment': 'Qt::AlignLeading|Qt::AlignVCenter', | |
| 'orientation': 'vertical', | |
| 'refresh_on': 'data.on_run_list_change', | |
| 'selection_cmd': 'controller.selection', | |
| 'selection_mode': 'multi_row', | |
| 'text_color_cmd': '', | |
| 'tool_tip': tr(''), | |
| 'tool_tip_expr': '""', | |
| 'tool_tip_refresh': '', | |
| 'vertical_header': '', | |
| 'visible_expr': '', | |
| 'visible_refresh': '', | |
| }, | |
| ), | |
| ( | |
| 'runs_tab_table_notes_label', | |
| { | |
| '_id': 'text', | |
| 'caption': '', | |
| 'caption_cmd': '', | |
| 'caption_color_expr': '', | |
| 'caption_horizontal_size_policy': 'Preferred', | |
| 'caption_vertical_size_policy': 'Fixed', | |
| 'cmd': 'controller.GetTableNotes()', | |
| 'create_caption': False, | |
| 'enable_expr': '', | |
| 'format_expr': '', | |
| 'label_alignment': 'Qt::AlignLeading|Qt::AlignVCenter', | |
| 'orientation': 'horizontal', | |
| 'read_only_expr': '', | |
| 'refresh_on': 'controller.enabled_total_runs', | |
| 'style': 'label', | |
| 'tool_tip_expr': '""', | |
| 'validation_callback': None, | |
| 'value': '', | |
| 'visible_expr': '', | |
| }, | |
| ), | |
| ], | |
| }, | |
| ), | |
| ], | |
| } | |
| } | |
| return fields |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment