def _addActionInstrMenu(self, instr): if instr not in self.actions['Instruments']: action = QtWidgets.QAction(instr, self) self.menuInstr.addAction(action) action.setCheckable(True) action.setChecked(settings.addresses[instr]['use?']) action.triggered.connect(lambda: self._toggleInstr(instr)) self.actions['Instruments'][instr] = action
def _addActionViewMenu(self, instr): if instr not in self.actions['Views']: action = QtWidgets.QAction(instr, self) self.menuView.addAction(action) action.setCheckable(True) action.setChecked(True) action.triggered.connect(lambda: self._toggleView(instr)) self.actions['Views'][instr] = action
def _addActionViewMenu(self, instr): """Create the actions menu - such as enabled and disabling gui's on the fly """ if instr not in self.actions['Views']: action = QtWidgets.QAction(instr, self) self.menuView.addAction(action) action.setCheckable(True) action.setChecked(True) action.triggered.connect(lambda: self._toggleView(instr)) self.actions['Views'][instr] = action