# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file 'main_UI.ui'
#
# Created by: PyQt5 UI code generator 5.15.1
#
# 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

import recognition

class Ui_MainWindow(object):
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(471, 248)
        MainWindow.setWhatsThis("")
        MainWindow.setAutoFillBackground(False)
        MainWindow.setStyleSheet("background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:1 rgba(185, 185, 185, 255));")
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.btn_recognize = QtWidgets.QPushButton(self.centralwidget)
        self.btn_recognize.setGeometry(QtCore.QRect(20, 20, 121, 51))
        font = QtGui.QFont()
        font.setPointSize(13)
        font.setBold(True)
        font.setWeight(75)
        self.btn_recognize.setFont(font)
        self.btn_recognize.setStyleSheet("background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:1 rgba(70, 223, 223, 255));\n"
"")
        self.btn_recognize.setAutoRepeat(False)
        self.btn_recognize.setAutoDefault(False)
        self.btn_recognize.setDefault(False)
        self.btn_recognize.setFlat(False)
        self.btn_recognize.setObjectName("btn_recognize")
        self.btn_recognize.clicked.connect(self.btnstate)
        self.pb_happy = QtWidgets.QProgressBar(self.centralwidget)
        self.pb_happy.setGeometry(QtCore.QRect(290, 20, 151, 23))
        self.pb_happy.setProperty("value", 0)
        self.pb_happy.setObjectName("pb_happy")
        self.pb_sad = QtWidgets.QProgressBar(self.centralwidget)
        self.pb_sad.setGeometry(QtCore.QRect(290, 60, 151, 23))
        self.pb_sad.setProperty("value", 0)
        self.pb_sad.setObjectName("pb_sad")
        self.pb_angry = QtWidgets.QProgressBar(self.centralwidget)
        self.pb_angry.setGeometry(QtCore.QRect(290, 100, 151, 23))
        self.pb_angry.setProperty("value", 0)
        self.pb_angry.setObjectName("pb_angry")
        self.pb_surprise = QtWidgets.QProgressBar(self.centralwidget)
        self.pb_surprise.setGeometry(QtCore.QRect(290, 140, 151, 23))
        self.pb_surprise.setProperty("value", 0)
        self.pb_surprise.setObjectName("pb_surprise")
        self.pb_neutral = QtWidgets.QProgressBar(self.centralwidget)
        self.pb_neutral.setGeometry(QtCore.QRect(290, 180, 151, 23))
        self.pb_neutral.setProperty("value", 0)
        self.pb_neutral.setObjectName("pb_neutral")
        self.lbl_Happy = QtWidgets.QLabel(self.centralwidget)
        self.lbl_Happy.setGeometry(QtCore.QRect(190, 10, 55, 31))
        font = QtGui.QFont()
        font.setPointSize(11)
        font.setBold(True)
        font.setWeight(75)
        self.lbl_Happy.setFont(font)
        self.lbl_Happy.setStyleSheet("")
        self.lbl_Happy.setObjectName("lbl_Happy")
        self.lbl_Sad = QtWidgets.QLabel(self.centralwidget)
        self.lbl_Sad.setGeometry(QtCore.QRect(190, 60, 55, 16))
        font = QtGui.QFont()
        font.setPointSize(11)
        font.setBold(True)
        font.setWeight(75)
        self.lbl_Sad.setFont(font)
        self.lbl_Sad.setObjectName("lbl_Sad")
        self.lbl_Angry = QtWidgets.QLabel(self.centralwidget)
        self.lbl_Angry.setGeometry(QtCore.QRect(190, 90, 61, 31))
        font = QtGui.QFont()
        font.setPointSize(11)
        font.setBold(True)
        font.setItalic(False)
        font.setWeight(75)
        self.lbl_Angry.setFont(font)
        self.lbl_Angry.setObjectName("lbl_Angry")
        self.lbl_Surprise = QtWidgets.QLabel(self.centralwidget)
        self.lbl_Surprise.setGeometry(QtCore.QRect(190, 140, 71, 21))
        font = QtGui.QFont()
        font.setPointSize(11)
        font.setBold(True)
        font.setWeight(75)
        self.lbl_Surprise.setFont(font)
        self.lbl_Surprise.setObjectName("lbl_Surprise")
        self.lbl_Neutral = QtWidgets.QLabel(self.centralwidget)
        self.lbl_Neutral.setGeometry(QtCore.QRect(190, 180, 55, 16))
        font = QtGui.QFont()
        font.setPointSize(11)
        font.setBold(True)
        font.setWeight(75)
        self.lbl_Neutral.setFont(font)
        self.lbl_Neutral.setObjectName("lbl_Neutral")
        self.btn_exit = QtWidgets.QPushButton(self.centralwidget)
        self.btn_exit.setGeometry(QtCore.QRect(20, 140, 121, 51))
        font = QtGui.QFont()
        font.setPointSize(13)
        font.setBold(True)
        font.setWeight(75)
        self.btn_exit.setFont(font)
        self.btn_exit.setStyleSheet("background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:1 rgba(70, 223, 223, 255));")
        self.btn_exit.setAutoRepeat(False)
        self.btn_exit.setAutoDefault(False)
        self.btn_exit.setDefault(False)
        self.btn_exit.setFlat(False)
        self.btn_exit.setObjectName("btn_exit")
        self.btn_exit.clicked.connect(self.exit)
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtWidgets.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 471, 21))
        self.menubar.setObjectName("menubar")
        self.menuFile = QtWidgets.QMenu(self.menubar)
        self.menuFile.setObjectName("menuFile")
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtWidgets.QStatusBar(MainWindow)
        self.statusbar.setObjectName("statusbar")
        MainWindow.setStatusBar(self.statusbar)
        self.actionOpen = QtWidgets.QAction(MainWindow)
        self.actionOpen.setObjectName("actionOpen")
        self.actionClose = QtWidgets.QAction(MainWindow)
        self.actionClose.setObjectName("actionClose")
        self.menuFile.addAction(self.actionOpen)
        self.menuFile.addAction(self.actionClose)
        self.actionClose.triggered.connect(self.exit)
        self.menubar.addAction(self.menuFile.menuAction())

        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)

    def btnstate(self):
           recognition.recognizeEmotion()
    def exit(self):
        sys.exit(app.exec_())

    def retranslateUi(self, MainWindow):
        _translate = QtCore.QCoreApplication.translate
        MainWindow.setWindowTitle(_translate("MainWindow", "Emotion Recognition Application"))
        self.btn_recognize.setText(_translate("MainWindow", "Recognize"))
        self.lbl_Happy.setText(_translate("MainWindow", "Happy"))
        self.lbl_Sad.setText(_translate("MainWindow", "Sad"))
        self.lbl_Angry.setText(_translate("MainWindow", "Angry"))
        self.lbl_Surprise.setText(_translate("MainWindow", "Surprise"))
        self.lbl_Neutral.setText(_translate("MainWindow", "Neutral"))
        self.btn_exit.setText(_translate("MainWindow", "Exit"))
        self.menuFile.setTitle(_translate("MainWindow", "Menu"))
        self.actionOpen.setText(_translate("MainWindow", "Open file"))
        self.actionClose.setText(_translate("MainWindow", "Close app"))


if __name__ == "__main__":
    import sys
    app = QtWidgets.QApplication(sys.argv)
    MainWindow = QtWidgets.QMainWindow()
    ui = Ui_MainWindow()
    ui.setupUi(MainWindow)
    MainWindow.show()
    sys.exit(app.exec_())
