29 @type QObject (optional) |
29 @type QObject (optional) |
30 """ |
30 """ |
31 super().__init__(parent) |
31 super().__init__(parent) |
32 |
32 |
33 self.__mpy = microPython |
33 self.__mpy = microPython |
|
34 self.__mpy.disconnected.connect(self.__disconnectedFromDevice) |
34 |
35 |
35 self.__ethernetStatusDialog = None |
36 self.__ethernetStatusDialog = None |
36 |
37 |
37 def createMenu(self, menu): |
38 def createMenu(self, menu): |
38 """ |
39 """ |
73 |
74 |
74 # add device specific entries (if there are any) |
75 # add device specific entries (if there are any) |
75 self.__mpy.getDevice().addDeviceEthernetEntries(ethernetMenu) |
76 self.__mpy.getDevice().addDeviceEthernetEntries(ethernetMenu) |
76 |
77 |
77 return ethernetMenu |
78 return ethernetMenu |
|
79 |
|
80 @pyqtSlot() |
|
81 def __disconnectedFromDevice(self): |
|
82 """ |
|
83 Private slot handling disconnection from a device. |
|
84 """ |
|
85 if self.__ethernetStatusDialog is not None: |
|
86 self.__ethernetStatusDialog.deleteLater() |
|
87 self.__ethernetStatusDialog = None |
78 |
88 |
79 @pyqtSlot() |
89 @pyqtSlot() |
80 def __showEthernetStatus(self): |
90 def __showEthernetStatus(self): |
81 """ |
91 """ |
82 Private slot to show a dialog with the WiFi status of the current device. |
92 Private slot to show a dialog with the WiFi status of the current device. |