30 """ |
30 """ |
31 super().__init__(parent) |
31 super().__init__(parent) |
32 |
32 |
33 self.__mpy = microPython |
33 self.__mpy = microPython |
34 |
34 |
|
35 self.__ethernetStatusDialog = None |
|
36 |
35 def createMenu(self, menu): |
37 def createMenu(self, menu): |
36 """ |
38 """ |
37 Public method to create the Ethernet submenu. |
39 Public method to create the Ethernet submenu. |
38 |
40 |
39 @param menu reference to the parent menu |
41 @param menu reference to the parent menu |
79 """ |
81 """ |
80 Private slot to show a dialog with the WiFi status of the current device. |
82 Private slot to show a dialog with the WiFi status of the current device. |
81 """ |
83 """ |
82 from .EthernetStatusDialog import EthernetStatusDialog |
84 from .EthernetStatusDialog import EthernetStatusDialog |
83 |
85 |
84 try: |
86 if self.__ethernetStatusDialog is not None: |
85 with EricOverrideCursor(): |
87 self.__ethernetStatusDialog.deleteLater() |
86 status = self.__mpy.getDevice().getEthernetStatus() |
88 self.__ethernetStatusDialog = None |
87 # status is a list of user labels and associated values |
89 |
88 |
90 self.__ethernetStatusDialog = EthernetStatusDialog( |
89 dlg = EthernetStatusDialog(status, parent=self.__mpy) |
91 microPython=self.__mpy, parent=self.__mpy |
90 dlg.exec() |
92 ) |
91 except Exception as exc: |
93 self.__ethernetStatusDialog.show() |
92 self.__mpy.showError("getEthernetStatus()", str(exc)) |
|
93 |
94 |
94 @pyqtSlot() |
95 @pyqtSlot() |
95 def __connectLanDhcp(self): |
96 def __connectLanDhcp(self): |
96 """ |
97 """ |
97 Private slot to connect to the LAN with a dynamic IPv4 address (DHCP mode). |
98 Private slot to connect to the LAN with a dynamic IPv4 address (DHCP mode). |