()
| 105 | |
| 106 | |
| 107 | def 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 |
no test coverage detected