mirror of
https://github.com/nqrduck/nqrduck-spectrometer.git
synced 2024-12-21 16:00:25 +00:00
Updated menubar entry for spectrometer selection.
This commit is contained in:
parent
bbcf3e360e
commit
752340d7f7
1 changed files with 9 additions and 1 deletions
|
@ -112,6 +112,14 @@ class SpectrometerView(ModuleView):
|
|||
self._module.model._available_spectrometers,
|
||||
)
|
||||
|
||||
# Create an header action called 'Spectrometer"
|
||||
self._actions["Spectrometer"] = QAction("Spectrometer:", menu_item)
|
||||
font = self._actions["Spectrometer"].font()
|
||||
font.setBold(True)
|
||||
self._actions["Spectrometer"].setFont(font)
|
||||
self._actions["Spectrometer"].setEnabled(False)
|
||||
menu_item.addSeparator()
|
||||
|
||||
for (
|
||||
spectrometer_name,
|
||||
spectrometer_module,
|
||||
|
@ -130,7 +138,7 @@ class SpectrometerView(ModuleView):
|
|||
last_added_action = self._actions[list(self._actions.keys())[-1]]
|
||||
last_added_action.setChecked(True)
|
||||
|
||||
self.add_menubar_item.emit("Hardware", list(self._actions.values()))
|
||||
self.add_menubar_item.emit("Hardware", list(self._actions.values()), True)
|
||||
|
||||
@pyqtSlot(str)
|
||||
def on_menu_button_clicked(self, spectrometer_name):
|
||||
|
|
Loading…
Reference in a new issue