Guest User

Untitled

a guest
Oct 18th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. import sys,os
  2.  
  3. from PyQt4 import QtCore, QtGui
  4. from PyQt4.QtCore import QThread
  5. import time
  6.  
  7. class MyForm(QtGui.QMainWindow):
  8.  
  9. def __init__(self, parent=None):
  10.  
  11. QtGui.QWidget.__init__(self, parent)
  12. self.ui = Ui_MainWindow()
  13. self.ui.setupUi(self)
  14. self.ui.lblHistory.setPixmap(QtGui.QPixmap(os.getcwd() + "/historygraph.png"))
  15.  
  16. self.workerThread=WorkingThread()
  17. self.ui.pushButton.clicked.connect(self.generateDetails)
  18. self.ui.btnsubmitsettings.clicked.connect(self.addDetails)
  19.  
  20.  
  21.  
  22. def generateDetails(self):
  23. self.workerThread.start()
  24. self.ui.lblHistory.setPixmap(QtGui.QPixmap(os.getcwd() + "/historygraph.png"))
  25. self.addPiechart()
  26. self.addWordCloud()
  27. self.summaryText()
  28.  
  29.  
  30. def addPiechart(self):
  31.  
  32. print ("Added")
  33.  
  34. def addWordCloud(self):
  35.  
  36. print ("Added")
  37.  
  38. def addDetails(self):
  39.  
  40.  
  41. def summaryText(self):
  42.  
  43. print("Added")
  44.  
  45. class WorkingThread(QThread):
  46. def __init__(self, parent=None):
  47. super(self.__class__, self).__init__(parent)
  48.  
  49. def run(self):
  50. BigramsClassifier()
  51.  
  52. if __name__ == "__main__":
  53. app = QtGui.QApplication(sys.argv)
  54.  
  55. myapp = MyForm()
  56. myapp.show()
  57. sys.exit(app.exec_())
Add Comment
Please, Sign In to add comment