()
| 37 | |
| 38 | |
| 39 | def create_mem_mode_combobox(): |
| 40 | combo = QComboBox() |
| 41 | mem_icon = get_icon('mem') |
| 42 | |
| 43 | manifest = load_plugins_manifest() |
| 44 | mem_modes = manifest.get('alloc_mem_modes', []) |
| 45 | |
| 46 | for m in mem_modes: |
| 47 | combo.addItem(mem_icon, m.get('label', m['id']), m['id']) |
| 48 | |
| 49 | default_mem = get_default_value('alloc_mem_mode') |
| 50 | if default_mem: |
| 51 | for i in range(combo.count()): |
| 52 | if combo.itemData(i) == default_mem: |
| 53 | combo.setCurrentIndex(i) |
| 54 | break |
| 55 | |
| 56 | return combo |
| 57 | |
| 58 | |
| 59 | def create_load_payload_combobox(): |
no test coverage detected