-
Notifications
You must be signed in to change notification settings - Fork 0
/
customer.py
141 lines (133 loc) · 6.91 KB
/
customer.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
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'customer.ui'
#
# Created by: PyQt5 UI code generator 5.10.1
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_NewCustomer(object):
def setupUi(self, NewCustomer):
NewCustomer.setObjectName("NewCustomer")
NewCustomer.resize(544, 490)
NewCustomer.setStyleSheet("border:11px solid rgb(0, 85, 127);")
self.groupSupplier = QtWidgets.QGroupBox(NewCustomer)
self.groupSupplier.setGeometry(QtCore.QRect(10, 40, 601, 461))
self.groupSupplier.setStyleSheet("border:1px solid #ccc;")
self.groupSupplier.setTitle("")
self.groupSupplier.setObjectName("groupSupplier")
self.label = QtWidgets.QLabel(self.groupSupplier)
self.label.setGeometry(QtCore.QRect(20, 20, 51, 17))
self.label.setStyleSheet("border:0;")
self.label.setObjectName("label")
self.customerName = QtWidgets.QLineEdit(self.groupSupplier)
self.customerName.setGeometry(QtCore.QRect(70, 16, 181, 27))
self.customerName.setObjectName("customerName")
self.label_2 = QtWidgets.QLabel(self.groupSupplier)
self.label_2.setGeometry(QtCore.QRect(260, 20, 51, 17))
self.label_2.setStyleSheet("border:0;")
self.label_2.setObjectName("label_2")
self.phone = QtWidgets.QLineEdit(self.groupSupplier)
self.phone.setGeometry(QtCore.QRect(320, 16, 181, 28))
self.phone.setObjectName("phone")
self.label_3 = QtWidgets.QLabel(self.groupSupplier)
self.label_3.setGeometry(QtCore.QRect(20, 74, 41, 17))
self.label_3.setStyleSheet("border:0;")
self.label_3.setObjectName("label_3")
self.city = QtWidgets.QLineEdit(self.groupSupplier)
self.city.setGeometry(QtCore.QRect(60, 70, 181, 27))
self.city.setObjectName("city")
self.label_4 = QtWidgets.QLabel(self.groupSupplier)
self.label_4.setGeometry(QtCore.QRect(250, 74, 51, 17))
self.label_4.setStyleSheet("border:0;")
self.label_4.setObjectName("label_4")
self.region = QtWidgets.QLineEdit(self.groupSupplier)
self.region.setGeometry(QtCore.QRect(310, 70, 191, 27))
self.region.setObjectName("region")
self.label_5 = QtWidgets.QLabel(self.groupSupplier)
self.label_5.setGeometry(QtCore.QRect(20, 136, 61, 17))
self.label_5.setStyleSheet("border:0;")
self.label_5.setObjectName("label_5")
self.gender = QtWidgets.QComboBox(self.groupSupplier)
self.gender.setGeometry(QtCore.QRect(80, 130, 171, 27))
self.gender.setObjectName("gender")
self.gender.addItem("")
self.gender.addItem("")
self.label_6 = QtWidgets.QLabel(self.groupSupplier)
self.label_6.setGeometry(QtCore.QRect(20, 239, 67, 17))
self.label_6.setStyleSheet("border:0;")
self.label_6.setObjectName("label_6")
self.email = QtWidgets.QLineEdit(self.groupSupplier)
self.email.setGeometry(QtCore.QRect(320, 130, 181, 27))
self.email.setInputMethodHints(QtCore.Qt.ImhEmailCharactersOnly)
self.email.setObjectName("email")
self.postalAddress = QtWidgets.QLineEdit(self.groupSupplier)
self.postalAddress.setGeometry(QtCore.QRect(130, 190, 371, 27))
self.postalAddress.setObjectName("postalAddress")
self.address = QtWidgets.QTextEdit(self.groupSupplier)
self.address.setGeometry(QtCore.QRect(20, 260, 211, 71))
self.address.setObjectName("address")
self.label_7 = QtWidgets.QLabel(self.groupSupplier)
self.label_7.setGeometry(QtCore.QRect(20, 194, 111, 17))
self.label_7.setStyleSheet("border:0;")
self.label_7.setObjectName("label_7")
self.label_11 = QtWidgets.QLabel(self.groupSupplier)
self.label_11.setGeometry(QtCore.QRect(240, 240, 231, 17))
self.label_11.setStyleSheet("border:0;")
self.label_11.setObjectName("label_11")
self.remarks = QtWidgets.QTextEdit(self.groupSupplier)
self.remarks.setGeometry(QtCore.QRect(240, 260, 261, 75))
self.remarks.setObjectName("remarks")
self.btnGroup = QtWidgets.QGroupBox(self.groupSupplier)
self.btnGroup.setGeometry(QtCore.QRect(20, 360, 481, 51))
self.btnGroup.setStyleSheet("border:1px solid #ccc; border-radius:2px;")
self.btnGroup.setTitle("")
self.btnGroup.setObjectName("btnGroup")
self.btnSave = QtWidgets.QPushButton(self.btnGroup)
self.btnSave.setGeometry(QtCore.QRect(320, 10, 81, 31))
self.btnSave.setObjectName("btnSave")
self.btnClose = QtWidgets.QPushButton(self.btnGroup)
self.btnClose.setGeometry(QtCore.QRect(70, 10, 81, 31))
self.btnClose.setObjectName("btnClose")
self.label_9 = QtWidgets.QLabel(self.groupSupplier)
self.label_9.setGeometry(QtCore.QRect(270, 135, 41, 17))
self.label_9.setStyleSheet("border:0;")
self.label_9.setObjectName("label_9")
self.label_12 = QtWidgets.QLabel(NewCustomer)
self.label_12.setGeometry(QtCore.QRect(10, 0, 601, 41))
font = QtGui.QFont()
font.setPointSize(16)
font.setBold(True)
font.setWeight(75)
self.label_12.setFont(font)
self.label_12.setStyleSheet("background-color: rgb(0, 85, 127);\n"
"color: rgb(255, 255, 255);")
self.label_12.setAlignment(QtCore.Qt.AlignCenter)
self.label_12.setObjectName("label_12")
self.retranslateUi(NewCustomer)
self.btnClose.clicked.connect(NewCustomer.accept)
QtCore.QMetaObject.connectSlotsByName(NewCustomer)
def retranslateUi(self, NewCustomer):
_translate = QtCore.QCoreApplication.translate
NewCustomer.setWindowTitle(_translate("NewCustomer", "New customer"))
self.label.setText(_translate("NewCustomer", "Name:"))
self.label_2.setText(_translate("NewCustomer", "Phone:"))
self.label_3.setText(_translate("NewCustomer", "City:"))
self.label_4.setText(_translate("NewCustomer", "Region:"))
self.label_5.setText(_translate("NewCustomer", "Gender:"))
self.label_6.setText(_translate("NewCustomer", "Address:"))
self.label_7.setText(_translate("NewCustomer", "Postal Address:"))
self.label_11.setText(_translate("NewCustomer", "Your remarks:"))
self.gender.setItemText(0, _translate("NewCustomer", "Male"))
self.gender.setItemText(1, _translate("NewCustomer", "Female"))
self.btnSave.setText(_translate("NewCustomer", "Save"))
self.btnClose.setText(_translate("NewCustomer", "Close"))
self.label_9.setText(_translate("NewCustomer", "Email:"))
self.label_12.setText(_translate("NewCustomer", "New Customer Information"))
if __name__ == "__main__":
import sys
app = QtWidgets.QApplication(sys.argv)
NewCustomer = QtWidgets.QDialog()
ui = Ui_NewCustomer()
ui.setupUi(NewCustomer)
NewCustomer.show()
sys.exit(app.exec_())