runmanager.__main__.GroupTab
- class runmanager.__main__.GroupTab(tabWidget, globals_file, group_name)[source]
Bases:
object
Methods
__init__
(tabWidget, globals_file, group_name)change_global_expansion
(global_name, ...)change_global_units
(global_name, ...)change_global_value
(global_name, ...[, ...])check_for_boolean_values
(item)Checks if the value is 'True' or 'False'.
close
()complete_change_global_value
(global_name, ...)delete_global
(global_name[, confirm])get_global_item_by_name
(global_name, column)Returns an item from the row representing a global in the globals model.
Called whenever something about a global has changed.
make_global_row
(name[, value, units, expansion])new_global
(global_name)Handles global renaming and creation of new globals due to the user editing the <click to add global> item
rename_global
(previous_global_name, ...)set_file_and_group_name
(globals_file, group_name)Provided as a separate method so the main app can call it if the group gets renamed
set_tab_icon
(icon_string)update_parse_indication
(active_groups, ...)Attributes
- COLOR_BOOL_OFF = '#608060'
- COLOR_BOOL_ON = '#63F731'
- COLOR_ERROR = '#F79494'
- COLOR_OK = '#A5F7C6'
- GLOBALS_COL_DELETE = 0
- GLOBALS_COL_EXPANSION = 4
- GLOBALS_COL_NAME = 1
- GLOBALS_COL_UNITS = 3
- GLOBALS_COL_VALUE = 2
- GLOBALS_DUMMY_ROW_TEXT = '<Click to add global>'
- GLOBALS_ROLE_IS_BOOL = 260
- GLOBALS_ROLE_IS_DUMMY_ROW = 257
- GLOBALS_ROLE_PREVIOUS_TEXT = 259
- GLOBALS_ROLE_SORT_DATA = 258
- check_for_boolean_values(item)[source]
Checks if the value is ‘True’ or ‘False’. If either, makes the units cell checkable, uneditable, and coloured to indicate the state. The units cell can then be clicked to toggle the value.
- complete_change_global_value(global_name, previous_value, new_value, item, previous_background, previous_icon, interactive=True)[source]
- get_global_item_by_name(global_name, column, previous_name=None)[source]
Returns an item from the row representing a global in the globals model. Which item is returned is set by the column argument.
- globals_changed()[source]
Called whenever something about a global has changed. call app.globals_changed to inform the main application that it needs to parse globals again. self.update_parse_indication will be called by the main app when parsing is done, and will set the colours and tooltips appropriately
- on_globals_model_name_changed(item)[source]
Handles global renaming and creation of new globals due to the user editing the <click to add global> item