src/eric7/MicroPython/BluetoothDialogs/BluetoothController.py

branch
mpy_network
changeset 9857
0122ae72618d
parent 9855
c9244db5566a
child 10439
21c28b0f9e41
equal deleted inserted replaced
9856:df2ff78bbc01 9857:0122ae72618d
42 """ 42 """
43 btMenu = QMenu(self.tr("Bluetooth Functions"), menu) 43 btMenu = QMenu(self.tr("Bluetooth Functions"), menu)
44 btMenu.setTearOffEnabled(True) 44 btMenu.setTearOffEnabled(True)
45 btMenu.addAction(self.tr("Show Bluetooth Status"), self.__showBtStatus) 45 btMenu.addAction(self.tr("Show Bluetooth Status"), self.__showBtStatus)
46 btMenu.addSeparator() 46 btMenu.addSeparator()
47 btMenu.addAction(self.tr("Perform Scan"), self.__scan)
47 btMenu.addSeparator() 48 btMenu.addSeparator()
48 btMenu.addAction( 49 btMenu.addAction(
49 self.tr("Activate Bluetooth Interface"), 50 self.tr("Activate Bluetooth Interface"),
50 lambda: self.__activateInterface(), 51 lambda: self.__activateInterface(),
51 ) 52 )
116 self.tr("Deactivate Bluetooth Interface"), 117 self.tr("Deactivate Bluetooth Interface"),
117 self.tr("""Bluetooth could not be deactivated."""), 118 self.tr("""Bluetooth could not be deactivated."""),
118 ) 119 )
119 except Exception as exc: 120 except Exception as exc:
120 self.__mpy.showError("deactivateBluetoothInterface()", str(exc)) 121 self.__mpy.showError("deactivateBluetoothInterface()", str(exc))
122
123 @pyqtSlot()
124 def __scan(self):
125 """
126 Private slot to scan for Bluetooth devices.
127 """
128 from .BluetoothScanWindow import BluetoothScanWindow
129
130 win = BluetoothScanWindow(self.__mpy.getDevice(), self.__mpy)
131 win.show()

eric ide

mercurial