src/eric7/MicroPython/EthernetDialogs/EthernetController.py

branch
eric7
changeset 11005
b918c6c2736b
parent 10439
21c28b0f9e41
child 11090
f5f5f5803935
equal deleted inserted replaced
11004:5f8d929657b3 11005:b918c6c2736b
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

eric ide

mercurial