28 @type QObject (optional) |
28 @type QObject (optional) |
29 """ |
29 """ |
30 super().__init__(parent) |
30 super().__init__(parent) |
31 |
31 |
32 self.__mpy = microPython |
32 self.__mpy = microPython |
|
33 self.__mpy.disconnected.connect(self.__disconnectedFromDevice) |
33 |
34 |
34 self.__btStatusDialog = None |
35 self.__btStatusDialog = None |
35 |
36 |
36 def createMenu(self, menu): |
37 def createMenu(self, menu): |
37 """ |
38 """ |
60 |
61 |
61 # add device specific entries (if there are any) |
62 # add device specific entries (if there are any) |
62 self.__mpy.getDevice().addDeviceBluetoothEntries(btMenu) |
63 self.__mpy.getDevice().addDeviceBluetoothEntries(btMenu) |
63 |
64 |
64 return btMenu |
65 return btMenu |
|
66 |
|
67 @pyqtSlot() |
|
68 def __disconnectedFromDevice(self): |
|
69 """ |
|
70 Private slot handling disconnection from a device. |
|
71 """ |
|
72 if self.__btStatusDialog is not None: |
|
73 self.__btStatusDialog.deleteLater() |
|
74 self.__btStatusDialog = None |
65 |
75 |
66 @pyqtSlot() |
76 @pyqtSlot() |
67 def __showBtStatus(self): |
77 def __showBtStatus(self): |
68 """ |
78 """ |
69 Private slot to show the status and some parameters of the Bluetooth interface. |
79 Private slot to show the status and some parameters of the Bluetooth interface. |