-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
46 lines (35 loc) · 1.16 KB
/
main.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import sys
from PyQt5 import QtCore, QtGui, QtWidgets
from main_ui import Ui_MainWindow
from huffman import Mywindow as window1
from feno import Mywindow as window2
from shannon import Mywindow as window3
class Mywindow(QtWidgets.QMainWindow):
def __init__(self):
QtWidgets.QMainWindow.__init__(self)
self.ui = Ui_MainWindow()
self.ui.setupUi(self)
self.ui.pushButton.clicked.connect(self.huffman)#哈夫曼界面跳转
self.ui.pushButton_2.clicked.connect(self.feno)#费诺界面跳转
self.ui.pushButton_3.clicked.connect(self.shannon)#香农界面跳转
def huffman(self):
self.ui_huffman = window1()
self.ui_huffman.show()
self.close()
def feno(self):
self.ui_feno = window2()
self.ui_feno.show()
self.close()
def shannon(self):
self.ui_shannon = window3()
self.ui_shannon.show()
self.close()
def back(self):
self.ui_back = Mywindow()
self.ui_back.show()
self.close()
if __name__ == '__main__':
app = QtWidgets.QApplication(sys.argv)
mywindow = Mywindow()
mywindow.show()
sys.exit(app.exec_())