# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file 'tomasulo.ui'
#
# Created by: PyQt5 UI code generator 5.6
#
# WARNING! All changes made in this file will be lost!

import Tomasulo
import time
from PyQt5 import QtCore, QtGui, QtWidgets

class Ui_MainWindow(object):
	def __init__(self):
		self.Tomasulo = None
		self.pause = True

	def setupUi(self, MainWindow):
		MainWindow.setObjectName("MainWindow")
		MainWindow.resize(839, 601)
		self.centralwidget = QtWidgets.QWidget(MainWindow)
		self.centralwidget.setObjectName("centralwidget")
		self.gridLayout = QtWidgets.QGridLayout(self.centralwidget)
		self.gridLayout.setObjectName("gridLayout")
		self.horizontalLayout = QtWidgets.QHBoxLayout()
		self.horizontalLayout.setObjectName("horizontalLayout")
		self.estacoesTable = QtWidgets.QTableWidget(self.centralwidget)
		self.estacoesTable.setRowCount(11)
		self.estacoesTable.setColumnCount(9)
		self.estacoesTable.setObjectName("estacoesTable")
		item = QtWidgets.QTableWidgetItem()
		self.estacoesTable.setVerticalHeaderItem(0, item)
		item = QtWidgets.QTableWidgetItem()
		self.estacoesTable.setVerticalHeaderItem(1, item)
		item = QtWidgets.QTableWidgetItem()
		self.estacoesTable.setVerticalHeaderItem(2, item)
		item = QtWidgets.QTableWidgetItem()
		self.estacoesTable.setVerticalHeaderItem(3, item)
		item = QtWidgets.QTableWidgetItem()
		self.estacoesTable.setVerticalHeaderItem(4, item)
		item = QtWidgets.QTableWidgetItem()
		self.estacoesTable.setVerticalHeaderItem(5, item)
		item = QtWidgets.QTableWidgetItem()
		self.estacoesTable.setVerticalHeaderItem(6, item)
		item = QtWidgets.QTableWidgetItem()
		self.estacoesTable.setVerticalHeaderItem(7, item)
		item = QtWidgets.QTableWidgetItem()
		self.estacoesTable.setVerticalHeaderItem(8, item)
		item = QtWidgets.QTableWidgetItem()
		self.estacoesTable.setVerticalHeaderItem(9, item)
		item = QtWidgets.QTableWidgetItem()
		self.estacoesTable.setVerticalHeaderItem(10, item)
		item = QtWidgets.QTableWidgetItem()
		self.estacoesTable.setHorizontalHeaderItem(0, item)
		item = QtWidgets.QTableWidgetItem()
		self.estacoesTable.setHorizontalHeaderItem(1, item)
		item = QtWidgets.QTableWidgetItem()
		self.estacoesTable.setHorizontalHeaderItem(2, item)
		item = QtWidgets.QTableWidgetItem()
		self.estacoesTable.setHorizontalHeaderItem(3, item)
		item = QtWidgets.QTableWidgetItem()
		self.estacoesTable.setHorizontalHeaderItem(4, item)
		item = QtWidgets.QTableWidgetItem()
		self.estacoesTable.setHorizontalHeaderItem(5, item)
		item = QtWidgets.QTableWidgetItem()
		self.estacoesTable.setHorizontalHeaderItem(6, item)
		item = QtWidgets.QTableWidgetItem()
		self.estacoesTable.setHorizontalHeaderItem(7, item)
		item = QtWidgets.QTableWidgetItem()
		self.estacoesTable.setHorizontalHeaderItem(8, item)
		item = QtWidgets.QTableWidgetItem()
		self.estacoesTable.setItem(0, 0, item)
		item = QtWidgets.QTableWidgetItem()
		self.estacoesTable.setItem(1, 0, item)
		item = QtWidgets.QTableWidgetItem()
		self.estacoesTable.setItem(2, 0, item)
		item = QtWidgets.QTableWidgetItem()
		self.estacoesTable.setItem(3, 0, item)
		item = QtWidgets.QTableWidgetItem()
		self.estacoesTable.setItem(4, 0, item)
		item = QtWidgets.QTableWidgetItem()
		self.estacoesTable.setItem(5, 0, item)
		item = QtWidgets.QTableWidgetItem()
		self.estacoesTable.setItem(6, 0, item)
		item = QtWidgets.QTableWidgetItem()
		self.estacoesTable.setItem(7, 0, item)
		item = QtWidgets.QTableWidgetItem()
		self.estacoesTable.setItem(8, 0, item)
		item = QtWidgets.QTableWidgetItem()
		self.estacoesTable.setItem(9, 0, item)
		item = QtWidgets.QTableWidgetItem()
		self.estacoesTable.setItem(10, 0, item)
		self.horizontalLayout.addWidget(self.estacoesTable)
		self.verticalLayout = QtWidgets.QVBoxLayout()
		self.verticalLayout.setObjectName("verticalLayout")
		self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
		self.horizontalLayout_2.setObjectName("horizontalLayout_2")
		self.playBtn = QtWidgets.QPushButton(self.centralwidget)
		self.playBtn.setObjectName("playBtn")
		self.horizontalLayout_2.addWidget(self.playBtn)
		self.speedUpBtn = QtWidgets.QPushButton(self.centralwidget)
		self.speedUpBtn.setObjectName("speedUpBtn")
		self.horizontalLayout_2.addWidget(self.speedUpBtn)
		self.pauseBtn = QtWidgets.QPushButton(self.centralwidget)
		self.pauseBtn.setObjectName("pauseBtn")
		self.horizontalLayout_2.addWidget(self.pauseBtn)
		self.verticalLayout.addLayout(self.horizontalLayout_2)
		self.memoryTable = QtWidgets.QTableWidget(self.centralwidget)
		self.memoryTable.setObjectName("memoryTable")
		self.memoryTable.setColumnCount(2)
		self.memoryTable.setRowCount(4)
		item = QtWidgets.QTableWidgetItem()
		self.memoryTable.setVerticalHeaderItem(0, item)
		item = QtWidgets.QTableWidgetItem()
		self.memoryTable.setVerticalHeaderItem(1, item)
		item = QtWidgets.QTableWidgetItem()
		self.memoryTable.setVerticalHeaderItem(2, item)
		item = QtWidgets.QTableWidgetItem()
		self.memoryTable.setVerticalHeaderItem(3, item)
		item = QtWidgets.QTableWidgetItem()
		self.memoryTable.setHorizontalHeaderItem(0, item)
		item = QtWidgets.QTableWidgetItem()
		self.memoryTable.setHorizontalHeaderItem(1, item)
		self.verticalLayout.addWidget(self.memoryTable)
		self.clockTable = QtWidgets.QTableWidget(self.centralwidget)
		self.clockTable.setObjectName("clockTable")
		self.clockTable.setColumnCount(1)
		self.clockTable.setRowCount(4)
		item = QtWidgets.QTableWidgetItem()
		self.clockTable.setVerticalHeaderItem(0, item)
		item = QtWidgets.QTableWidgetItem()
		self.clockTable.setVerticalHeaderItem(1, item)
		item = QtWidgets.QTableWidgetItem()
		self.clockTable.setVerticalHeaderItem(2, item)
		item = QtWidgets.QTableWidgetItem()
		self.clockTable.setVerticalHeaderItem(3, item)
		item = QtWidgets.QTableWidgetItem()
		self.clockTable.setHorizontalHeaderItem(0, item)
		self.verticalLayout.addWidget(self.clockTable)
		self.registersTable = QtWidgets.QTableWidget(self.centralwidget)
		self.registersTable.setObjectName("registersTable")
		self.registersTable.setColumnCount(2)
		self.registersTable.setRowCount(32)
		item = QtWidgets.QTableWidgetItem()
		self.registersTable.setVerticalHeaderItem(0, item)
		item = QtWidgets.QTableWidgetItem()
		self.registersTable.setVerticalHeaderItem(1, item)
		item = QtWidgets.QTableWidgetItem()
		self.registersTable.setVerticalHeaderItem(2, item)
		item = QtWidgets.QTableWidgetItem()
		self.registersTable.setVerticalHeaderItem(3, item)
		item = QtWidgets.QTableWidgetItem()
		self.registersTable.setVerticalHeaderItem(4, item)
		item = QtWidgets.QTableWidgetItem()
		self.registersTable.setVerticalHeaderItem(5, item)
		item = QtWidgets.QTableWidgetItem()
		self.registersTable.setVerticalHeaderItem(6, item)
		item = QtWidgets.QTableWidgetItem()
		self.registersTable.setVerticalHeaderItem(7, item)
		item = QtWidgets.QTableWidgetItem()
		self.registersTable.setVerticalHeaderItem(8, item)
		item = QtWidgets.QTableWidgetItem()
		self.registersTable.setVerticalHeaderItem(9, item)
		item = QtWidgets.QTableWidgetItem()
		self.registersTable.setVerticalHeaderItem(10, item)
		item = QtWidgets.QTableWidgetItem()
		self.registersTable.setVerticalHeaderItem(11, item)
		item = QtWidgets.QTableWidgetItem()
		self.registersTable.setVerticalHeaderItem(12, item)
		item = QtWidgets.QTableWidgetItem()
		self.registersTable.setVerticalHeaderItem(13, item)
		item = QtWidgets.QTableWidgetItem()
		self.registersTable.setVerticalHeaderItem(14, item)
		item = QtWidgets.QTableWidgetItem()
		self.registersTable.setVerticalHeaderItem(15, item)
		item = QtWidgets.QTableWidgetItem()
		self.registersTable.setVerticalHeaderItem(16, item)
		item = QtWidgets.QTableWidgetItem()
		self.registersTable.setVerticalHeaderItem(17, item)
		item = QtWidgets.QTableWidgetItem()
		self.registersTable.setVerticalHeaderItem(18, item)
		item = QtWidgets.QTableWidgetItem()
		self.registersTable.setVerticalHeaderItem(19, item)
		item = QtWidgets.QTableWidgetItem()
		self.registersTable.setVerticalHeaderItem(20, item)
		item = QtWidgets.QTableWidgetItem()
		self.registersTable.setVerticalHeaderItem(21, item)
		item = QtWidgets.QTableWidgetItem()
		self.registersTable.setVerticalHeaderItem(22, item)
		item = QtWidgets.QTableWidgetItem()
		self.registersTable.setVerticalHeaderItem(23, item)
		item = QtWidgets.QTableWidgetItem()
		self.registersTable.setVerticalHeaderItem(24, item)
		item = QtWidgets.QTableWidgetItem()
		self.registersTable.setVerticalHeaderItem(25, item)
		item = QtWidgets.QTableWidgetItem()
		self.registersTable.setVerticalHeaderItem(26, item)
		item = QtWidgets.QTableWidgetItem()
		self.registersTable.setVerticalHeaderItem(27, item)
		item = QtWidgets.QTableWidgetItem()
		self.registersTable.setVerticalHeaderItem(28, item)
		item = QtWidgets.QTableWidgetItem()
		self.registersTable.setVerticalHeaderItem(29, item)
		item = QtWidgets.QTableWidgetItem()
		self.registersTable.setVerticalHeaderItem(30, item)
		item = QtWidgets.QTableWidgetItem()
		self.registersTable.setVerticalHeaderItem(31, item)
		item = QtWidgets.QTableWidgetItem()
		self.registersTable.setHorizontalHeaderItem(0, item)
		item = QtWidgets.QTableWidgetItem()
		self.registersTable.setHorizontalHeaderItem(1, item)
		self.verticalLayout.addWidget(self.registersTable)
		self.horizontalLayout.addLayout(self.verticalLayout)
		self.gridLayout.addLayout(self.horizontalLayout, 0, 0, 1, 1)
		MainWindow.setCentralWidget(self.centralwidget)
		self.menubar = QtWidgets.QMenuBar(MainWindow)
		self.menubar.setGeometry(QtCore.QRect(0, 0, 839, 25))
		self.menubar.setObjectName("menubar")
		MainWindow.setMenuBar(self.menubar)
		self.statusbar = QtWidgets.QStatusBar(MainWindow)
		self.statusbar.setObjectName("statusbar")
		MainWindow.setStatusBar(self.statusbar)

		self.btn_grp_play = QtWidgets.QButtonGroup()
		self.btn_grp_play.setExclusive(True)
		self.btn_grp_play.addButton(self.playBtn)
		self.btn_grp_play.buttonClicked.connect(self.on_click_play)
		
		self.btn_grp_auto = QtWidgets.QButtonGroup()
		self.btn_grp_auto.setExclusive(True)
		self.btn_grp_auto.addButton(self.speedUpBtn)
		self.btn_grp_auto.buttonClicked.connect(self.on_click_auto)

		self.btn_grp_pause = QtWidgets.QButtonGroup()
		self.btn_grp_pause.setExclusive(True)
		self.btn_grp_pause.addButton(self.pauseBtn)
		self.btn_grp_pause.buttonClicked.connect(self.on_click_pause)

		self.retranslateUi(MainWindow)
		QtCore.QMetaObject.connectSlotsByName(MainWindow)

	def retranslateUi(self, MainWindow):
		_translate = QtCore.QCoreApplication.translate
		MainWindow.setWindowTitle(_translate("MainWindow", "Tomasulo"))
		item = self.estacoesTable.verticalHeaderItem(0)
		item.setText(_translate("MainWindow", "ER1"))
		item = self.estacoesTable.verticalHeaderItem(1)
		item.setText(_translate("MainWindow", "ER2"))
		item = self.estacoesTable.verticalHeaderItem(2)
		item.setText(_translate("MainWindow", "ER3"))
		item = self.estacoesTable.verticalHeaderItem(3)
		item.setText(_translate("MainWindow", "ER4"))
		item = self.estacoesTable.verticalHeaderItem(4)
		item.setText(_translate("MainWindow", "ER5"))
		item = self.estacoesTable.verticalHeaderItem(5)
		item.setText(_translate("MainWindow", "ER6"))
		item = self.estacoesTable.verticalHeaderItem(6)
		item.setText(_translate("MainWindow", "ER7"))
		item = self.estacoesTable.verticalHeaderItem(7)
		item.setText(_translate("MainWindow", "ER8"))
		item = self.estacoesTable.verticalHeaderItem(8)
		item.setText(_translate("MainWindow", "ER9"))
		item = self.estacoesTable.verticalHeaderItem(9)
		item.setText(_translate("MainWindow", "ER10"))
		item = self.estacoesTable.verticalHeaderItem(10)
		item.setText(_translate("MainWindow", "ER11"))
		item = self.estacoesTable.horizontalHeaderItem(0)
		item.setText(_translate("MainWindow", "Tipo"))
		item = self.estacoesTable.horizontalHeaderItem(1)
		item.setText(_translate("MainWindow", "Busy"))
		item = self.estacoesTable.horizontalHeaderItem(2)
		item.setText(_translate("MainWindow", "Instrução"))
		item = self.estacoesTable.horizontalHeaderItem(3)
		item.setText(_translate("MainWindow", "Estado"))
		item = self.estacoesTable.horizontalHeaderItem(4)
		item.setText(_translate("MainWindow", "Vj"))
		item = self.estacoesTable.horizontalHeaderItem(5)
		item.setText(_translate("MainWindow", "Vk"))
		item = self.estacoesTable.horizontalHeaderItem(6)
		item.setText(_translate("MainWindow", "Qj"))
		item = self.estacoesTable.horizontalHeaderItem(7)
		item.setText(_translate("MainWindow", "Qk"))
		item = self.estacoesTable.horizontalHeaderItem(8)
		item.setText(_translate("MainWindow", "A"))
		__sortingEnabled = self.estacoesTable.isSortingEnabled()
		self.estacoesTable.setSortingEnabled(False)
		item = self.estacoesTable.item(0, 0)
		item.setText(_translate("MainWindow", "Load/Store"))
		item = self.estacoesTable.item(1, 0)
		item.setText(_translate("MainWindow", "Load/Store"))
		item = self.estacoesTable.item(2, 0)
		item.setText(_translate("MainWindow", "Load/Store"))
		item = self.estacoesTable.item(3, 0)
		item.setText(_translate("MainWindow", "Load/Store"))
		item = self.estacoesTable.item(4, 0)
		item.setText(_translate("MainWindow", "Load/Store"))
		item = self.estacoesTable.item(5, 0)
		item.setText(_translate("MainWindow", "Add"))
		item = self.estacoesTable.item(6, 0)
		item.setText(_translate("MainWindow", "Add"))
		item = self.estacoesTable.item(7, 0)
		item.setText(_translate("MainWindow", "Add"))
		item = self.estacoesTable.item(8, 0)
		item.setText(_translate("MainWindow", "Mult"))
		item = self.estacoesTable.item(9, 0)
		item.setText(_translate("MainWindow", "Mult"))
		item = self.estacoesTable.item(10, 0)
		item.setText(_translate("MainWindow", "Mult"))
		self.estacoesTable.setSortingEnabled(__sortingEnabled)
		self.playBtn.setText(_translate("MainWindow", "Play"))
		self.speedUpBtn.setText(_translate("MainWindow", "Auto Play"))
		self.pauseBtn.setText(_translate("MainWindow", "Pause"))
		item = self.memoryTable.verticalHeaderItem(0)
		item.setText(_translate("MainWindow", "1"))
		item = self.memoryTable.verticalHeaderItem(1)
		item.setText(_translate("MainWindow", "2"))
		item = self.memoryTable.verticalHeaderItem(2)
		item.setText(_translate("MainWindow", "3"))
		item = self.memoryTable.verticalHeaderItem(3)
		item.setText(_translate("MainWindow", "4"))
		item = self.memoryTable.horizontalHeaderItem(0)
		item.setText(_translate("MainWindow", "Endereço"))
		item = self.memoryTable.horizontalHeaderItem(1)
		item.setText(_translate("MainWindow", "Valor"))
		item = self.clockTable.verticalHeaderItem(0)
		item.setText(_translate("MainWindow", "Clock Corrente"))
		item = self.clockTable.verticalHeaderItem(1)
		item.setText(_translate("MainWindow", "PC"))
		item = self.clockTable.verticalHeaderItem(2)
		item.setText(_translate("MainWindow", "N.I.C."))
		item = self.clockTable.verticalHeaderItem(3)
		item.setText(_translate("MainWindow", "CPI"))
		item = self.clockTable.horizontalHeaderItem(0)
		item.setText(_translate("MainWindow", "Valor"))
		item = self.registersTable.verticalHeaderItem(0)
		item.setText(_translate("MainWindow", "R0"))
		item = self.registersTable.verticalHeaderItem(1)
		item.setText(_translate("MainWindow", "R1"))
		item = self.registersTable.verticalHeaderItem(2)
		item.setText(_translate("MainWindow", "R2"))
		item = self.registersTable.verticalHeaderItem(3)
		item.setText(_translate("MainWindow", "R3"))
		item = self.registersTable.verticalHeaderItem(4)
		item.setText(_translate("MainWindow", "R4"))
		item = self.registersTable.verticalHeaderItem(5)
		item.setText(_translate("MainWindow", "R5"))
		item = self.registersTable.verticalHeaderItem(6)
		item.setText(_translate("MainWindow", "R6"))
		item = self.registersTable.verticalHeaderItem(7)
		item.setText(_translate("MainWindow", "R7"))
		item = self.registersTable.verticalHeaderItem(8)
		item.setText(_translate("MainWindow", "R8"))
		item = self.registersTable.verticalHeaderItem(9)
		item.setText(_translate("MainWindow", "R9"))
		item = self.registersTable.verticalHeaderItem(10)
		item.setText(_translate("MainWindow", "R10"))
		item = self.registersTable.verticalHeaderItem(11)
		item.setText(_translate("MainWindow", "R11"))
		item = self.registersTable.verticalHeaderItem(12)
		item.setText(_translate("MainWindow", "R12"))
		item = self.registersTable.verticalHeaderItem(13)
		item.setText(_translate("MainWindow", "R13"))
		item = self.registersTable.verticalHeaderItem(14)
		item.setText(_translate("MainWindow", "R14"))
		item = self.registersTable.verticalHeaderItem(15)
		item.setText(_translate("MainWindow", "R15"))
		item = self.registersTable.verticalHeaderItem(16)
		item.setText(_translate("MainWindow", "R16"))
		item = self.registersTable.verticalHeaderItem(17)
		item.setText(_translate("MainWindow", "R17"))
		item = self.registersTable.verticalHeaderItem(18)
		item.setText(_translate("MainWindow", "R18"))
		item = self.registersTable.verticalHeaderItem(19)
		item.setText(_translate("MainWindow", "R19"))
		item = self.registersTable.verticalHeaderItem(20)
		item.setText(_translate("MainWindow", "R20"))
		item = self.registersTable.verticalHeaderItem(21)
		item.setText(_translate("MainWindow", "R21"))
		item = self.registersTable.verticalHeaderItem(22)
		item.setText(_translate("MainWindow", "R22"))
		item = self.registersTable.verticalHeaderItem(23)
		item.setText(_translate("MainWindow", "R23"))
		item = self.registersTable.verticalHeaderItem(24)
		item.setText(_translate("MainWindow", "R24"))
		item = self.registersTable.verticalHeaderItem(25)
		item.setText(_translate("MainWindow", "R25"))
		item = self.registersTable.verticalHeaderItem(26)
		item.setText(_translate("MainWindow", "R26"))
		item = self.registersTable.verticalHeaderItem(27)
		item.setText(_translate("MainWindow", "R27"))
		item = self.registersTable.verticalHeaderItem(28)
		item.setText(_translate("MainWindow", "R28"))
		item = self.registersTable.verticalHeaderItem(29)
		item.setText(_translate("MainWindow", "R29"))
		item = self.registersTable.verticalHeaderItem(30)
		item.setText(_translate("MainWindow", "R30"))
		item = self.registersTable.verticalHeaderItem(31)
		item.setText(_translate("MainWindow", "R31"))
		item = self.registersTable.horizontalHeaderItem(0)
		item.setText(_translate("MainWindow", "Qi"))
		item = self.registersTable.horizontalHeaderItem(1)
		item.setText(_translate("MainWindow", "Vi"))

	def update_register_bank(self, register_bank):
		_translate = QtCore.QCoreApplication.translate

		for i in range(32):
			item = self.registersTable.item(i, 1)
			if not item:
				item = QtWidgets.QTableWidgetItem()
				self.registersTable.setItem(i, 1, item)
			item.setText(_translate("MainWindow", str(register_bank.registers[i].Vi)))
			# self.registersTable.setItem(i, 1, item)

			item = self.registersTable.item(i, 2)
			if not item:
				item = QtWidgets.QTableWidgetItem()
				self.registersTable.setItem(i, 2, item)
			item.setText(_translate("MainWindow", register_bank.registers[i].Qi))
			# self.registersTable.setItem(i, 2, item)

	def update_RUM(self, RUM):
		_translate = QtCore.QCoreApplication.translate

		for i in range(len(RUM.list)):
			item = self.memoryTable.item(i, 0)
			if not item:
				item = QtWidgets.QTableWidgetItem()
				self.memoryTable.setItem(i, 0, item)
			item.setText(_translate("MainWindow", str(RUM.list[i][0])))

			item = self.memoryTable.item(i, 1)
			if not item:
				item = QtWidgets.QTableWidgetItem()
				self.memoryTable.setItem(i, 1, item)
			item.setText(_translate("MainWindow", str(RUM.list[i][1])))

	def update_Clock_Table(self, list_CLK_PC_NCI_CPI):
		_translate = QtCore.QCoreApplication.translate

		for i in range(4):
			item = self.clockTable.item(i-1, 1)
			if not item:
				item = QtWidgets.QTableWidgetItem()
				self.clockTable.setItem(i-1, 1, item)
			item.setText(_translate("MainWindow", str(list_CLK_PC_NCI_CPI[i])))

	def update_Stations_Table(self, station, pos):
		_translate = QtCore.QCoreApplication.translate

		for i in range(station.max_size):
			instruction = ""
			if len(station.list[i]) > 0:
				instruction = station.list[i][0]
			list = [str(station.busy[i]),
				instruction,
				station.state[i],
				str(station.Vj[i]),
				str(station.Vk[i]),
				station.Qj[i],
				station.Qk[i],
				""
				]
			for j in range(8):
				item = self.estacoesTable.item(i + pos, j + 1)
				if not item:
					item = QtWidgets.QTableWidgetItem()
					self.estacoesTable.setItem(i + pos, j + 1, item)
				item.setText(_translate("MainWindow", list[j]))

	def set_Tomasulo(self, Tomasulo):
		self.Tomasulo = Tomasulo


	def on_click_play(self, playBtn):
		self.Tomasulo.play()

	def on_click_auto(self, autoplayBtn):
		self.pause = False

		while not self.pause:
			self.Tomasulo.MainWindow.show()
			if not self.Tomasulo.play(): break

	def on_click_pause(self, pauseBtn):
		self.pause = True


if __name__ == "__main__":
	import sys
	app = QtWidgets.QApplication(sys.argv)
	MainWindow = QtWidgets.QMainWindow()
	ui = Ui_MainWindow()
	ui.setupUi(MainWindow)
	MainWindow.show()
	sys.exit(app.exec_())
