-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.py
118 lines (111 loc) · 5.71 KB
/
test.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'compiler.ui'
#
# Created by: PyQt5 UI code generator 5.15.1
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(921, 716)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.textBrowser = QtWidgets.QTextBrowser(self.centralwidget)
self.textBrowser.setGeometry(QtCore.QRect(40, 520, 831, 131))
self.textBrowser.setObjectName("textBrowser")
self.groupBox_1 = QtWidgets.QGroupBox(self.centralwidget)
self.groupBox_1.setGeometry(QtCore.QRect(42, 32, 191, 461))
font = QtGui.QFont()
font.setPointSize(10)
self.groupBox_1.setFont(font)
self.groupBox_1.setObjectName("groupBox_1")
self.plainTextEdit_1 = QtWidgets.QPlainTextEdit(self.groupBox_1)
self.plainTextEdit_1.setGeometry(QtCore.QRect(10, 20, 171, 391))
self.plainTextEdit_1.setObjectName("plainTextEdit_1")
self.pushButton_1 = QtWidgets.QPushButton(self.groupBox_1)
self.pushButton_1.setGeometry(QtCore.QRect(90, 420, 91, 28))
font = QtGui.QFont()
font.setPointSize(10)
self.pushButton_1.setFont(font)
self.pushButton_1.setObjectName("pushButton_1")
self.groupBox_4 = QtWidgets.QGroupBox(self.centralwidget)
self.groupBox_4.setGeometry(QtCore.QRect(630, 30, 241, 461))
font = QtGui.QFont()
font.setPointSize(10)
self.groupBox_4.setFont(font)
self.groupBox_4.setObjectName("groupBox_4")
self.graphicsView = QtWidgets.QGraphicsView(self.groupBox_4)
self.graphicsView.setGeometry(QtCore.QRect(10, 20, 221, 391))
self.graphicsView.setObjectName("graphicsView")
self.pushButton_zoomout = QtWidgets.QPushButton(self.groupBox_4)
self.pushButton_zoomout.setGeometry(QtCore.QRect(142, 420, 91, 28))
font = QtGui.QFont()
font.setPointSize(10)
self.pushButton_zoomout.setFont(font)
self.pushButton_zoomout.setObjectName("pushButton_zoomout")
self.pushButton_zoomin = QtWidgets.QPushButton(self.groupBox_4)
self.pushButton_zoomin.setGeometry(QtCore.QRect(40, 420, 91, 28))
font = QtGui.QFont()
font.setPointSize(10)
self.pushButton_zoomin.setFont(font)
self.pushButton_zoomin.setObjectName("pushButton_zoomin")
self.groupBox_2 = QtWidgets.QGroupBox(self.centralwidget)
self.groupBox_2.setGeometry(QtCore.QRect(242, 32, 171, 461))
font = QtGui.QFont()
font.setPointSize(10)
self.groupBox_2.setFont(font)
self.groupBox_2.setObjectName("groupBox_2")
self.plainTextEdit_2 = QtWidgets.QPlainTextEdit(self.groupBox_2)
self.plainTextEdit_2.setGeometry(QtCore.QRect(10, 20, 151, 391))
self.plainTextEdit_2.setObjectName("plainTextEdit_2")
self.pushButton_2 = QtWidgets.QPushButton(self.groupBox_2)
self.pushButton_2.setGeometry(QtCore.QRect(70, 420, 91, 28))
font = QtGui.QFont()
font.setPointSize(10)
self.pushButton_2.setFont(font)
self.pushButton_2.setObjectName("pushButton_2")
self.groupBox_3 = QtWidgets.QGroupBox(self.centralwidget)
self.groupBox_3.setGeometry(QtCore.QRect(423, 30, 201, 461))
font = QtGui.QFont()
font.setPointSize(10)
self.groupBox_3.setFont(font)
self.groupBox_3.setObjectName("groupBox_3")
self.plainTextEdit_3 = QtWidgets.QPlainTextEdit(self.groupBox_3)
self.plainTextEdit_3.setGeometry(QtCore.QRect(10, 20, 181, 391))
self.plainTextEdit_3.setObjectName("plainTextEdit_3")
self.pushButton_3 = QtWidgets.QPushButton(self.groupBox_3)
self.pushButton_3.setGeometry(QtCore.QRect(100, 420, 91, 28))
font = QtGui.QFont()
font.setPointSize(10)
self.pushButton_3.setFont(font)
self.pushButton_3.setObjectName("pushButton_3")
self.plainTextEdit_3.raise_()
self.groupBox_4.raise_()
self.pushButton_3.raise_()
self.textBrowser.raise_()
self.plainTextEdit_1.raise_()
self.plainTextEdit_2.raise_()
MainWindow.setCentralWidget(self.centralwidget)
self.menubar = QtWidgets.QMenuBar(MainWindow)
self.menubar.setGeometry(QtCore.QRect(0, 0, 921, 26))
self.menubar.setObjectName("menubar")
MainWindow.setMenuBar(self.menubar)
self.statusbar = QtWidgets.QStatusBar(MainWindow)
self.statusbar.setObjectName("statusbar")
MainWindow.setStatusBar(self.statusbar)
self.retranslateUi(MainWindow)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
self.groupBox_1.setTitle(_translate("MainWindow", "语法输入"))
self.pushButton_1.setText(_translate("MainWindow", "选择文件"))
self.groupBox_4.setTitle(_translate("MainWindow", "语法树"))
self.pushButton_zoomout.setText(_translate("MainWindow", "缩小"))
self.pushButton_zoomin.setText(_translate("MainWindow", "放大"))
self.groupBox_2.setTitle(_translate("MainWindow", "源代码"))
self.pushButton_2.setText(_translate("MainWindow", "选择文件"))
self.groupBox_3.setTitle(_translate("MainWindow", "词法及语法分析"))
self.pushButton_3.setText(_translate("MainWindow", "执行分析"))