Пример #1
0
 def on_clearButton_clicked(self):
     MainWindow.on_clearButton_clicked(self)
     if self.cap_thread == None or self.ana_thread == None:
         pass
     elif self.cap_thread.is_alive() or self.ana_thread.is_alive():
         if self.capturer.pktSrcType == 'dev':
             QtGui.QMessageBox.information(self, "Information", 
                                           self.tr("You must stop capture first."))
             return False
         elif self.capturer.pktSrcType == 'dump':
             self.on_stopButton_clicked()
     
     self.capturer.clear()
     self.analyzer.clear()
     self.pktList.clear()
     
     count = self.pktTableWidget.rowCount()
     for i in range(count):
         self.pktTableWidget.removeRow(0)
     self.pktTreeWidget.clear()
     self.pktAsciiBrowser.clear()
     self.pkt0xBrowser.clear()
     return True