84 try: |
84 try: |
85 with EricOverrideCursor(): |
85 with EricOverrideCursor(): |
86 status = self.__mpy.getDevice().getEthernetStatus() |
86 status = self.__mpy.getDevice().getEthernetStatus() |
87 # status is a list of user labels and associated values |
87 # status is a list of user labels and associated values |
88 |
88 |
89 dlg = EthernetStatusDialog(status, self.__mpy) |
89 dlg = EthernetStatusDialog(status, parent=self.__mpy) |
90 dlg.exec() |
90 dlg.exec() |
91 except Exception as exc: |
91 except Exception as exc: |
92 self.__mpy.showError("getEthernetStatus()", str(exc)) |
92 self.__mpy.showError("getEthernetStatus()", str(exc)) |
93 |
93 |
94 @pyqtSlot() |
94 @pyqtSlot() |
96 """ |
96 """ |
97 Private slot to connect to the LAN with a dynamic IPv4 address (DHCP mode). |
97 Private slot to connect to the LAN with a dynamic IPv4 address (DHCP mode). |
98 """ |
98 """ |
99 from .HostnameDialog import HostnameDialog |
99 from .HostnameDialog import HostnameDialog |
100 |
100 |
101 dlg = HostnameDialog(self.__mpy) |
101 dlg = HostnameDialog(parent=self.__mpy) |
102 hostname = ( |
102 hostname = ( |
103 dlg.getHostname() if dlg.exec() == QDialog.DialogCode.Accepted else "" |
103 dlg.getHostname() if dlg.exec() == QDialog.DialogCode.Accepted else "" |
104 ) |
104 ) |
105 self.__connectLan("dhcp", hostname) |
105 self.__connectLan("dhcp", hostname) |
106 |
106 |
340 " The module <b>ntptime</b> is not available.</p>" |
340 " The module <b>ntptime</b> is not available.</p>" |
341 ), |
341 ), |
342 ) |
342 ) |
343 return |
343 return |
344 |
344 |
345 dlg = NtpParametersDialog(self.__mpy) |
345 dlg = NtpParametersDialog(parent=self.__mpy) |
346 if dlg.exec() == QDialog.DialogCode.Accepted: |
346 if dlg.exec() == QDialog.DialogCode.Accepted: |
347 server, tzOffset, isDst, timeout = dlg.getParameters() |
347 server, tzOffset, isDst, timeout = dlg.getParameters() |
348 if isDst: |
348 if isDst: |
349 tzOffset += 1 |
349 tzOffset += 1 |
350 |
350 |