43 @rtype QMenu |
43 @rtype QMenu |
44 """ |
44 """ |
45 btMenu = QMenu(self.tr("Bluetooth Functions"), menu) |
45 btMenu = QMenu(self.tr("Bluetooth Functions"), menu) |
46 btMenu.setTearOffEnabled(True) |
46 btMenu.setTearOffEnabled(True) |
47 btMenu.addAction(self.tr("Show Bluetooth Status"), self.__showBtStatus) |
47 btMenu.addAction(self.tr("Show Bluetooth Status"), self.__showBtStatus) |
48 btMenu.addSeparator() |
48 if self.__mpy.getDevice().supportsDeviceScan(): |
49 btMenu.addAction(self.tr("Perform Scan"), self.__scan) |
49 btMenu.addSeparator() |
|
50 btMenu.addAction(self.tr("Perform Scan"), self.__scan) |
50 btMenu.addSeparator() |
51 btMenu.addSeparator() |
51 btMenu.addAction( |
52 btMenu.addAction( |
52 self.tr("Activate Bluetooth Interface"), |
53 self.tr("Activate Bluetooth Interface"), |
53 lambda: self.__activateInterface(), |
54 lambda: self.__activateInterface(), |
54 ) |
55 ) |