-
Notifications
You must be signed in to change notification settings - Fork 0
/
product.py
125 lines (102 loc) · 4.9 KB
/
product.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
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'C:\Users\Dnyanu\PycharmProjects\details\product.ui'
#
# Created by: PyQt5 UI code generator 5.15.2
#
# 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
from PyQt5.QtWidgets import QApplication, QMainWindow, QLabel
from add import *
from update import *
from delete import *
from table import *
# from PyQt5.QtGui import *
class Ui_abc(QMainWindow):
def view(self):
self.Dialog = QtWidgets.QDialog()
self.ui = viewdata()
self.ui.setupUi(self.Dialog)
self.ui.viewdata()
self.Dialog.show()
def add(self):
self.window = QtWidgets.QMainWindow()
self.ui = Ui_MainWindow()
self.ui.setupUi(self.window)
MainWindow.hide()
self.window.show()
def update(self):
self.window = QtWidgets.QMainWindow()
self.ui = Ui_update()
self.ui.setupUi(self.window)
MainWindow.hide()
self.window.show()
def delete(self):
self.window = QtWidgets.QMainWindow()
self.ui = Ui_delete()
self.ui.setupUi(self.window)
MainWindow.hide()
self.window.show()
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(800, 600)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.frame = QtWidgets.QFrame(self.centralwidget)
self.frame.setGeometry(QtCore.QRect(250, 40, 231, 301))
self.frame.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor))
self.frame.setFrameShape(QtWidgets.QFrame.StyledPanel)
self.frame.setFrameShadow(QtWidgets.QFrame.Sunken)
self.frame.setObjectName("frame")
self.label = QtWidgets.QLabel(self.frame)
self.label.setGeometry(QtCore.QRect(30, 20, 151, 41))
self.label.setFrameShape(QtWidgets.QFrame.WinPanel)
self.label.setObjectName("label")
self.pushButton = QtWidgets.QPushButton(self.frame)
self.pushButton.setGeometry(QtCore.QRect(60, 90, 93, 28))
self.pushButton.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
self.pushButton.setAutoDefault(False)
self.pushButton.setObjectName("pushButton")
self.pushButton_2 = QtWidgets.QPushButton(self.frame)
self.pushButton_2.setGeometry(QtCore.QRect(60, 140, 93, 28))
self.pushButton_2.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
self.pushButton_2.setObjectName("pushButton_2")
self.pushButton_3 = QtWidgets.QPushButton(self.frame)
self.pushButton_3.setGeometry(QtCore.QRect(60, 190, 93, 28))
self.pushButton_3.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
self.pushButton_3.setObjectName("pushButton_3")
self.pushButton_4 = QtWidgets.QPushButton(self.frame)
self.pushButton_4.setGeometry(QtCore.QRect(60, 240, 93, 28))
self.pushButton_4.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
self.pushButton_4.setObjectName("pushButton_4")
MainWindow.setCentralWidget(self.centralwidget)
self.menubar = QtWidgets.QMenuBar(MainWindow)
self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 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)
self.pushButton.clicked.connect(self.add)
self.pushButton_2.clicked.connect(self.update)
self.pushButton_3.clicked.connect(self.delete)
self.pushButton_4.clicked.connect(self.view)
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "HOME"))
self.setStyleSheet("background-color:red;")
self.label.setText(_translate("MainWindow", "<html><head/><body><p align=\"center\"><span style=\" font-size:18pt; font-weight:600; text-decoration: underline;\">Products</span></p></body></html>"))
self.pushButton.setText(_translate("MainWindow", "ADD"))
self.pushButton_2.setText(_translate("MainWindow", "UPDATE"))
self.pushButton_3.setText(_translate("MainWindow", "DELETE"))
self.pushButton_4.setText(_translate("MainWindow", "VIEW DATA"))
if __name__ == "__main__":
import sys
app = QtWidgets.QApplication(sys.argv)
MainWindow = QtWidgets.QMainWindow()
ui = Ui_abc()
ui.setupUi(MainWindow)
MainWindow.show()
sys.exit(app.exec_())