47 |
47 |
48 self.networkList.sortByColumn(0, Qt.SortOrder.AscendingOrder) |
48 self.networkList.sortByColumn(0, Qt.SortOrder.AscendingOrder) |
49 |
49 |
50 def scanNetworks(self): |
50 def scanNetworks(self): |
51 """ |
51 """ |
52 Private method to ask the device for a network scan and display the result. |
52 Public method to ask the device for a network scan and display the result. |
53 """ |
53 """ |
54 self.networkList.clear() |
54 self.networkList.clear() |
55 self.statusLabel.clear() |
55 self.statusLabel.clear() |
56 |
56 |
57 if not self.periodicCheckBox.isChecked(): |
57 if not self.periodicCheckBox.isChecked(): |
65 EricMessageBox.warning( |
65 EricMessageBox.warning( |
66 self, |
66 self, |
67 self.tr("Scan WiFi Networks"), |
67 self.tr("Scan WiFi Networks"), |
68 self.tr( |
68 self.tr( |
69 """<p>The scan for available WiFi networks failed.</p>""" |
69 """<p>The scan for available WiFi networks failed.</p>""" |
70 """<p>Reason: {0}</p>"""), |
70 """<p>Reason: {0}</p>""" |
|
71 ), |
71 ) |
72 ) |
72 if self.periodicCheckBox.isChecked(): |
73 if self.periodicCheckBox.isChecked(): |
73 self.periodicCheckBox.setChecked(False) |
74 self.periodicCheckBox.setChecked(False) |
74 |
75 |
75 else: |
76 else: |
112 ) |
113 ) |
113 self.networkList.header().setStretchLastSection(True) |
114 self.networkList.header().setStretchLastSection(True) |
114 |
115 |
115 def closeEvent(self, evt): |
116 def closeEvent(self, evt): |
116 """ |
117 """ |
117 Public method to handle a window close event. |
118 Protected method to handle a window close event. |
118 |
119 |
119 @param evt reference to the close event |
120 @param evt reference to the close event |
120 @type QCloseEvent |
121 @type QCloseEvent |
121 """ |
122 """ |
122 self.__scanTimer.stop() |
123 self.__scanTimer.stop() |