class Ui_Form(object): def menu(self): from menu import Ui_Menu self.window = QtWidgets.QDialog() self.ui = Ui_Menu() self.ui.setupM(self.window) self.window.show() def setupUi(self, Form): Form.setObjectName("Form") Form.resize(358, 180) Form.setMinimumSize(QtCore.QSize(358, 180)) Form.setMaximumSize(QtCore.QSize(358, 180)) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(":/images/logo.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) Form.setWindowIcon(icon) Form.setStyleSheet("background-color: rgb(105, 232, 165);") self.pushButton = QtWidgets.QPushButton(Form) self.pushButton.setGeometry(QtCore.QRect(150, 130, 61, 31)) self.pushButton.setStyleSheet("font: 8pt \"Verdana\";\n" "color:#dfdfdf;\n" "background:#009060;\n" "border-radius:10px\n" "}\n") self.pushButton.setObjectName("pushButton") self.label = QtWidgets.QLabel(Form) self.label.setGeometry(QtCore.QRect(75, 80, 281, 20)) self.label.setStyleSheet("font: 12pt \"Verdana\";") self.label.setObjectName("label") self.pushButton_2 = QtWidgets.QPushButton(Form) self.pushButton_2.setGeometry(QtCore.QRect(150, 10, 61, 61)) self.pushButton_2.setStyleSheet( "background-image: url(:/images/logo.png);\n" "border-image: url(:/images/logo.png);") self.pushButton_2.setObjectName("pushButton_2") self.pushButton.clicked.connect(Form.close) self.retranslateUi(Form) QtCore.QMetaObject.connectSlotsByName(Form) def retranslateUi(self, Form): _translate = QtCore.QCoreApplication.translate Form.setWindowTitle(_translate("Form", "Notification")) self.pushButton.setText(_translate("Form", "Exit")) self.label.setText(_translate("Form", "LoanStatus.txt is created"))
class Ui_BranchL(object): def menu(self): from menu import Ui_Menu self.window = QtWidgets.QDialog() self.ui = Ui_Menu() self.ui.setupM(self.window) self.window.show() def openWindow1(self): from branchLocOp1 import Ui_Window1 self.window = QtWidgets.QMainWindow() self.ui = Ui_Window1() self.ui.setupUi(self.window) self.window.show() def openWindow2(self): from branchLocOp2 import Ui_Window2 self.window2 = QtWidgets.QMainWindow() self.ui = Ui_Window2() self.ui.setupUi(self.window2) self.window2.show() def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(540, 360) MainWindow.setMinimumSize(QtCore.QSize(540, 360)) MainWindow.setMaximumSize(QtCore.QSize(540, 360)) MainWindow.setStyleSheet("*{\n" "font-family: Calibri Light;\n" "}\n" "QMainWindow{\n" "border-image:url(:/images/BG.jpg)\n" "}\n" "QCommandLinkButton{\n" "font-family: Calibri Light;\n" "font-size: 12px;\n" "}\n" "QCommandLinkButton:hover{\n" "background: #2E5984;\n" "border-radius: 10px;\n" "}\n" "QLabel{\n" "font-family: Calibri Light;\n" "font-size: 30px;\n" "}\n" "QToolButton{\n" "background: transparent\n" "}\n" "QToolButton:hover{\n" "background: #E0ECF8;\n" "border-radius: 7px;\n" "}\n" "QPushButton{\n" "color:#dfdfdf;\n" "background:#00264d;\n" "border-radius: 10px;\n" "}\n" "QPushButton:hover{\n" "background:#2E5984;\n" "border-radius: 10px;\n" "}\n" "QLineEdit{\n" "border-radius:10px;\n" "background: #dfdfdf;\n" "font-size:15px;\n" "}\n" "QLineEdit:hover{\n" "border-radius:10px;\n" "background: #ffffff;\n" "}\n" "Qlabel{\n" "color:#dfdfdf;\n" "background:transparent;\n" "}") self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.closeIcon = QtWidgets.QToolButton(self.centralwidget) self.closeIcon.setGeometry(QtCore.QRect(500, 10, 31, 31)) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(":/images/icons8-close-window-96.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.closeIcon.setIcon(icon) self.closeIcon.setIconSize(QtCore.QSize(50, 50)) self.closeIcon.setObjectName("closeIcon") self.displayText = QtWidgets.QLabel(self.centralwidget) self.displayText.setGeometry(QtCore.QRect(160, 130, 221, 31)) self.displayText.setAlignment(QtCore.Qt.AlignCenter) self.displayText.setWordWrap(False) self.displayText.setIndent(0) self.displayText.setObjectName("displayText") self.label = QtWidgets.QLabel(self.centralwidget) self.label.setGeometry(QtCore.QRect(130, 0, 281, 191)) self.label.setText("") self.label.setPixmap(QtGui.QPixmap(":/images/Logo.png")) self.label.setScaledContents(True) self.label.setAlignment(QtCore.Qt.AlignCenter) self.label.setWordWrap(False) self.label.setObjectName("label") self.commandLinkButton = QtWidgets.QCommandLinkButton( self.centralwidget) self.commandLinkButton.setGeometry(QtCore.QRect(10, 10, 145, 31)) self.commandLinkButton.setMouseTracking(True) self.commandLinkButton.setLayoutDirection(QtCore.Qt.LeftToRight) self.commandLinkButton.setAutoFillBackground(False) self.commandLinkButton.setStyleSheet("") self.commandLinkButton.setIconSize(QtCore.QSize(20, 10)) self.commandLinkButton.setDescription("") self.commandLinkButton.setObjectName("commandLinkButton") self.pushButton_2 = QtWidgets.QPushButton(self.centralwidget) self.pushButton_2.setGeometry(QtCore.QRect(130, 240, 291, 31)) self.pushButton_2.setMouseTracking(True) self.pushButton_2.setObjectName("pushButton_2") self.pushButton = QtWidgets.QPushButton(self.centralwidget) self.pushButton.setGeometry(QtCore.QRect(130, 190, 291, 31)) self.pushButton.setMouseTracking(True) self.pushButton.setObjectName("pushButton") self.label.raise_() self.closeIcon.raise_() self.displayText.raise_() self.commandLinkButton.raise_() self.pushButton_2.raise_() self.pushButton.raise_() MainWindow.setCentralWidget(self.centralwidget) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.retranslateUi(MainWindow) self.pushButton_2.clicked.connect(self.openWindow2) self.pushButton_2.clicked.connect(MainWindow.close) self.pushButton.clicked.connect(self.openWindow1) self.pushButton.clicked.connect(MainWindow.close) self.commandLinkButton.clicked.connect(self.menu) self.commandLinkButton.clicked.connect(MainWindow.close) self.closeIcon.clicked.connect(MainWindow.close) QtCore.QMetaObject.connectSlotsByName(MainWindow) def retranslateUi(self, MainWindow): _translate = QtCore.QCoreApplication.translate MainWindow.setWindowTitle(_translate("MainWindow", "Branch Locator")) self.closeIcon.setText(_translate("MainWindow", "...")) self.displayText.setText(_translate("MainWindow", "Branch Locator")) self.commandLinkButton.setText( _translate("MainWindow", "Back to Main Menu")) self.pushButton_2.setText( _translate("MainWindow", "Find all nearest branch locations")) self.pushButton.setText( _translate("MainWindow", "View all branch locations in the City of Manila"))
class Ui_Login(object): def regwin(self): from register import Ui_Register self.window = QtWidgets.QDialog() self.ui = Ui_Register() self.ui.setupR(self.window) self.window.show() def menu(self): from menu import Ui_Menu self.window = QtWidgets.QDialog() self.ui = Ui_Menu() self.ui.setupM(self.window) self.window.show() def log(self): a = self.log1.checkAccount(self.userfield1.text(), self.passfield1.text()) if (a == "correct"): self.Login.close() self.menu() elif (a == "incorrect"): self.statuscheck.setText("Password is incorrect") else: self.statuscheck.setText("User is not registered.") def _addShadowEffect(self, item): effect = QtWidgets.QGraphicsDropShadowEffect() effect.setBlurRadius(3) effect.setColor(QtGui.QColor("black")) effect.setOffset(0.5, 0.5) item.setGraphicsEffect(effect) def setupL(self, Login): self.log1 = lgn() clear() self.Login = Login Login.setWindowIcon(QtGui.QIcon(':/images/logo.png')) Login.setObjectName("Login") Login.resize(540, 360) Login.setMinimumSize(QtCore.QSize(540, 360)) Login.setMaximumSize(QtCore.QSize(540, 360)) Login.setStyleSheet("*{\n" "font-family: Verdana;\n" "}\n" "QDialog{\n" "border-image:url(:/images/bg1.png)\n" "}\n" "QToolButton{\n" "background: transparent\n" "}\n" "QPushButton{\n" "color:#dfdfdf;\n" "background:#009060;\n" "border-radius:10px\n" "}\n" "QFrame{\n" "background:rgba(50, 100, 42, 0.94);\n" "border-radius: 10px;\n" "}\n" "QLabel{\n" "color:#dfdfdf;\n" "background: transparent;\n" "}\n" "QLineEdit{\n" "border-radius:10px;\n" "background: #dfdfdf;\n" "}\n" "QPushButton:Hover{\n" "color:black;\n" "background:#dfdfdf;\n" "border-radius:10px\n" "}") self.frame = QtWidgets.QFrame(Login) self.frame.setGeometry(QtCore.QRect(30, 20, 271, 320)) self.frame.setFrameShape(QtWidgets.QFrame.StyledPanel) self.frame.setFrameShadow(QtWidgets.QFrame.Raised) self.frame.setObjectName("frame") self.label = QtWidgets.QLabel(self.frame) self.label.setGeometry(QtCore.QRect(40, 10, 191, 51)) font = QtGui.QFont() font.setFamily("Verdana") font.setPointSize(18) self.label.setFont(font) self.label.setAlignment(QtCore.Qt.AlignCenter) self.label.setObjectName("label") self.label_2 = QtWidgets.QLabel(self.frame) self.label_2.setGeometry(QtCore.QRect(35, 40, 200, 51)) font = QtGui.QFont() font.setFamily("Verdana") font.setPointSize(10) self.label_2.setFont(font) self.label_2.setAlignment(QtCore.Qt.AlignCenter) self.label_2.setObjectName("label_2") self.loginbutton1 = QtWidgets.QPushButton(self.frame) self.loginbutton1.setGeometry(QtCore.QRect(20, 220, 231, 31)) font = QtGui.QFont() font.setFamily("Verdana") font.setPointSize(13) self.loginbutton1.setFont(font) self.loginbutton1.setObjectName("loginbutton1") self.userfield1 = QtWidgets.QLineEdit(self.frame) self.userfield1.setGeometry(QtCore.QRect(30, 110, 211, 31)) font = QtGui.QFont() font.setFamily("Verdana") font.setPointSize(12) self.userfield1.setFont(font) self.userfield1.setObjectName("userfield1") self.passfield1 = QtWidgets.QLineEdit(self.frame) self.passfield1.setGeometry(QtCore.QRect(30, 170, 211, 31)) font = QtGui.QFont() font.setFamily("Verdana") font.setPointSize(12) self.passfield1.setFont(font) self.passfield1.setEchoMode(QtWidgets.QLineEdit.Password) self.passfield1.setObjectName("passfield1") self.label_3 = QtWidgets.QLabel(self.frame) self.label_3.setGeometry(QtCore.QRect(-30, 70, 191, 51)) font = QtGui.QFont() font.setFamily("Verdana") font.setPointSize(10) self.label_3.setFont(font) self.label_3.setAlignment(QtCore.Qt.AlignCenter) self.label_3.setObjectName("label_3") self.label_4 = QtWidgets.QLabel(self.frame) self.label_4.setGeometry(QtCore.QRect(-30, 130, 191, 51)) font = QtGui.QFont() font.setFamily("Verdana") font.setPointSize(10) self.label_4.setFont(font) self.label_4.setAlignment(QtCore.Qt.AlignCenter) self.label_4.setObjectName("label_4") self.statuscheck = QtWidgets.QLabel(self.frame) self.statuscheck.setGeometry(QtCore.QRect(30, 260, 211, 75)) font = QtGui.QFont() font.setFamily("Verdana") font.setPointSize(9) self.statuscheck.setFont(font) self.statuscheck.setText("") self.statuscheck.setAlignment(QtCore.Qt.AlignCenter) self.statuscheck.setObjectName("statuscheck") self.toolButton_2 = QtWidgets.QToolButton(Login) self.toolButton_2.setGeometry(QtCore.QRect(300, 70, 241, 201)) icon1 = QtGui.QIcon() icon1.addPixmap(QtGui.QPixmap(":/images/logo.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.toolButton_2.setIcon(icon1) self.toolButton_2.setIconSize(QtCore.QSize(900, 900)) self.toolButton_2.setObjectName("toolButton_2") self.label_5 = QtWidgets.QLabel(Login) self.label_5.setGeometry(QtCore.QRect(345, 300, 150, 21)) self._addShadowEffect(self.label_5) font = QtGui.QFont() font.setFamily("Verdana") font.setPointSize(10) self.label_5.setFont(font) self.label_5.setAlignment(QtCore.Qt.AlignLeading | QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter) self.label_5.setObjectName("label_5") self.regbutton = QtWidgets.QPushButton(Login) self.regbutton.setGeometry(QtCore.QRect(375, 320, 91, 21)) font = QtGui.QFont() font.setFamily("Verdana") font.setPointSize(9) self.regbutton.setFont(font) self.regbutton.setObjectName("regbutton") self.retranslateUi(Login) self.loginbutton1.clicked.connect(self.log) self.regbutton.clicked.connect(self.regwin) self.regbutton.clicked.connect(Login.close) QtCore.QMetaObject.connectSlotsByName(Login) def retranslateUi(self, Login): _translate = QtCore.QCoreApplication.translate Login.setWindowTitle(_translate("Login", "Login")) self.label.setText(_translate("Login", "Loan Prediction")) self.label_2.setText( _translate("Login", "Please log in to your account")) self.loginbutton1.setText(_translate("Login", "Log in")) self.userfield1.setPlaceholderText(_translate("Login", " Username")) self.passfield1.setPlaceholderText(_translate("Login", " *****")) self.label_3.setText(_translate("Login", "Username :"******"Login", "Password :"******"Login", "...")) self.label_5.setText(_translate("Login", "Don\'t have an account?")) self.regbutton.setText(_translate("Login", "Sign-up here"))
class Ui_Chatbot(object): def menu(self): from menu import Ui_Menu self.window=QtWidgets.QDialog() self.ui=Ui_Menu() self.ui.setupM(self.window) self.window.show() self.MainWindow.close() def Bot(self): if (self.lineEdit.text()==""): pass else: self.listWidget.addItem("You: " + self.lineEdit.text()+"\n") #chat ng tao self.listWidget.addItem("Chatbot: " + self.bot.chat(self.lineEdit.text())+"\n")#para sagot ni bot self.lineEdit.clear() #para maclear self.listWidget.scrollToBottom() def setupUi(self, MainWindow): from Chatbot import botChat self.bot=botChat() self.MainWindow=MainWindow MainWindow.setObjectName("MainWindow") MainWindow.resize(540, 360) MainWindow.setMinimumSize(QtCore.QSize(540, 360)) MainWindow.setMaximumSize(QtCore.QSize(540, 360)) font = QtGui.QFont() font.setFamily("Calibri Light") font.setPointSize(8) font.setBold(False) font.setItalic(False) font.setWeight(3) MainWindow.setFont(font) MainWindow.setStyleSheet("*{\n" "font: 25 8pt \"Calibri Light\";\n" "}\n" "QMainWindow{\n" "border-image:url(:/images/BG.jpg)\n" "}\n" "QToolButton{\n" "background: transparent\n" "}\n" "QPushButton{\n" "color:#dfdfdf;\n" "background:#00264d;\n" "border-radius:20px\n" "}") self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.toolButton = QtWidgets.QToolButton(self.centralwidget) self.toolButton.setGeometry(QtCore.QRect(500, 10, 31, 31)) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(":/images/icons8-close-window-96.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.toolButton.setIcon(icon) self.toolButton.setIconSize(QtCore.QSize(50, 50)) self.toolButton.setObjectName("toolButton") self.lineEdit = QtWidgets.QLineEdit(self.centralwidget) self.lineEdit.setGeometry(QtCore.QRect(40, 300, 371, 31)) self.lineEdit.setStyleSheet("background-color: rgb(223, 223, 223);\n" "font: 25 8pt \"Calibri Light\";") self.lineEdit.setObjectName("lineEdit") self.toolButton_2 = QtWidgets.QToolButton(self.centralwidget) self.toolButton_2.setGeometry(QtCore.QRect(400, 280, 111, 71)) font = QtGui.QFont() font.setFamily("Calibri Light") font.setPointSize(12) font.setBold(False) font.setItalic(False) font.setWeight(3) self.toolButton_2.setFont(font) self.toolButton_2.setStyleSheet("image: url(:/images/button.png);\n" "font: 25 12pt \"Calibri Light\";\n" "color: rgb(255, 255, 255);") self.toolButton_2.setObjectName("toolButton_2") self.commandLinkButton = QtWidgets.QCommandLinkButton(self.centralwidget) self.commandLinkButton.setGeometry(QtCore.QRect(40, 10, 161, 41)) self.commandLinkButton.setMinimumSize(QtCore.QSize(71, 41)) font = QtGui.QFont() font.setFamily("Calibri Light") font.setPointSize(9) font.setBold(False) font.setItalic(False) font.setWeight(3) self.commandLinkButton.setFont(font) self.commandLinkButton.setStyleSheet("font: 25 9pt \"Calibri Light\";") self.commandLinkButton.setIconSize(QtCore.QSize(20, 20)) self.commandLinkButton.setObjectName("commandLinkButton") self.listWidget = QtWidgets.QListWidget(self.centralwidget) self.listWidget.setGeometry(QtCore.QRect(40, 60, 461, 231)) self.listWidget.setStyleSheet("background: transparent;\n" "font: 25 9pt \"Calibri Light\";\n" "alternate-background-color: rgb(223, 223, 223);") self.listWidget.setAutoScrollMargin(5) self.listWidget.setObjectName("listWidget") self.listWidget.setSizeAdjustPolicy(QtWidgets.QAbstractScrollArea.AdjustToContents) self.listWidget.setAutoScroll(True) self.listWidget.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff) self.listWidget.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff) self.listWidget.setAlternatingRowColors(True) self.listWidget.setWordWrap(True) self.label = QtWidgets.QLabel(self.centralwidget) self.label.setGeometry(QtCore.QRect(120, 80, 321, 201)) self.label.setStyleSheet("image: url(:/images/Logoo.png);") self.label.setText("") self.label.setObjectName("label") self.label_2 = QtWidgets.QLabel(self.centralwidget) self.label_2.setGeometry(QtCore.QRect(300, -30, 201, 121)) self.label_2.setStyleSheet("image: url(:/images/Logo.png);") self.label_2.setText("") self.label_2.setObjectName("label_2") self.label_2.raise_() self.listWidget.raise_() self.label.raise_() self.toolButton.raise_() self.lineEdit.raise_() self.toolButton_2.raise_() self.commandLinkButton.raise_() MainWindow.setCentralWidget(self.centralwidget) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.retranslateUi(MainWindow) self.toolButton_2.clicked.connect(self.Bot) self.commandLinkButton.clicked.connect(self.menu) self.lineEdit.returnPressed.connect(self.Bot) self.toolButton.clicked.connect(MainWindow.close) QtCore.QMetaObject.connectSlotsByName(MainWindow) def retranslateUi(self, MainWindow): _translate = QtCore.QCoreApplication.translate MainWindow.setWindowTitle(_translate("MainWindow", "BankO\'Matic")) self.toolButton.setText(_translate("MainWindow", "...")) self.lineEdit.setPlaceholderText(_translate("MainWindow", "Enter your message")) self.toolButton_2.setText(_translate("MainWindow", "Send")) self.commandLinkButton.setText(_translate("MainWindow", "Back to Main Menu"))