-
Notifications
You must be signed in to change notification settings - Fork 3
/
MainWindow.py
294 lines (286 loc) · 18.2 KB
/
MainWindow.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
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'UiFiles\MainWindow.ui'
#
# Created: Mon Dec 09 03:38:52 2013
# by: PyQt4 UI code generator 4.10.3
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
def _fromUtf8(s):
return s
try:
_encoding = QtGui.QApplication.UnicodeUTF8
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig, _encoding)
except AttributeError:
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig)
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName(_fromUtf8("MainWindow"))
MainWindow.resize(1000, 650)
self.centralwidget = QtGui.QWidget(MainWindow)
self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
self.layoutWidget = QtGui.QWidget(self.centralwidget)
self.layoutWidget.setGeometry(QtCore.QRect(10, 70, 981, 541))
self.layoutWidget.setObjectName(_fromUtf8("layoutWidget"))
self.horizontalLayout = QtGui.QHBoxLayout(self.layoutWidget)
self.horizontalLayout.setSpacing(6)
self.horizontalLayout.setMargin(0)
self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
self.tabWidget = QtGui.QTabWidget(self.layoutWidget)
self.tabWidget.setStyleSheet(_fromUtf8("wdjnv"))
self.tabWidget.setObjectName(_fromUtf8("tabWidget"))
self.tab_2 = QtGui.QWidget()
self.tab_2.setObjectName(_fromUtf8("tab_2"))
self.searchbarcode_products = QtGui.QPushButton(self.tab_2)
self.searchbarcode_products.setGeometry(QtCore.QRect(200, 10, 91, 23))
self.searchbarcode_products.setObjectName(_fromUtf8("searchbarcode_products"))
self.searchname_products = QtGui.QPushButton(self.tab_2)
self.searchname_products.setGeometry(QtCore.QRect(520, 10, 75, 23))
self.searchname_products.setObjectName(_fromUtf8("searchname_products"))
self.tableWidget_products = QtGui.QTableWidget(self.tab_2)
self.tableWidget_products.setGeometry(QtCore.QRect(10, 50, 821, 451))
self.tableWidget_products.setObjectName(_fromUtf8("tableWidget_products"))
self.tableWidget_products.setColumnCount(0)
self.tableWidget_products.setRowCount(0)
self.viewall_products = QtGui.QPushButton(self.tab_2)
self.viewall_products.setGeometry(QtCore.QRect(750, 10, 75, 23))
self.viewall_products.setObjectName(_fromUtf8("viewall_products"))
self.lineEdit_2_products = QtGui.QLineEdit(self.tab_2)
self.lineEdit_2_products.setGeometry(QtCore.QRect(330, 10, 171, 20))
self.lineEdit_2_products.setObjectName(_fromUtf8("lineEdit_2_products"))
self.lineEdit_1_products = QtGui.QLineEdit(self.tab_2)
self.lineEdit_1_products.setGeometry(QtCore.QRect(10, 10, 171, 20))
self.lineEdit_1_products.setObjectName(_fromUtf8("lineEdit_1_products"))
self.tabWidget.addTab(self.tab_2, _fromUtf8(""))
self.tab_3 = QtGui.QWidget()
self.tab_3.setObjectName(_fromUtf8("tab_3"))
self.searchbarcode_perishable = QtGui.QPushButton(self.tab_3)
self.searchbarcode_perishable.setGeometry(QtCore.QRect(200, 40, 91, 23))
self.searchbarcode_perishable.setObjectName(_fromUtf8("searchbarcode_perishable"))
self.searchname_perishable = QtGui.QPushButton(self.tab_3)
self.searchname_perishable.setGeometry(QtCore.QRect(530, 40, 75, 23))
self.searchname_perishable.setObjectName(_fromUtf8("searchname_perishable"))
self.tableWidget_perishable = QtGui.QTableWidget(self.tab_3)
self.tableWidget_perishable.setGeometry(QtCore.QRect(10, 80, 821, 421))
self.tableWidget_perishable.setObjectName(_fromUtf8("tableWidget_perishable"))
self.tableWidget_perishable.setColumnCount(0)
self.tableWidget_perishable.setRowCount(0)
self.viewall_perishable = QtGui.QPushButton(self.tab_3)
self.viewall_perishable.setGeometry(QtCore.QRect(760, 40, 75, 23))
self.viewall_perishable.setObjectName(_fromUtf8("viewall_perishable"))
self.lineEdit_2_perishable = QtGui.QLineEdit(self.tab_3)
self.lineEdit_2_perishable.setGeometry(QtCore.QRect(340, 40, 171, 20))
self.lineEdit_2_perishable.setObjectName(_fromUtf8("lineEdit_2_perishable"))
self.lineEdit_1_perishable = QtGui.QLineEdit(self.tab_3)
self.lineEdit_1_perishable.setGeometry(QtCore.QRect(10, 40, 171, 20))
self.lineEdit_1_perishable.setObjectName(_fromUtf8("lineEdit_1_perishable"))
self.add_perishable = QtGui.QPushButton(self.tab_3)
self.add_perishable.setGeometry(QtCore.QRect(10, 10, 111, 23))
self.add_perishable.setObjectName(_fromUtf8("add_perishable"))
self.stock_perishable = QtGui.QPushButton(self.tab_3)
self.stock_perishable.setGeometry(QtCore.QRect(720, 10, 111, 23))
self.stock_perishable.setObjectName(_fromUtf8("stock_perishable"))
self.remove_perishable = QtGui.QPushButton(self.tab_3)
self.remove_perishable.setGeometry(QtCore.QRect(290, 10, 111, 23))
self.remove_perishable.setObjectName(_fromUtf8("remove_perishable"))
self.update_perishable = QtGui.QPushButton(self.tab_3)
self.update_perishable.setGeometry(QtCore.QRect(150, 10, 111, 23))
self.update_perishable.setObjectName(_fromUtf8("update_perishable"))
self.tabWidget.addTab(self.tab_3, _fromUtf8(""))
self.tab_4 = QtGui.QWidget()
self.tab_4.setObjectName(_fromUtf8("tab_4"))
self.searchid_tran = QtGui.QPushButton(self.tab_4)
self.searchid_tran.setGeometry(QtCore.QRect(200, 50, 121, 23))
self.searchid_tran.setObjectName(_fromUtf8("searchid_tran"))
self.searchdate_tran = QtGui.QPushButton(self.tab_4)
self.searchdate_tran.setGeometry(QtCore.QRect(540, 50, 75, 23))
self.searchdate_tran.setObjectName(_fromUtf8("searchdate_tran"))
self.tableWidget_tran = QtGui.QTableWidget(self.tab_4)
self.tableWidget_tran.setGeometry(QtCore.QRect(10, 80, 821, 421))
self.tableWidget_tran.setObjectName(_fromUtf8("tableWidget_tran"))
self.tableWidget_tran.setColumnCount(0)
self.tableWidget_tran.setRowCount(0)
self.viewall_tran = QtGui.QPushButton(self.tab_4)
self.viewall_tran.setGeometry(QtCore.QRect(760, 50, 75, 23))
self.viewall_tran.setObjectName(_fromUtf8("viewall_tran"))
self.lineEdit_2_tran = QtGui.QLineEdit(self.tab_4)
self.lineEdit_2_tran.setGeometry(QtCore.QRect(380, 50, 141, 20))
self.lineEdit_2_tran.setObjectName(_fromUtf8("lineEdit_2_tran"))
self.lineEdit_1_tran = QtGui.QLineEdit(self.tab_4)
self.lineEdit_1_tran.setGeometry(QtCore.QRect(10, 50, 171, 20))
self.lineEdit_1_tran.setObjectName(_fromUtf8("lineEdit_1_tran"))
self.add_tran = QtGui.QPushButton(self.tab_4)
self.add_tran.setGeometry(QtCore.QRect(10, 10, 131, 23))
self.add_tran.setObjectName(_fromUtf8("add_tran"))
self.tabWidget.addTab(self.tab_4, _fromUtf8(""))
self.tab_5 = QtGui.QWidget()
self.tab_5.setObjectName(_fromUtf8("tab_5"))
self.searchbarcode_units = QtGui.QPushButton(self.tab_5)
self.searchbarcode_units.setGeometry(QtCore.QRect(200, 50, 91, 23))
self.searchbarcode_units.setObjectName(_fromUtf8("searchbarcode_units"))
self.searchdev_units = QtGui.QPushButton(self.tab_5)
self.searchdev_units.setGeometry(QtCore.QRect(530, 50, 101, 23))
self.searchdev_units.setObjectName(_fromUtf8("searchdev_units"))
self.tableWidget_cashier = QtGui.QTableWidget(self.tab_5)
self.tableWidget_cashier.setGeometry(QtCore.QRect(10, 90, 821, 201))
self.tableWidget_cashier.setObjectName(_fromUtf8("tableWidget_cashier"))
self.tableWidget_cashier.setColumnCount(0)
self.tableWidget_cashier.setRowCount(0)
self.viewall_units = QtGui.QPushButton(self.tab_5)
self.viewall_units.setGeometry(QtCore.QRect(760, 50, 75, 23))
self.viewall_units.setObjectName(_fromUtf8("viewall_units"))
self.lineEdit_2_units = QtGui.QLineEdit(self.tab_5)
self.lineEdit_2_units.setGeometry(QtCore.QRect(360, 50, 151, 20))
self.lineEdit_2_units.setObjectName(_fromUtf8("lineEdit_2_units"))
self.lineEdit_1_units = QtGui.QLineEdit(self.tab_5)
self.lineEdit_1_units.setGeometry(QtCore.QRect(10, 50, 171, 20))
self.lineEdit_1_units.setObjectName(_fromUtf8("lineEdit_1_units"))
self.tableWidget_pdu = QtGui.QTableWidget(self.tab_5)
self.tableWidget_pdu.setGeometry(QtCore.QRect(10, 320, 821, 201))
self.tableWidget_pdu.setObjectName(_fromUtf8("tableWidget_pdu"))
self.tableWidget_pdu.setColumnCount(0)
self.tableWidget_pdu.setRowCount(0)
self.newunit = QtGui.QPushButton(self.tab_5)
self.newunit.setGeometry(QtCore.QRect(10, 10, 141, 23))
self.newunit.setObjectName(_fromUtf8("newunit"))
self.removeunit = QtGui.QPushButton(self.tab_5)
self.removeunit.setGeometry(QtCore.QRect(690, 10, 141, 23))
self.removeunit.setObjectName(_fromUtf8("removeunit"))
self.updateunit = QtGui.QPushButton(self.tab_5)
self.updateunit.setGeometry(QtCore.QRect(190, 10, 141, 23))
self.updateunit.setObjectName(_fromUtf8("updateunit"))
self.tabWidget.addTab(self.tab_5, _fromUtf8(""))
self.tab_6 = QtGui.QWidget()
self.tab_6.setObjectName(_fromUtf8("tab_6"))
self.searchbarcode_promo = QtGui.QPushButton(self.tab_6)
self.searchbarcode_promo.setGeometry(QtCore.QRect(140, 50, 91, 23))
self.searchbarcode_promo.setObjectName(_fromUtf8("searchbarcode_promo"))
self.searchname_promo = QtGui.QPushButton(self.tab_6)
self.searchname_promo.setGeometry(QtCore.QRect(620, 50, 75, 23))
self.searchname_promo.setObjectName(_fromUtf8("searchname_promo"))
self.tableWidget_promo = QtGui.QTableWidget(self.tab_6)
self.tableWidget_promo.setGeometry(QtCore.QRect(10, 80, 821, 421))
self.tableWidget_promo.setObjectName(_fromUtf8("tableWidget_promo"))
self.tableWidget_promo.setColumnCount(0)
self.tableWidget_promo.setRowCount(0)
self.viewall_promo = QtGui.QPushButton(self.tab_6)
self.viewall_promo.setGeometry(QtCore.QRect(760, 50, 75, 23))
self.viewall_promo.setObjectName(_fromUtf8("viewall_promo"))
self.lineEdit_3_promo = QtGui.QLineEdit(self.tab_6)
self.lineEdit_3_promo.setGeometry(QtCore.QRect(500, 50, 111, 20))
self.lineEdit_3_promo.setObjectName(_fromUtf8("lineEdit_3_promo"))
self.lineEdit_1_promo = QtGui.QLineEdit(self.tab_6)
self.lineEdit_1_promo.setGeometry(QtCore.QRect(10, 50, 121, 20))
self.lineEdit_1_promo.setObjectName(_fromUtf8("lineEdit_1_promo"))
self.newpromo = QtGui.QPushButton(self.tab_6)
self.newpromo.setGeometry(QtCore.QRect(10, 10, 131, 23))
self.newpromo.setObjectName(_fromUtf8("newpromo"))
self.removepromo = QtGui.QPushButton(self.tab_6)
self.removepromo.setGeometry(QtCore.QRect(710, 10, 121, 23))
self.removepromo.setObjectName(_fromUtf8("removepromo"))
self.lineEdit_2_promo = QtGui.QLineEdit(self.tab_6)
self.lineEdit_2_promo.setGeometry(QtCore.QRect(260, 50, 111, 20))
self.lineEdit_2_promo.setObjectName(_fromUtf8("lineEdit_2_promo"))
self.searchpromo_promo = QtGui.QPushButton(self.tab_6)
self.searchpromo_promo.setGeometry(QtCore.QRect(380, 50, 91, 23))
self.searchpromo_promo.setObjectName(_fromUtf8("searchpromo_promo"))
self.tabWidget.addTab(self.tab_6, _fromUtf8(""))
self.horizontalLayout.addWidget(self.tabWidget)
self.verticalLayout = QtGui.QVBoxLayout()
self.verticalLayout.setSpacing(270)
self.verticalLayout.setContentsMargins(0, 100, 0, -1)
self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
self.gridLayout = QtGui.QGridLayout()
self.gridLayout.setVerticalSpacing(15)
self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
self.writeoff = QtGui.QPushButton(self.layoutWidget)
self.writeoff.setStyleSheet(_fromUtf8("QPushButton#writeoff {\n"
"background :rgb(197, 115, 255);\n"
"color: rgb(255, 255, 255)\n"
"}"))
self.writeoff.setObjectName(_fromUtf8("writeoff"))
self.gridLayout.addWidget(self.writeoff, 0, 0, 1, 1)
self.orderproducts = QtGui.QPushButton(self.layoutWidget)
self.orderproducts.setObjectName(_fromUtf8("orderproducts"))
self.gridLayout.addWidget(self.orderproducts, 1, 0, 1, 1)
self.sendsheets = QtGui.QPushButton(self.layoutWidget)
self.sendsheets.setObjectName(_fromUtf8("sendsheets"))
self.gridLayout.addWidget(self.sendsheets, 2, 0, 1, 1)
self.updatestock = QtGui.QPushButton(self.layoutWidget)
self.updatestock.setStyleSheet(_fromUtf8("background-image:/img/logo.png"))
self.updatestock.setObjectName(_fromUtf8("updatestock"))
self.gridLayout.addWidget(self.updatestock, 3, 0, 1, 1)
self.verticalLayout.addLayout(self.gridLayout)
self.logout = QtGui.QPushButton(self.layoutWidget)
self.logout.setObjectName(_fromUtf8("logout"))
self.verticalLayout.addWidget(self.logout)
self.horizontalLayout.addLayout(self.verticalLayout)
self.noTrans = QtGui.QLabel(self.centralwidget)
self.noTrans.setGeometry(QtCore.QRect(60, 20, 201, 16))
self.noTrans.setText(_fromUtf8(""))
self.noTrans.setObjectName(_fromUtf8("noTrans"))
self.moneyDay = QtGui.QLabel(self.centralwidget)
self.moneyDay.setGeometry(QtCore.QRect(340, 20, 211, 16))
self.moneyDay.setText(_fromUtf8(""))
self.moneyDay.setObjectName(_fromUtf8("moneyDay"))
self.noItems = QtGui.QLabel(self.centralwidget)
self.noItems.setGeometry(QtCore.QRect(590, 20, 201, 16))
self.noItems.setText(_fromUtf8(""))
self.noItems.setObjectName(_fromUtf8("noItems"))
MainWindow.setCentralWidget(self.centralwidget)
self.statusBar = QtGui.QStatusBar(MainWindow)
self.statusBar.setObjectName(_fromUtf8("statusBar"))
MainWindow.setStatusBar(self.statusBar)
self.toolBar = QtGui.QToolBar(MainWindow)
self.toolBar.setObjectName(_fromUtf8("toolBar"))
MainWindow.addToolBar(QtCore.Qt.TopToolBarArea, self.toolBar)
self.retranslateUi(MainWindow)
self.tabWidget.setCurrentIndex(0)
QtCore.QObject.connect(self.logout, QtCore.SIGNAL(_fromUtf8("clicked()")), MainWindow.close)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
MainWindow.setWindowTitle(_translate("MainWindow", "Shop", None))
self.tabWidget.setToolTip(_translate("MainWindow", "<html><head/><body><p>Products</p></body></html>", None))
self.searchbarcode_products.setText(_translate("MainWindow", "Filter Barcode", None))
self.searchname_products.setText(_translate("MainWindow", "Filter Name", None))
self.viewall_products.setText(_translate("MainWindow", "Refresh", None))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_2), _translate("MainWindow", "Products", None))
self.searchbarcode_perishable.setText(_translate("MainWindow", "Filter Barcode", None))
self.searchname_perishable.setText(_translate("MainWindow", "Filter Name", None))
self.viewall_perishable.setText(_translate("MainWindow", "Refresh", None))
self.add_perishable.setText(_translate("MainWindow", "Add New Product", None))
self.stock_perishable.setText(_translate("MainWindow", "Restock Product", None))
self.remove_perishable.setText(_translate("MainWindow", "Delete Product", None))
self.update_perishable.setText(_translate("MainWindow", "Update Product", None))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_3), _translate("MainWindow", "Perishable Products", None))
self.searchid_tran.setText(_translate("MainWindow", "Filter Transaction ID", None))
self.searchdate_tran.setText(_translate("MainWindow", "Filter Date", None))
self.viewall_tran.setText(_translate("MainWindow", "Refresh", None))
self.lineEdit_2_tran.setPlaceholderText(_translate("MainWindow", "yyyy-mm-dd", None))
self.add_tran.setText(_translate("MainWindow", "Perform A Transaction", None))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_4), _translate("MainWindow", "Transactions", None))
self.searchbarcode_units.setText(_translate("MainWindow", "Filter Barcode", None))
self.searchdev_units.setText(_translate("MainWindow", "Filter Device ID", None))
self.viewall_units.setText(_translate("MainWindow", "Refresh", None))
self.newunit.setText(_translate("MainWindow", "Add New Unit", None))
self.removeunit.setText(_translate("MainWindow", "Remove Existing Unit", None))
self.updateunit.setText(_translate("MainWindow", "Update Existing Unit", None))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_5), _translate("MainWindow", "Display Units", None))
self.searchbarcode_promo.setText(_translate("MainWindow", "Filter Barcode", None))
self.searchname_promo.setText(_translate("MainWindow", "Filter Name", None))
self.viewall_promo.setText(_translate("MainWindow", "Refresh", None))
self.newpromo.setText(_translate("MainWindow", "Create New Promotion", None))
self.removepromo.setText(_translate("MainWindow", "Delete Promotion", None))
self.searchpromo_promo.setText(_translate("MainWindow", "Filter Promo ID", None))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_6), _translate("MainWindow", "Promotions", None))
self.writeoff.setText(_translate("MainWindow", "Write Off", None))
self.orderproducts.setText(_translate("MainWindow", "Order new Products", None))
self.sendsheets.setText(_translate("MainWindow", "Send Balance Sheets", None))
self.updatestock.setText(_translate("MainWindow", "Sync With HQ", None))
self.logout.setText(_translate("MainWindow", "Log Out", None))
self.toolBar.setWindowTitle(_translate("MainWindow", "toolBar", None))