MCPcopy Create free account
hub / github.com/echQoQ/RustSL / create_run_mode_combobox

Function create_run_mode_combobox

gui/ui_components.py:107–124  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

105
106
107def create_run_mode_combobox():
108 combo = QComboBox()
109 combo.setIconSize(QSize(20, 20))
110
111 run_icon = get_icon('run')
112 manifest = load_plugins_manifest()
113
114 for rm in manifest['run_modes']:
115 combo.addItem(run_icon, rm.get('label', rm['id']), rm['id'])
116
117 default_rm = get_default_value('run_mode')
118 if default_rm:
119 for i in range(combo.count()):
120 if combo.itemData(i) == default_rm:
121 combo.setCurrentIndex(i)
122 break
123
124 return combo
125
126
127

Callers 1

Calls 3

get_iconFunction · 0.85
load_plugins_manifestFunction · 0.85
get_default_valueFunction · 0.85

Tested by

no test coverage detected