-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathScanUI.py
36 lines (23 loc) · 970 Bytes
/
ScanUI.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
from PyQt4.uic import loadUi
from PyQt4.QtCore import QObject, pyqtSlot
from PyQt4.QtGui import QDialog, QTableWidgetItem, QToolButton, QTextCursor
from Scan import Scan
__author__ = 'daniel'
class ScanUI(QObject):
def __init__(self, parent = None):
super(ScanUI, self).__init__(parent)
self.parent = parent
self.scan = Scan(self)
def add_ap(self, packet):
tableWidgetAP = self.parent.tableWidgetAP
count = tableWidgetAP.rowCount()
tableWidgetAP.insertRow(count)
tableWidgetAP.setItem(count, 0, QTableWidgetItem(packet[0]))
tableWidgetAP.setItem(count, 1, QTableWidgetItem(packet[1]))
tableWidgetAP.setItem(count, 2, QTableWidgetItem(packet[2]))
def getHackAPList(self):
retVal = self.exec_()
if retVal == QDialog.Rejected:
return None
widget = self.UI.tableWidgetInterface
return str(widget.item(widget.currentRow(), 0).text())