62 |
62 |
63 def getIPv4Address(self): |
63 def getIPv4Address(self): |
64 """ |
64 """ |
65 Public method to get the entered IPv4 address. |
65 Public method to get the entered IPv4 address. |
66 |
66 |
67 @return tuple containing the IPv4 address, the netmask, the gateway address and |
67 @return tuple containing a tuple of the IPv4 address, the netmask, the gateway |
68 the resolver address or the string 'dhcp' if dynamic addressing was selected |
68 address and the resolver address or the string 'dhcp' if dynamic addressing |
69 @rtype tuple (str, str, str, str) or str |
69 was selected and the hostname for the device |
|
70 @rtype tuple of ((str, str, str, str), str) or (str, str) |
70 """ |
71 """ |
71 if self.dhcpCheckBox.isChecked(): |
72 if self.dhcpCheckBox.isChecked(): |
72 return "dhcp" |
73 return "dhcp", self.hostnameEdit.text() |
73 else: |
74 else: |
74 return ( |
75 return ( |
75 self.addressEdit.text(), |
76 ( |
76 self.netmaskEdit.text(), |
77 self.addressEdit.text(), |
77 self.gatewayEdit.text(), |
78 self.netmaskEdit.text(), |
78 self.dnsEdit.text(), |
79 self.gatewayEdit.text(), |
|
80 self.dnsEdit.text(), |
|
81 ), |
|
82 self.hostnameEdit.text(), |
79 ) |
83 ) |