Untitled

mail@pastecode.io avatar
unknown
plain_text
23 days ago
12 kB
2
Indexable
Never
# -*- coding: utf-8 -*-

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


class Ui_login(object):
    def setupUi(self, login_form):
        login_form.setObjectName("login_form")
        login_form.resize(1000, 575)
        login_form.setMinimumSize(QtCore.QSize(1000, 575))
        login_form.setMaximumSize(QtCore.QSize(1000, 575))
        self.gridLayout = QtWidgets.QGridLayout(login_form)
        self.gridLayout.setContentsMargins(0, 0, 0, 0)
        self.gridLayout.setSpacing(0)
        self.gridLayout.setObjectName("gridLayout")
        self.logo_login_holder = QtWidgets.QWidget(login_form)
        self.logo_login_holder.setObjectName("logo_login_holder")
        self.horizontalLayout = QtWidgets.QHBoxLayout(self.logo_login_holder)
        self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
        self.horizontalLayout.setSpacing(0)
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.logo_area = QtWidgets.QWidget(self.logo_login_holder)
        self.logo_area.setStyleSheet("background-color: rgb(59, 49, 37);")
        self.logo_area.setObjectName("logo_area")
        self.verticalLayout = QtWidgets.QVBoxLayout(self.logo_area)
        self.verticalLayout.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout.setSpacing(0)
        self.verticalLayout.setObjectName("verticalLayout")
        self.left_area_holder = QtWidgets.QWidget(self.logo_area)
        self.left_area_holder.setStyleSheet("background-color: rgb(149, 181, 184);")
        self.left_area_holder.setObjectName("left_area_holder")
        self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.left_area_holder)
        self.verticalLayout_2.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout_2.setSpacing(0)
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.spacer_top = QtWidgets.QWidget(self.left_area_holder)
        self.spacer_top.setStyleSheet("background-color: rgb(40, 38, 38);")
        self.spacer_top.setObjectName("spacer_top")
        self.verticalLayout_2.addWidget(self.spacer_top)
        self.logo_holder = QtWidgets.QWidget(self.left_area_holder)
        self.logo_holder.setStyleSheet("\n"
"background-color: rgb(40, 38, 38);")
        self.logo_holder.setObjectName("logo_holder")
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.logo_holder)
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.logo = QtWidgets.QLabel(self.logo_holder)
        self.logo.setMinimumSize(QtCore.QSize(400, 200))
        self.logo.setMaximumSize(QtCore.QSize(400, 200))
        self.logo.setAutoFillBackground(False)
        self.logo.setText("")
        self.logo.setPixmap(QtGui.QPixmap(u"Final Project\image\Logo1.png"))
        self.logo.setScaledContents(True)
        self.logo.setAlignment(QtCore.Qt.AlignCenter)
        self.logo.setObjectName("logo")
        self.horizontalLayout_2.addWidget(self.logo)
        self.verticalLayout_2.addWidget(self.logo_holder)
        self.spacer_bottom = QtWidgets.QWidget(self.left_area_holder)
        self.spacer_bottom.setStyleSheet("background-color: rgb(40, 38, 38);")
        self.spacer_bottom.setObjectName("spacer_bottom")
        self.verticalLayout_2.addWidget(self.spacer_bottom)
        self.verticalLayout.addWidget(self.left_area_holder)
        self.horizontalLayout.addWidget(self.logo_area)
        self.login_area = QtWidgets.QWidget(self.logo_login_holder)
        self.login_area.setStyleSheet("background-color: rgb(236, 230, 230);")
        self.login_area.setObjectName("login_area")
        self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.login_area)
        self.verticalLayout_3.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout_3.setSpacing(0)
        self.verticalLayout_3.setObjectName("verticalLayout_3")
        self.a_top = QtWidgets.QWidget(self.login_area)
        self.a_top.setStyleSheet("")
        self.a_top.setObjectName("a_top")
        self.horizontalLayout_5 = QtWidgets.QHBoxLayout(self.a_top)
        self.horizontalLayout_5.setContentsMargins(0, 0, 0, 0)
        self.horizontalLayout_5.setSpacing(0)
        self.horizontalLayout_5.setObjectName("horizontalLayout_5")
        self.topspace_left = QtWidgets.QWidget(self.a_top)
        self.topspace_left.setMaximumSize(QtCore.QSize(75, 16777215))
        self.topspace_left.setObjectName("topspace_left")
        self.horizontalLayout_5.addWidget(self.topspace_left)
        self.topspace = QtWidgets.QWidget(self.a_top)
        self.topspace.setObjectName("topspace")
        self.verticalLayout_5 = QtWidgets.QVBoxLayout(self.topspace)
        self.verticalLayout_5.setObjectName("verticalLayout_5")
        self.label_welcome = QtWidgets.QLabel(self.topspace)
        self.label_welcome.setStyleSheet("QLabel {\n"
"    color: #B71C1C; \n"
"    font-size: 35px; \n"
"    font-weight: bold;\n"
"}")
        self.label_welcome.setAlignment(QtCore.Qt.AlignCenter)
        self.label_welcome.setObjectName("label_welcome")
        self.verticalLayout_5.addWidget(self.label_welcome)
        self.error = QtWidgets.QLabel(self.topspace)
        self.error.setMaximumSize(QtCore.QSize(400, 40))
        self.error.setStyleSheet("QLabel {\n"
"    color: #B71C1C; \n"
"    font-size: 14px;\n"
"}")
        self.error.setText("")
        self.error.setScaledContents(False)
        self.error.setAlignment(QtCore.Qt.AlignCenter)
        self.error.setObjectName("error")
        self.verticalLayout_5.addWidget(self.error)
        self.horizontalLayout_5.addWidget(self.topspace)
        self.topspace_right = QtWidgets.QWidget(self.a_top)
        self.topspace_right.setMaximumSize(QtCore.QSize(75, 16777215))
        self.topspace_right.setObjectName("topspace_right")
        self.horizontalLayout_5.addWidget(self.topspace_right)
        self.verticalLayout_3.addWidget(self.a_top)
        self.b_middle = QtWidgets.QWidget(self.login_area)
        self.b_middle.setMaximumSize(QtCore.QSize(500, 16777215))
        self.b_middle.setStyleSheet("")
        self.b_middle.setObjectName("b_middle")
        self.horizontalLayout_4 = QtWidgets.QHBoxLayout(self.b_middle)
        self.horizontalLayout_4.setContentsMargins(0, 0, 0, 0)
        self.horizontalLayout_4.setSpacing(0)
        self.horizontalLayout_4.setObjectName("horizontalLayout_4")
        self.middlespace_left = QtWidgets.QWidget(self.b_middle)
        self.middlespace_left.setMaximumSize(QtCore.QSize(100, 16777215))
        self.middlespace_left.setStyleSheet("")
        self.middlespace_left.setObjectName("middlespace_left")
        self.horizontalLayout_4.addWidget(self.middlespace_left)
        self.middlespace = QtWidgets.QWidget(self.b_middle)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.middlespace.sizePolicy().hasHeightForWidth())
        self.middlespace.setSizePolicy(sizePolicy)
        self.middlespace.setMaximumSize(QtCore.QSize(300, 16777215))
        self.middlespace.setObjectName("middlespace")
        self.verticalLayout_4 = QtWidgets.QVBoxLayout(self.middlespace)
        self.verticalLayout_4.setObjectName("verticalLayout_4")
        self.label_username = QtWidgets.QLabel(self.middlespace)
        self.label_username.setStyleSheet("QLabel {\n"
"    color: #B71C1C; \n"
"    font-size: 16px; \n"
"    font-weight: bold;\n"
"}")
        self.label_username.setObjectName("label_username")
        self.verticalLayout_4.addWidget(self.label_username)
        self.input_username = QtWidgets.QLineEdit(self.middlespace)
        self.input_username.setStyleSheet("QLineEdit {\n"
"    background-color: #D3D3D3;\n"
"    color: #333; \n"
"    border: none; \n"
"    border-radius: 10px;  \n"
"    padding: 10px;  \n"
"    font-size: 16px;  \n"
"}\n"
"QLineEdit::placeholder {\n"
"    color: #B71C1C;  \n"
"    font-size: 16px; \n"
"}")
        self.input_username.setObjectName("input_username")
        self.verticalLayout_4.addWidget(self.input_username)
        self.label_password = QtWidgets.QLabel(self.middlespace)
        self.label_password.setStyleSheet("QLabel {\n"
"    color: #B71C1C;  \n"
"    font-size: 16px;  \n"
"    font-weight: bold;\n"
"}")
        self.label_password.setObjectName("label_password")
        self.verticalLayout_4.addWidget(self.label_password)
        self.input_password = QtWidgets.QLineEdit(self.middlespace)
        self.input_password.setStyleSheet("QLineEdit {\n"
"    background-color: #D3D3D3;\n"
"    color: #333; \n"
"    border: none; \n"
"    border-radius: 10px;  \n"
"    padding: 10px;  \n"
"    font-size: 16px;  \n"
"}\n"
"QLineEdit::placeholder {\n"
"    color: #B71C1C;  \n"
"    font-size: 16px; \n"
"}")
        self.input_password.setEchoMode(QtWidgets.QLineEdit.Password)
        self.input_password.setObjectName("input_password")
        self.verticalLayout_4.addWidget(self.input_password)
        self.horizontalLayout_4.addWidget(self.middlespace)
        self.middlespace_right = QtWidgets.QWidget(self.b_middle)
        self.middlespace_right.setMaximumSize(QtCore.QSize(100, 16777215))
        self.middlespace_right.setStyleSheet("")
        self.middlespace_right.setObjectName("middlespace_right")
        self.horizontalLayout_4.addWidget(self.middlespace_right)
        self.verticalLayout_3.addWidget(self.b_middle)
        self.c_bottom = QtWidgets.QWidget(self.login_area)
        self.c_bottom.setStyleSheet("")
        self.c_bottom.setObjectName("c_bottom")
        self.verticalLayout_6 = QtWidgets.QVBoxLayout(self.c_bottom)
        self.verticalLayout_6.setObjectName("verticalLayout_6")
        self.loginspace = QtWidgets.QWidget(self.c_bottom)
        self.loginspace.setObjectName("loginspace")
        self.horizontalLayout_3 = QtWidgets.QHBoxLayout(self.loginspace)
        self.horizontalLayout_3.setObjectName("horizontalLayout_3")
        self.btn_login = QtWidgets.QPushButton(self.loginspace)
        self.btn_login.setMaximumSize(QtCore.QSize(150, 40))
        self.btn_login.setStyleSheet("QPushButton {\n"
"    background-color: #B71C1C;\n"
"    color: white;  \n"
"    border-radius: 10px; \n"
"    padding: 10px 20px;\n"
"    font-size: 16px;  \n"
"    font-weight: bold;  \n"
"}\n"
"QPushButton:hover {\n"
"    background-color: #D32F2F; \n"
"}\n"
"QPushButton:pressed {\n"
"    background-color: #880E4F; \n"
"}")
        self.btn_login.setObjectName("btn_login")
        self.horizontalLayout_3.addWidget(self.btn_login)
        self.verticalLayout_6.addWidget(self.loginspace)
        self.bottomspace = QtWidgets.QWidget(self.c_bottom)
        self.bottomspace.setObjectName("bottomspace")
        self.verticalLayout_6.addWidget(self.bottomspace)
        self.verticalLayout_3.addWidget(self.c_bottom)
        self.horizontalLayout.addWidget(self.login_area)
        self.gridLayout.addWidget(self.logo_login_holder, 0, 0, 1, 1)

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

    def retranslateUi(self, login_form):
        _translate = QtCore.QCoreApplication.translate
        login_form.setWindowTitle(_translate("login_form", "Form"))
        self.label_welcome.setText(_translate("login_form", "Welcome to IESMS"))
        self.label_username.setText(_translate("login_form", "Username"))
        self.label_password.setText(_translate("login_form", "Password"))
        self.btn_login.setText(_translate("login_form", "Login"))


if __name__ == "__main__":
    import sys
    app = QtWidgets.QApplication(sys.argv)
    login_form = QtWidgets.QWidget()
    ui = Ui_login()
    ui.setupUi(login_form)
    login_form.show()
    sys.exit(app.exec_())
Leave a Comment