Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import sys,os
- from PyQt4 import QtCore, QtGui
- from PyQt4.QtCore import QThread
- import time
- class MyForm(QtGui.QMainWindow):
- def __init__(self, parent=None):
- QtGui.QWidget.__init__(self, parent)
- self.ui = Ui_MainWindow()
- self.ui.setupUi(self)
- self.ui.lblHistory.setPixmap(QtGui.QPixmap(os.getcwd() + "/historygraph.png"))
- self.workerThread=WorkingThread()
- self.ui.pushButton.clicked.connect(self.generateDetails)
- self.ui.btnsubmitsettings.clicked.connect(self.addDetails)
- def generateDetails(self):
- self.workerThread.start()
- self.ui.lblHistory.setPixmap(QtGui.QPixmap(os.getcwd() + "/historygraph.png"))
- self.addPiechart()
- self.addWordCloud()
- self.summaryText()
- def addPiechart(self):
- print ("Added")
- def addWordCloud(self):
- print ("Added")
- def addDetails(self):
- def summaryText(self):
- print("Added")
- class WorkingThread(QThread):
- def __init__(self, parent=None):
- super(self.__class__, self).__init__(parent)
- def run(self):
- BigramsClassifier()
- if __name__ == "__main__":
- app = QtGui.QApplication(sys.argv)
- myapp = MyForm()
- myapp.show()
- sys.exit(app.exec_())
Add Comment
Please, Sign In to add comment