2021 INF2611 A_4
BY CRYSTAL INDIGO
Whatsapp: +27766268187
QUESTION1
#login.py
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'login.ui'
#
# Created by: PyQt5 UI code generator 5.14.1
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Dialog(object):
def setupUi(self, Dialog):
Dialog.setObjectName("Dialog")
Dialog.resize(422, 258)
self.label = QtWidgets.QLabel(Dialog)
self.label.setGeometry(QtCore.QRect(40, 90, 81, 21))
self.label.setObjectName("label")
self.lineEdit = QtWidgets.QLineEdit(Dialog)
self.lineEdit.setGeometry(QtCore.QRect(140, 90, 181, 20))
self.lineEdit.setObjectName("lineEdit")
self.label_2 = QtWidgets.QLabel(Dialog)
self.label_2.setGeometry(QtCore.QRect(40, 140, 91, 16))
self.label_2.setObjectName("label_2")
self.lineEdit_2 = QtWidgets.QLineEdit(Dialog)
self.lineEdit_2.setGeometry(QtCore.QRect(140, 140, 181, 20))
self.lineEdit_2.setInputMask("")
self.lineEdit_2.setEchoMode(QtWidgets.QLineEdit.Password)
self.lineEdit_2.setObjectName("lineEdit_2")
self.pushButtonLogin = QtWidgets.QPushButton(Dialog)
self.pushButtonLogin.setGeometry(QtCore.QRect(250, 180, 75, 23))
self.pushButtonLogin.setObjectName("pushButtonLogin")
self.message = QtWidgets.QLabel(Dialog)
self.message.setGeometry(QtCore.QRect(40, 210, 301, 31))
self.message.setText("")
self.message.setObjectName("message")
self.label_3 = QtWidgets.QLabel(Dialog)
self.label_3.setGeometry(QtCore.QRect(90, 0, 131, 31))
font = QtGui.QFont()
font.setFamily("Arial Unicode MS")
font.setPointSize(14)
font.setBold(True)
font.setWeight(75)
self.label_3.setFont(font)
self.label_3.setObjectName("label_3")
self.label_4 = QtWidgets.QLabel(Dialog)
self.label_4.setGeometry(QtCore.QRect(20, 40, 401, 31))
self.label_4.setObjectName("label_4")
self.retranslateUi(Dialog)
, QtCore.QMetaObject.connectSlotsByName(Dialog)
def retranslateUi(self, Dialog):
_translate = QtCore.QCoreApplication.translate
Dialog.setWindowTitle(_translate("Dialog", "LOGIN "))
self.label.setText(_translate("Dialog", "User Name"))
self.label_2.setText(_translate("Dialog", "Password"))
self.pushButtonLogin.setText(_translate("Dialog", "Login"))
self.label_3.setText(_translate("Dialog", "WELCOME "))
self.label_4.setText(_translate("Dialog", "TO ACCESS THE DATA ENTER USERNAME & PASSWORD"))
if __name__ == "__main__":
import sys
app = QtWidgets.QApplication(sys.argv)
Dialog = QtWidgets.QDialog()
ui = Ui_Dialog()
ui.setupUi(Dialog)
Dialog.show()
sys.exit(app.exec_())
,#ass4.pyw
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'ass4.ui'
#
# Created by: PyQt5 UI code generator 5.14.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(1089, 593)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.gridLayout = QtWidgets.QGridLayout(self.centralwidget)
self.gridLayout.setObjectName("gridLayout")
self.mdiArea = QtWidgets.QMdiArea(self.centralwidget)
self.mdiArea.setBaseSize(QtCore.QSize(99, 100))
self.mdiArea.setObjectName("mdiArea")
self.bookings = QtWidgets.QWidget()
self.bookings.setObjectName("bookings")
self.gridLayout_2 = QtWidgets.QGridLayout(self.bookings)
self.gridLayout_2.setObjectName("gridLayout_2")
self.label_5 = QtWidgets.QLabel(self.bookings)
self.label_5.setObjectName("label_5")
self.gridLayout_2.addWidget(self.label_5, 0, 0, 1, 1)
self.Findname = QtWidgets.QLineEdit(self.bookings)
self.Findname.setObjectName("Findname")
self.gridLayout_2.addWidget(self.Findname, 0, 1, 1, 1)
self.FilterButton = QtWidgets.QPushButton(self.bookings)
self.FilterButton.setObjectName("FilterButton")
self.gridLayout_2.addWidget(self.FilterButton, 0, 2, 1, 1)
self.tableView_2 = QtWidgets.QTableView(self.bookings)
self.tableView_2.setObjectName("tableView_2")
self.gridLayout_2.addWidget(self.tableView_2, 1, 0, 1, 2)
self.venue = QtWidgets.QWidget()
self.venue.setObjectName("venue")
self.gridLayout_3 = QtWidgets.QGridLayout(self.venue)
self.gridLayout_3.setObjectName("gridLayout_3")
self.tableView = QtWidgets.QTableView(self.venue)
self.tableView.setObjectName("tableView")
self.gridLayout_3.addWidget(self.tableView, 0, 0, 1, 2)
self.event = QtWidgets.QWidget()
self.event.setObjectName("event")
self.lineName = QtWidgets.QLineEdit(self.event)
self.lineName.setGeometry(QtCore.QRect(160, 190, 142, 25))
self.lineName.setObjectName("lineName")
self.label = QtWidgets.QLabel(self.event)
self.label.setGeometry(QtCore.QRect(0, 190, 121, 20))
self.label.setObjectName("label")
self.label_3 = QtWidgets.QLabel(self.event)
self.label_3.setGeometry(QtCore.QRect(0, 340, 121, 17))
self.label_3.setObjectName("label_3")
self.lineContact = QtWidgets.QLineEdit(self.event)
, self.lineContact.setGeometry(QtCore.QRect(160, 340, 142, 25))
self.lineContact.setObjectName("lineContact")
self.pushRoadShow = QtWidgets.QPushButton(self.event)
self.pushRoadShow.setGeometry(QtCore.QRect(10, 460, 181, 25))
self.pushRoadShow.setObjectName("pushRoadShow")
self.pushConcert = QtWidgets.QPushButton(self.event)
self.pushConcert.setGeometry(QtCore.QRect(260, 460, 161, 25))
self.pushConcert.setObjectName("pushConcert")
self.label_2 = QtWidgets.QLabel(self.event)
self.label_2.setGeometry(QtCore.QRect(0, 270, 121, 20))
self.label_2.setObjectName("label_2")
self.lineSurname = QtWidgets.QLineEdit(self.event)
self.lineSurname.setGeometry(QtCore.QRect(160, 270, 142, 25))
self.lineSurname.setObjectName("lineSurname")
self.label_4 = QtWidgets.QLabel(self.event)
self.label_4.setGeometry(QtCore.QRect(0, 10, 441, 161))
self.label_4.setObjectName("label_4")
self.labelResult = QtWidgets.QLabel(self.event)
self.labelResult.setGeometry(QtCore.QRect(20, 400, 231, 20))
self.labelResult.setText("")
self.labelResult.setObjectName("labelResult")
self.gridLayout.addWidget(self.mdiArea, 0, 0, 1, 1)
MainWindow.setCentralWidget(self.centralwidget)
self.menubar = QtWidgets.QMenuBar(MainWindow)
self.menubar.setGeometry(QtCore.QRect(0, 0, 1089, 22))
self.menubar.setObjectName("menubar")
self.menuFiles = QtWidgets.QMenu(self.menubar)
self.menuFiles.setObjectName("menuFiles")
self.menuShow_bookings = QtWidgets.QMenu(self.menuFiles)
self.menuShow_bookings.setObjectName("menuShow_bookings")
self.menuData_maintenance = QtWidgets.QMenu(self.menubar)
self.menuData_maintenance.setObjectName("menuData_maintenance")
self.menuReport = QtWidgets.QMenu(self.menubar)
self.menuReport.setObjectName("menuReport")
self.menuAbout = QtWidgets.QMenu(self.menubar)
self.menuAbout.setObjectName("menuAbout")
MainWindow.setMenuBar(self.menubar)
self.statusbar = QtWidgets.QStatusBar(MainWindow)
self.statusbar.setObjectName("statusbar")
MainWindow.setStatusBar(self.statusbar)
self.actionSubWindow_View = QtWidgets.QAction(MainWindow)
self.actionSubWindow_View.setObjectName("actionSubWindow_View")
self.actionTabbed_View = QtWidgets.QAction(MainWindow)
self.actionTabbed_View.setObjectName("actionTabbed_View")
self.actionCascade_View = QtWidgets.QAction(MainWindow)
self.actionCascade_View.setObjectName("actionCascade_View")
self.actionTile_View = QtWidgets.QAction(MainWindow)
self.actionTile_View.setObjectName("actionTile_View")
self.actionopen = QtWidgets.QAction(MainWindow)
self.actionopen.setObjectName("actionopen")
self.actionclose = QtWidgets.QAction(MainWindow)
self.actionclose.setObjectName("actionclose")
self.actionopen_2 = QtWidgets.QAction(MainWindow)
self.actionopen_2.setObjectName("actionopen_2")
self.actionRoadShow = QtWidgets.QAction(MainWindow)
self.actionRoadShow.setObjectName("actionRoadShow")
self.actionConcert = QtWidgets.QAction(MainWindow)
self.actionConcert.setObjectName("actionConcert")
self.actionAdd_New = QtWidgets.QAction(MainWindow)
self.actionAdd_New.setObjectName("actionAdd_New")
self.actionEdit = QtWidgets.QAction(MainWindow)
self.actionEdit.setObjectName("actionEdit")
self.actionDelete = QtWidgets.QAction(MainWindow)