-
Notifications
You must be signed in to change notification settings - Fork 0
/
Main.py
139 lines (131 loc) · 6.78 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
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'Main.ui'
#
# Created by: PyQt5 UI code generator 5.11.3
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(665, 372)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.centralwidget)
self.verticalLayout_2.setObjectName("verticalLayout_2")
self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
self.label = QtWidgets.QLabel(self.centralwidget)
font = QtGui.QFont()
font.setPointSize(14)
self.label.setFont(font)
self.label.setObjectName("label")
self.horizontalLayout_3.addWidget(self.label)
self.toolButton_3 = QtWidgets.QToolButton(self.centralwidget)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap("assets/edit.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.toolButton_3.setIcon(icon)
self.toolButton_3.setIconSize(QtCore.QSize(32, 32))
self.toolButton_3.setObjectName("toolButton_3")
self.horizontalLayout_3.addWidget(self.toolButton_3)
self.verticalLayout_2.addLayout(self.horizontalLayout_3)
self.horizontalLayout_4 = QtWidgets.QHBoxLayout()
self.horizontalLayout_4.setObjectName("horizontalLayout_4")
self.lineEdit = QtWidgets.QLineEdit(self.centralwidget)
font = QtGui.QFont()
font.setFamily("Times New Roman")
font.setPointSize(16)
font.setBold(True)
font.setItalic(True)
font.setWeight(75)
self.lineEdit.setFont(font)
self.lineEdit.setAutoFillBackground(False)
self.lineEdit.setText("")
self.lineEdit.setDragEnabled(False)
self.lineEdit.setClearButtonEnabled(False)
self.lineEdit.setObjectName("lineEdit")
self.horizontalLayout_4.addWidget(self.lineEdit)
self.toolButton_4 = QtWidgets.QToolButton(self.centralwidget)
icon1 = QtGui.QIcon()
icon1.addPixmap(QtGui.QPixmap("assets/enter.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.toolButton_4.setIcon(icon1)
self.toolButton_4.setIconSize(QtCore.QSize(32, 32))
self.toolButton_4.setObjectName("toolButton_4")
self.horizontalLayout_4.addWidget(self.toolButton_4)
self.verticalLayout_2.addLayout(self.horizontalLayout_4)
self.horizontalLayout = QtWidgets.QHBoxLayout()
self.horizontalLayout.setSizeConstraint(QtWidgets.QLayout.SetMinimumSize)
self.horizontalLayout.setContentsMargins(0, -1, -1, -1)
self.horizontalLayout.setObjectName("horizontalLayout")
self.label_2 = QtWidgets.QLabel(self.centralwidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(50)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.label_2.sizePolicy().hasHeightForWidth())
self.label_2.setSizePolicy(sizePolicy)
self.label_2.setMinimumSize(QtCore.QSize(0, 0))
font = QtGui.QFont()
font.setPointSize(14)
self.label_2.setFont(font)
self.label_2.setObjectName("label_2")
self.horizontalLayout.addWidget(self.label_2)
self.verticalLayout_3 = QtWidgets.QVBoxLayout()
self.verticalLayout_3.setObjectName("verticalLayout_3")
self.toolButton = QtWidgets.QToolButton(self.centralwidget)
icon2 = QtGui.QIcon()
icon2.addPixmap(QtGui.QPixmap("assets/speak.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.toolButton.setIcon(icon2)
self.toolButton.setIconSize(QtCore.QSize(32, 32))
self.toolButton.setToolButtonStyle(QtCore.Qt.ToolButtonIconOnly)
self.toolButton.setObjectName("toolButton")
self.verticalLayout_3.addWidget(self.toolButton)
self.toolButton_2 = QtWidgets.QToolButton(self.centralwidget)
self.toolButton_2.setIcon(icon)
self.toolButton_2.setIconSize(QtCore.QSize(32, 32))
self.toolButton_2.setObjectName("toolButton_2")
self.verticalLayout_3.addWidget(self.toolButton_2)
self.horizontalLayout.addLayout(self.verticalLayout_3)
self.verticalLayout_2.addLayout(self.horizontalLayout)
self.progressBar = QtWidgets.QProgressBar(self.centralwidget)
self.progressBar.setProperty("value", 24)
self.progressBar.setObjectName("progressBar")
self.verticalLayout_2.addWidget(self.progressBar)
MainWindow.setCentralWidget(self.centralwidget)
self.statusbar = QtWidgets.QStatusBar(MainWindow)
self.statusbar.setObjectName("statusbar")
MainWindow.setStatusBar(self.statusbar)
self.menubar = QtWidgets.QMenuBar(MainWindow)
self.menubar.setGeometry(QtCore.QRect(0, 0, 665, 21))
self.menubar.setObjectName("menubar")
self.menuFile = QtWidgets.QMenu(self.menubar)
self.menuFile.setObjectName("menuFile")
MainWindow.setMenuBar(self.menubar)
self.actionOpen_sourcec = QtWidgets.QAction(MainWindow)
self.actionOpen_sourcec.setObjectName("actionOpen_sourcec")
self.actionSave_sentence_source = QtWidgets.QAction(MainWindow)
self.actionSave_sentence_source.setObjectName("actionSave_sentence_source")
self.menuFile.addAction(self.actionOpen_sourcec)
self.menuFile.addAction(self.actionSave_sentence_source)
self.menubar.addAction(self.menuFile.menuAction())
self.retranslateUi(MainWindow)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "Learn with couple sentence"))
self.label.setText(_translate("MainWindow", "Vietnamese Sentence"))
self.toolButton_3.setText(_translate("MainWindow", "..."))
self.toolButton_4.setText(_translate("MainWindow", "..."))
self.label_2.setText(_translate("MainWindow", "Result"))
self.toolButton.setText(_translate("MainWindow", "..."))
self.toolButton_2.setText(_translate("MainWindow", "..."))
self.menuFile.setTitle(_translate("MainWindow", "File"))
self.actionOpen_sourcec.setText(_translate("MainWindow", "Open source"))
self.actionSave_sentence_source.setText(_translate("MainWindow", "Save sentence source"))
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_())