-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgui.py
192 lines (183 loc) · 10.9 KB
/
gui.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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'gui.ui'
#
# Created by: PyQt5 UI code generator 5.13.1
#
# 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(1139, 828)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Maximum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(MainWindow.sizePolicy().hasHeightForWidth())
MainWindow.setSizePolicy(sizePolicy)
MainWindow.setAutoFillBackground(False)
MainWindow.setStyleSheet("background-color: #142850;")
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.gridLayout_2 = QtWidgets.QGridLayout(self.centralwidget)
self.gridLayout_2.setObjectName("gridLayout_2")
self.softwareName = QtWidgets.QLabel(self.centralwidget)
self.softwareName.setEnabled(True)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.softwareName.sizePolicy().hasHeightForWidth())
self.softwareName.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setFamily("Times New Roman")
font.setPointSize(48)
font.setBold(False)
font.setItalic(False)
font.setUnderline(False)
font.setWeight(50)
self.softwareName.setFont(font)
self.softwareName.setCursor(QtGui.QCursor(QtCore.Qt.ForbiddenCursor))
self.softwareName.setStyleSheet("font: 48pt \"Times New Roman\";\n"
"color: #00a8cc;\n"
"background-color: #27496d;\n"
"")
self.softwareName.setFrameShape(QtWidgets.QFrame.WinPanel)
self.softwareName.setFrameShadow(QtWidgets.QFrame.Sunken)
self.softwareName.setAlignment(QtCore.Qt.AlignCenter)
self.softwareName.setObjectName("softwareName")
self.gridLayout_2.addWidget(self.softwareName, 0, 0, 1, 1)
self.column = QtWidgets.QTabWidget(self.centralwidget)
self.column.setAutoFillBackground(False)
self.column.setStyleSheet("font: 20pt \"Times New Roman\";\n"
"color: #00a8cc;\n"
"background-color: #27496d;\n"
"")
self.column.setObjectName("column")
self.tab_1 = QtWidgets.QWidget()
self.tab_1.setObjectName("tab_1")
self.gridLayout_3 = QtWidgets.QGridLayout(self.tab_1)
self.gridLayout_3.setObjectName("gridLayout_3")
self.pushButton_uMessageBody = QtWidgets.QPushButton(self.tab_1)
self.pushButton_uMessageBody.setObjectName("pushButton_uMessageBody")
self.gridLayout_3.addWidget(self.pushButton_uMessageBody, 2, 0, 1, 1)
self.label = QtWidgets.QLabel(self.tab_1)
self.label.setAlignment(QtCore.Qt.AlignCenter)
self.label.setObjectName("label")
self.gridLayout_3.addWidget(self.label, 4, 0, 1, 1)
self.pushButton_uSendingNumber = QtWidgets.QPushButton(self.tab_1)
self.pushButton_uSendingNumber.setStyleSheet("")
self.pushButton_uSendingNumber.setObjectName("pushButton_uSendingNumber")
self.gridLayout_3.addWidget(self.pushButton_uSendingNumber, 0, 0, 1, 1)
self.pushButton_uRecieverNumber = QtWidgets.QPushButton(self.tab_1)
self.pushButton_uRecieverNumber.setObjectName("pushButton_uRecieverNumber")
self.gridLayout_3.addWidget(self.pushButton_uRecieverNumber, 1, 0, 1, 1)
self.tableWidget_data = QtWidgets.QTableWidget(self.tab_1)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.tableWidget_data.sizePolicy().hasHeightForWidth())
self.tableWidget_data.setSizePolicy(sizePolicy)
self.tableWidget_data.setMinimumSize(QtCore.QSize(977, 300))
self.tableWidget_data.setMouseTracking(True)
self.tableWidget_data.setTabletTracking(True)
self.tableWidget_data.setAcceptDrops(True)
self.tableWidget_data.setToolTip("")
self.tableWidget_data.setFrameShape(QtWidgets.QFrame.WinPanel)
self.tableWidget_data.setFrameShadow(QtWidgets.QFrame.Sunken)
self.tableWidget_data.setSizeAdjustPolicy(QtWidgets.QAbstractScrollArea.AdjustToContents)
self.tableWidget_data.setDragEnabled(True)
self.tableWidget_data.setDragDropMode(QtWidgets.QAbstractItemView.DragDrop)
self.tableWidget_data.setAlternatingRowColors(False)
self.tableWidget_data.setSelectionMode(QtWidgets.QAbstractItemView.ExtendedSelection)
self.tableWidget_data.setRowCount(10)
self.tableWidget_data.setObjectName("tableWidget_data")
self.tableWidget_data.setColumnCount(3)
item = QtWidgets.QTableWidgetItem()
self.tableWidget_data.setHorizontalHeaderItem(0, item)
item = QtWidgets.QTableWidgetItem()
self.tableWidget_data.setHorizontalHeaderItem(1, item)
item = QtWidgets.QTableWidgetItem()
self.tableWidget_data.setHorizontalHeaderItem(2, item)
self.tableWidget_data.horizontalHeader().setCascadingSectionResizes(True)
self.tableWidget_data.horizontalHeader().setDefaultSectionSize(340)
self.tableWidget_data.horizontalHeader().setMinimumSectionSize(96)
self.tableWidget_data.horizontalHeader().setSortIndicatorShown(False)
self.tableWidget_data.horizontalHeader().setStretchLastSection(False)
self.tableWidget_data.verticalHeader().setStretchLastSection(False)
self.gridLayout_3.addWidget(self.tableWidget_data, 8, 0, 1, 4)
self.label_2 = QtWidgets.QLabel(self.tab_1)
self.label_2.setObjectName("label_2")
self.gridLayout_3.addWidget(self.label_2, 4, 2, 1, 1)
self.lineEdit_timeDuration = QtWidgets.QLineEdit(self.tab_1)
self.lineEdit_timeDuration.setObjectName("lineEdit_timeDuration")
self.gridLayout_3.addWidget(self.lineEdit_timeDuration, 4, 1, 1, 1)
self.lineEdit_messageLimit = QtWidgets.QLineEdit(self.tab_1)
self.lineEdit_messageLimit.setObjectName("lineEdit_messageLimit")
self.gridLayout_3.addWidget(self.lineEdit_messageLimit, 4, 3, 1, 1)
self.lineEdit_messageBody = QtWidgets.QLineEdit(self.tab_1)
self.lineEdit_messageBody.setObjectName("lineEdit_messageBody")
self.gridLayout_3.addWidget(self.lineEdit_messageBody, 2, 1, 1, 3)
self.lineEdit_recieverNumber = QtWidgets.QLineEdit(self.tab_1)
self.lineEdit_recieverNumber.setObjectName("lineEdit_recieverNumber")
self.gridLayout_3.addWidget(self.lineEdit_recieverNumber, 1, 1, 1, 3)
self.lineEdit_SendingNumber = QtWidgets.QLineEdit(self.tab_1)
self.lineEdit_SendingNumber.setObjectName("lineEdit_SendingNumber")
self.gridLayout_3.addWidget(self.lineEdit_SendingNumber, 0, 1, 1, 3)
self.pushButton_pause = QtWidgets.QPushButton(self.tab_1)
self.pushButton_pause.setStyleSheet("color: rgb(255, 20, 114);")
self.pushButton_pause.setObjectName("pushButton_pause")
self.gridLayout_3.addWidget(self.pushButton_pause, 5, 0, 1, 1)
self.pushButton_stop = QtWidgets.QPushButton(self.tab_1)
self.pushButton_stop.setStyleSheet("color: rgb(132, 0, 0);")
self.pushButton_stop.setObjectName("pushButton_stop")
self.gridLayout_3.addWidget(self.pushButton_stop, 5, 3, 1, 1)
self.pushButton_start = QtWidgets.QPushButton(self.tab_1)
self.pushButton_start.setObjectName("pushButton_start")
self.gridLayout_3.addWidget(self.pushButton_start, 5, 1, 1, 2)
self.label_status = QtWidgets.QLabel(self.tab_1)
self.label_status.setStyleSheet("color: rgb(1, 170, 136);")
self.label_status.setFrameShadow(QtWidgets.QFrame.Sunken)
self.label_status.setAlignment(QtCore.Qt.AlignCenter)
self.label_status.setWordWrap(True)
self.label_status.setTextInteractionFlags(QtCore.Qt.LinksAccessibleByMouse|QtCore.Qt.TextSelectableByMouse)
self.label_status.setObjectName("label_status")
self.gridLayout_3.addWidget(self.label_status, 6, 0, 1, 4)
self.column.addTab(self.tab_1, "")
self.gridLayout_2.addWidget(self.column, 2, 0, 1, 1)
MainWindow.setCentralWidget(self.centralwidget)
self.statusbar = QtWidgets.QStatusBar(MainWindow)
self.statusbar.setObjectName("statusbar")
MainWindow.setStatusBar(self.statusbar)
self.retranslateUi(MainWindow)
self.column.setCurrentIndex(0)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
self.softwareName.setText(_translate("MainWindow", "Auto Responder"))
self.pushButton_uMessageBody.setText(_translate("MainWindow", "Upload Message Body"))
self.label.setText(_translate("MainWindow", "Time Duration"))
self.pushButton_uSendingNumber.setText(_translate("MainWindow", "Upload Sending Number"))
self.pushButton_uRecieverNumber.setText(_translate("MainWindow", "Upload Reciever\'s Number"))
item = self.tableWidget_data.horizontalHeaderItem(0)
item.setText(_translate("MainWindow", "Own Number"))
item = self.tableWidget_data.horizontalHeaderItem(1)
item.setText(_translate("MainWindow", "Reciever\'s Number"))
item = self.tableWidget_data.horizontalHeaderItem(2)
item.setText(_translate("MainWindow", "Message Body"))
self.label_2.setText(_translate("MainWindow", "Message Limit"))
self.lineEdit_timeDuration.setToolTip(_translate("MainWindow", "<html><head/><body><p>In Min.</p></body></html>"))
self.lineEdit_timeDuration.setText(_translate("MainWindow", "1"))
self.lineEdit_messageLimit.setText(_translate("MainWindow", "5"))
self.pushButton_pause.setText(_translate("MainWindow", "Pause"))
self.pushButton_stop.setText(_translate("MainWindow", "Stop"))
self.pushButton_start.setText(_translate("MainWindow", "Start"))
self.label_status.setText(_translate("MainWindow", "Press Start Button..."))
self.column.setTabText(self.column.indexOf(self.tab_1), _translate("MainWindow", "Main Window"))
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_())