
from PyQt5 import QtCore, QtGui, QtWidgets
import pymysql
import smtplib

class Ui_MainWindow(object):
    def __init__(self):
        self.date1=""
        self.src1=""
        self.dest1=" "
        self.email=""
        self.name1=""
        self.username=""
        self.gender=""
        self.pref=""
        self.l=""
        self.slot1=""
        self.slot2=""
        self.slot3 =""
        self.slot4 = ""
        self.slot5 = ""
        self.slot6 = ""
        self.slot7 = ""
        self.slot8 = ""
        self.slot9 = ""
        self.slot10 = ""
        self.slot11= ""
        self.slot12 = ""
        self.slot13 = ""
        self.slot14 = ""
        self.slot15 = ""
        self.slot=""
        self.fare=""
        self.trname=" "
        self.age=""
        self.trno=""
        self.prn=" "

        self.tfare=0

    def canceltkt(self):
        conn = pymysql.connect(host="localhost", user="root", password="1234", db="trial")
        cur = conn.cursor()
        self.prn=self.lineEdit_13.text()
        query = "DELETE  from booking where prnno = %s "
        data = cur.execute(query,(self.prn))
        conn.commit()
        if(data):
            self.messagebox("Success","booking with PRN No " + self.prn + " is cancelled successfully.")
            self.lineEdit_13.setText(" ")
        else:
            self.messagebox("Error","booking with PRN No" + self.prn + " does not exist!")
            self.lineEdit_13.setText(" ")



    def fetch2pr(self):
        conn = pymysql.connect(host="localhost", user="root", password="1234", db="trial")
        cur = conn.cursor()
        query1 = " select prnno from booking where name in (select name from signup where username=%s)"
        data1=cur.execute(query1,self.username)
        conn.commit()
        self.prn=data1
        print(self.prn)
        self.p_name.setText(str(self.name1))
        self.p_train_name.setText(str(self.trname))
        self.p_train_no.setText(str(self.trno))
        self.p_date.setText(str(self.date1))
        #self.p_prn.setText(str(self.prn))
        self.p_pref.setText(str(self.pref))
        self.p_seats.setText(str(self.slot))
        self.p_fare.setText(str(self.tfare))


    def cleanCB(self):
        self.comboBox_3.clear()
        self.stackedWidget.setCurrentIndex(3)


    def cbook(self):
        conn = pymysql.connect(host="localhost", user="root", password="1234", db="trial")
        cur = conn.cursor()
        query = "insert into booking (fare,name,age,gender,preference,seats,trname,trno,date) values (%s,%s,%s,%s,%s,%s,%s,%s,%s)"
        data=cur.execute(query,(str(self.tfare),self.name1,self.age,self.gender,self.pref,self.slot,self.trname,self.trno,self.date1))
        conn.commit()
        if(data):
            query1="SELECT prnno from booking where name=%s ORDER BY prnno DESC"
            cur.execute(query1,(self.name1))
            data1=cur.fetchall()
            z=str(data1[0][0])
            self.p_prn.setText(z)
            '''
            e = smtplib.SMTP('smtp.gmail.com', 587)
            e.starttls()
            e.login("railwaybookingsys@gmail.com", "pythonproj")
            message = "booking details:\nName: '{name1}'\nPNR No. : '{prn}' \n Train name: '{trname}' \n Train No: '{trno}"
            "\n seats booked: '{slot}' \n Preference: '{pref}' \n Date: '{date1}'\n Fare: '{fare}'" 
            e.sendmail("railwaybookingsys@gmail.com", email, message)
            e.quit()
            '''

            self.PrintBtn.setEnabled(False)
            self.BackBtn.setEnabled(False)


    def sl(self):
        if self.slot1!="":
            self.slot=self.slot + " " + self.slot1
        if self.slot2 != "":
            self.slot = self.slot + " " + self.slot2
        if self.slot3!="":
            self.slot=self.slot+" "+self.slot3
        if self.slot4!="":
            self.slot=self.slot+" " +self.slot4
        if self.slot5!="":
            self.slot=self.slot+" " +self.slot5
        if self.slot6!="":
            self.slot=self.slot+" " +self.slot6
        if self.slot7!="":
            self.slot=self.slot+" " +self.slot7
        if self.slot8!="":
            self.slot=self.slot+" " +self.slot8
        if self.slot9!="":
            self.slot=self.slot+" " +self.slot9
        if self.slot10!="":
            self.slot=self.slot+" " +self.slot10
        if self.slot11!="":
            self.slot=self.slot+" " +self.slot11
        if self.slot12!="":
            self.slot=self.slot+" " +self.slot12
        if self.slot13!="":
            self.slot=self.slot+" " +self.slot13
        if self.slot14!="":
            self.slot=self.slot+" " +self.slot14
        if self.slot15!="":
            self.slot=self.slot+" " +self.slot15
        #self.stackedWidget.setCurrentIndex(8)

        z=tuple(self.slot.split(" "))
        for i in z:
            self.tfare=self.tfare+self.fare
        self.tfare=self.tfare-self.fare
        #self.fetch2print(self)


    def zz(self,val):
        if val==1:
            self.seat1.setStyleSheet("background-color: ")
            self.slot1 = ""
            self.seat1.clicked.connect(lambda: self.slotsel(1))

        if val==2:
            self.seat2.setStyleSheet("background-color: ")
            self.slot2 = ""
            self.seat2.clicked.connect(lambda: self.slotsel(2))
        if val==3:
            self.seat3.setStyleSheet("background-color: ")
            self.slot3 = ""
            self.seat3.clicked.connect(lambda: self.slotsel(3))
        if val==4:
            self.seat4.setStyleSheet("background-color: ")
            self.slot4 = ""
            self.seat4.clicked.connect(lambda: self.slotsel(4))
        if val==5:
            self.seat5.setStyleSheet("background-color: ")
            self.slot5=""
            self.seat5.clicked.connect(lambda: self.slotsel(5))
        if val==6:
            self.seat6.setStyleSheet("background-color: ")
            self.slot6=""
            self.seat6.clicked.connect(lambda: self.slotsel(6))
        if val==7:
            self.seat7.setStyleSheet("background-color: ")
            self.slot7=""
            self.seat7.clicked.connect(lambda: self.slotsel(7))
        if val==8:
            self.seat8.setStyleSheet("background-color: ")
            self.slot8=""
            self.seat8.clicked.connect(lambda: self.slotsel(8))
        if val==9:
            self.seat9.setStyleSheet("background-color: ")
            self.slot9=""
            self.seat9.clicked.connect(lambda: self.slotsel(9))
        if val==10:
            self.seat10.setStyleSheet("background-color: ")
            self.slot10=""
            self.seat10.clicked.connect(lambda: self.slotsel(10))
        if val==11:
            self.seat11.setStyleSheet("background-color: ")
            self.slot11=""
            self.seat11.clicked.connect(lambda: self.slotsel(11))
        if val==12:
            self.seat12.setStyleSheet("background-color: ")
            self.slot12=""
            self.seat12.clicked.connect(lambda: self.slotsel(12))
        if val==13:
            self.seat13.setStyleSheet("background-color: ")
            self.slot13=""
            self.seat13.clicked.connect(lambda: self.slotsel(13))
        if val==14:
            self.seat14.setStyleSheet("background-color: ")
            self.slot14=""
            self.seat14.clicked.connect(lambda: self.slotsel(14))
        if val==15:
            self.seat15.setStyleSheet("background-color: ")
            self.slot15=""
            self.seat15.clicked.connect(lambda: self.slotsel(15))


    def slotsel(self,value):
        if value==1:
            self.seat1.setStyleSheet("background-color: green")
            self.slot1="s1"
            self.seat1.clicked.connect(lambda: self.zz(1))
        #else:
            #self.seat1.setStyleSheet("background-color: ")
        if value == 2:
            self.seat2.setStyleSheet("background-color: green")
            self.slot2="s2"
            self.seat2.clicked.connect(lambda: self.zz(2))

        #else:
            #self.seat2.setStyleSheet("background-color: ")
        if value == 3:
            self.seat3.setStyleSheet("background-color: green")
            self.slot3="s3"
            self.seat3.clicked.connect(lambda: self.zz(3))
        #else:
            #self.seat3.setStyleSheet("background-color: ")
        if value==4:
            self.seat4.setStyleSheet("background-color: green")
            self.slot4="s4"
            self.seat4.clicked.connect(lambda: self.zz(4))
        #else:
            #self.seat4.setStyleSheet("background-color: ")
        if value==5:
            self.seat5.setStyleSheet("background-color: green")
            self.slot5="s5"
            self.seat5.clicked.connect(lambda: self.zz(5))
        #else:
            #self.seat5.setStyleSheet("background-color: ")
        if value==6:
            self.seat6.setStyleSheet("background-color: green")
            self.slot6="s6"
            self.seat6.clicked.connect(lambda: self.zz(6))
        #else:
            #self.seat6.setStyleSheet("background-color: ")
        if value==7:
            self.seat7.setStyleSheet("background-color: green")
            self.slot7="s7"
            self.seat7.clicked.connect(lambda: self.zz(7))
        #else:
            #self.seat7.setStyleSheet("background-color: ")
        if value==8:
            self.seat8.setStyleSheet("background-color: green")
            self.slot8="s8"
            self.seat8.clicked.connect(lambda: self.zz(8))
        #else:
            #self.seat8.setStyleSheet("background-color: ")
        if value==9:
            self.seat9.setStyleSheet("background-color: green")
            self.slot9="s9"
            self.seat9.clicked.connect(lambda: self.zz(9))
        #else:
            #self.seat9.setStyleSheet("background-color: ")
        if value==10:
            self.seat10.setStyleSheet("background-color: green")
            self.slot10="s10"
            self.seat10.clicked.connect(lambda: self.zz(10))
        #else:
            #self.seat10.setStyleSheet("background-color: ")
        if value==11:
            self.seat11.setStyleSheet("background-color: green")
            self.slot11="s11"
            self.seat11.clicked.connect(lambda: self.zz(11))
        #else:
            #self.seat11.setStyleSheet("background-color: ")
        if value==12:
            self.seat12.setStyleSheet("background-color: green")
            self.slot12="s12"
            self.seat12.clicked.connect(lambda: self.zz(12))
        #else:
            #self.seat12.setStyleSheet("background-color: ")
        if value==13:
            self.seat13.setStyleSheet("background-color: green")
            self.slot13="s13"
            self.seat13.clicked.connect(lambda: self.zz(13))
        #else:
            #self.seat13.setStyleSheet("background-color: ")
        if value==14:
            self.seat14.setStyleSheet("background-color: green")
            self.slot14="s14"
            self.seat14.clicked.connect(lambda: self.zz(14))
        #else:
            #self.seat14.setStyleSheet("background-color: ")
        if value==15:
            self.seat15.setStyleSheet("background-color: green")
            self.slot15="s15"
            self.seat15.clicked.connect(lambda: self.zz(15))
        #else:
            #self.seat15.setStyleSheet("background-color: ")

    def trnbk(self):
        conn = pymysql.connect(host="localhost", user="root", password="1234", db="trial")
        cur = conn.cursor()
        query = "SELECT name,age from signup where username=%s "
        cur.execute(query, (self.username))
        data = cur.fetchall()
        self.name1=str(data[0][0])
        self.age=str(data[0][1])
        self.lbl.setText(str(data[0][0]))
        self.lbl2.setText(str(data[0][1]))
        self.comboBox_3.addItems(self.l)
        self.stackedWidget.setCurrentIndex(6)

    def disable(self):
        conn = pymysql.connect(host="localhost", user="root", password="1234", db="trial")
        cur = conn.cursor()
        query = "SELECT seats from booking where (preference=%s and date=%s) and trno=%s "
        cur.execute(query,(self.pref,self.date1,self.trno))
        data = cur.fetchall()
        for row in data:
            for i in row:
                x=i.split(" ")
                for q in x:
                    if q == "s1":
                        self.seat1.setEnabled(False)
                    if q == "s2":
                        self.seat2.setEnabled(False)
                    if q == "s3":
                        self.seat3.setEnabled(False)
                    if q == "s4":
                        self.seat4.setEnabled(False)
                    if q == "s5'":
                        self.seat5.setEnabled(False)
                    if q == "s6":
                        self.seat6.setEnabled(False)
                    if q== "s7":
                        self.seat7.setEnabled(False)
                    if q== "s8":
                        self.seat8.setEnabled(False)
                    if q == "s9":
                        self.seat9.setEnabled(False)
                    if q == "s10":
                        self.seat10.setEnabled(False)
                    if q == "s11":
                        self.seat11.setEnabled(False)
                    if q == "s12":
                        self.seat12.setEnabled(False)
                    if q == "s13":
                        self.seat13.setEnabled(False)
                    if q == "s14":
                        self.seat14.setEnabled(False)
                    if q == "s15":
                        self.seat15.setEnabled(False)
                    if (q == "s1" and q == "s12" and q == "s3" and q == "s4" and q == "s5" and q == "s6" and q == "s7" and
                       q == "s8" and q == "s9" and q == "s10" and q == "s11" and q == "s12" and q == "s13" and q == "s14" and
                       q == "s15"):
                        self.messagebox("Alert","Seats not available!")

        x=len(self.slot)

    def mfcheck(self):

        self.pref = str(self.comboBox_5.currentText())
        self.trname=str(self.comboBox_3.currentText())

        if(self.pref=="NO PREFERENCE"):
            self.messagebox("Error","Select preference")

        elif(self.radioButton.isChecked()):
            self.gender="male"
        elif(self.radioButton_2.isChecked()):
            self.gender="Female"
        else:
            self.messagebox("Error","Fields cannot be empty")
        if (self.pref=="FIRST CLASS"):
            self.fare=2000
        if (self.pref=="SECOND CLASS"):
            self.fare=1000
        if (self.pref=="SLEEPER"):
            self.fare=500
        if(self.gender!="" and self.pref!="NO PREFERENCE"):
            self.disable()
            self.stackedWidget.setCurrentIndex(7)

    def srctrain(self):
        self.src1=str(self.comboBox.currentText())
        self.dest1=str(self.comboBox_4.currentText())
        x= str(self.dateEdit.date())
        self.date1 =x[19:-1]
        if (self.src1 == "SELECT"  and self.dest1 == "SELECT"):
            self.messagebox("Error", "Invalid Entry")
        else:
            self.Dtable()

    def Dtable(self):
        conn = pymysql.connect(host="localhost", user="root", password="1234", db="trial")
        cur = conn.cursor()
        query="SELECT * from traindb where source=%s and dest=%s "
        cur.execute(query,(self.src1,self.dest1))
        data=cur.fetchall()
        self.l=[i[1] for i in data]
        if(data):
            self.stackedWidget.setCurrentIndex(5)
            self.table.setRowCount(0)
            self.trno = str(data[0][0])
            for row_number, row_data in enumerate(data):
                self.table.insertRow(row_number)
                for column_number , data in enumerate(row_data):
                    self.table.setItem(row_number,column_number,QtWidgets.QTableWidgetItem(str(data)))

        else:
            self.messagebox("Error","No trains available!")

    def messagebox(self, title, message):
        msg = QtWidgets.QMessageBox()
        msg.setWindowTitle(title)
        msg.setText(message)
        msg.setStandardButtons(QtWidgets.QMessageBox.Ok)
        msg.exec_()

#SIGNUP DATABASE
    def signupdb(self):
        name = self.reg_name.text()
        username = self.reg_uname.text()
        password = self.reg_pwd.text()
        cpassword = self.reg_confpwd.text()
        age = self.reg_age.text()
        email = self.reg_email.text()
        address = self.reg_addr.text()
        contact = self.reg_phno.text()
        if(name=="" or username == "" or password == "" or cpassword =="" or age =="" or email =="" or address =="" or contact ==""):
            self.messagebox("Error","Fields cannot be empty!")
        elif(name.isalpha()==0):
            self.messagebox("Error","Invalid name")
        elif (password!=cpassword):
            self.messagebox("Error","Passwords do not match")
        elif (int(age) < 17 and int(age) >100 ):
            self.messagebox("Error","Invalid age!")
        elif ((len(str(contact))==10)==0 ):
            self.messagebox("Error","Invalid contact!")

        else:
            try:
                conn = pymysql.connect(host="localhost", user="root", password="1234", db="trial")
                cur = conn.cursor()
                indb = ("insert into signup(name,username,password,age,email,address,contact) values (%s,%s,%s,%s,%s,%s,%s)")
                data = cur.execute(indb, (name, username, password, age, email, address, contact))
                conn.commit()
                if (data):
                    self.messagebox("Congrats", "Registered Successfully!! :)")


            except:
                self.messagebox("Error", "UserName already exits!")

    #LOGIN DATABASE
    def logdb(self):
        self.username = self.uname.text()
        password = self.pwd.text()

        if (self.username == "" and password == ""):
            self.messagebox("ERROR", "Wrong username or password!!")

        #elif(len(cur.fetchall())>0):
        elif (self.username!="" and password != ""):

            conn = pymysql.connect(host="localhost", user="root", password="1234", db="trial")
            cur = conn.cursor()
            indb = ("select * from signup where username=%s and password=%s")

            data = cur.execute(indb, (self.username, password))
            #conn.commit()
            if(data):

                self.messagebox("Congrats", "Logged in successfully")
                self.stackedWidget.setCurrentIndex(3)
            else:
                self.messagebox("ERROR", "Wrong username or password!!")

    #CLEAR TEXT FIELD
    def cleartxt(self):
        self.reg_name.setText(" ")
        self.reg_addr.setText(" ")
        self.reg_age.setText(" ")
        self.reg_confpwd.setText("")
        self.reg_email.setText(" ")
        self.reg_phno.setText(" ")
        self.reg_uname.setText(" ")
        self.reg_pwd.setText("")
        self.uname.setText("")
        self.pwd.setText("")

    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(670, 500)
        palette = QtGui.QPalette()
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Base, brush)
        brush = QtGui.QBrush(QtGui.QColor(0, 170, 255))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Window, brush)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Base, brush)
        brush = QtGui.QBrush(QtGui.QColor(0, 170, 255))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Window, brush)
        brush = QtGui.QBrush(QtGui.QColor(0, 170, 255))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush)
        brush = QtGui.QBrush(QtGui.QColor(0, 170, 255))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Window, brush)
        MainWindow.setPalette(palette)
        MainWindow.setAutoFillBackground(False)
        MainWindow.setDockOptions(QtWidgets.QMainWindow.AllowTabbedDocks | QtWidgets.QMainWindow.AnimatedDocks)
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        palette = QtGui.QPalette()
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Base, brush)
        brush = QtGui.QBrush(QtGui.QColor(0, 170, 255))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Window, brush)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Base, brush)
        brush = QtGui.QBrush(QtGui.QColor(0, 170, 255))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Window, brush)
        brush = QtGui.QBrush(QtGui.QColor(0, 170, 255))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush)
        brush = QtGui.QBrush(QtGui.QColor(0, 170, 255))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Window, brush)
        self.centralwidget.setPalette(palette)
        self.centralwidget.setObjectName("centralwidget")
        self.stackedWidget = QtWidgets.QStackedWidget(self.centralwidget)
        self.stackedWidget.setGeometry(QtCore.QRect(15, 30, 630, 480))
        palette = QtGui.QPalette()
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Light, brush)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Base, brush)
        brush = QtGui.QBrush(QtGui.QColor(0, 170, 255))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Window, brush)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Light, brush)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Base, brush)
        brush = QtGui.QBrush(QtGui.QColor(0, 170, 255))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Window, brush)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Light, brush)
        brush = QtGui.QBrush(QtGui.QColor(0, 170, 255))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush)
        brush = QtGui.QBrush(QtGui.QColor(0, 170, 255))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Window, brush)
        self.stackedWidget.setPalette(palette)
        self.stackedWidget.setFocusPolicy(QtCore.Qt.TabFocus)
        self.stackedWidget.setFrameShape(QtWidgets.QFrame.NoFrame)
        self.stackedWidget.setFrameShadow(QtWidgets.QFrame.Plain)
        self.stackedWidget.setObjectName("stackedWidget")
        self.WelcomePage = QtWidgets.QWidget()
        palette = QtGui.QPalette()
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Base, brush)
        brush = QtGui.QBrush(QtGui.QColor(240, 240, 240))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Window, brush)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Base, brush)
        brush = QtGui.QBrush(QtGui.QColor(240, 240, 240))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Window, brush)
        brush = QtGui.QBrush(QtGui.QColor(240, 240, 240))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush)
        brush = QtGui.QBrush(QtGui.QColor(240, 240, 240))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Window, brush)
        self.WelcomePage.setPalette(palette)
        self.WelcomePage.setObjectName("WelcomePage")
        self.label_41 = QtWidgets.QLabel(self.WelcomePage)
        self.label_41.setGeometry(QtCore.QRect(75, 0, 196, 76))
        self.label_41.setMinimumSize(QtCore.QSize(106, 0))
        font = QtGui.QFont()
        font.setPointSize(26)
        font.setBold(True)
        font.setWeight(75)
        self.label_41.setFont(font)
        self.label_41.setObjectName("label_41")
        self.ArrowBtn = QtWidgets.QPushButton(self.WelcomePage)
        self.ArrowBtn.setGeometry(QtCore.QRect(405, 315, 106, 106))
        self.ArrowBtn.setText("")
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap("images/download.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.ArrowBtn.setIcon(icon)
        self.ArrowBtn.setIconSize(QtCore.QSize(100, 100))
        self.ArrowBtn.setObjectName("ArrowBtn")
        self.ArrowBtn.clicked.connect(lambda: self.stackedWidget.setCurrentIndex(1))
        self.label_42 = QtWidgets.QLabel(self.WelcomePage)
        self.label_42.setGeometry(QtCore.QRect(0, -15, 706, 496))
        self.label_42.setText("")
        self.label_42.setPixmap(QtGui.QPixmap("images/train_new.jpg"))
        self.label_42.setObjectName("label_42")
        self.label_42.raise_()
        self.label_41.raise_()
        self.ArrowBtn.raise_()
        self.stackedWidget.addWidget(self.WelcomePage)
        #LOGINPAGE
        self.LoginPage = QtWidgets.QWidget()
        self.LoginPage.setObjectName("LoginPage")
        self.label = QtWidgets.QLabel(self.LoginPage)
        self.label.setGeometry(QtCore.QRect(60, 90, 111, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.label.setFont(font)
        self.label.setObjectName("label")
        self.label_2 = QtWidgets.QLabel(self.LoginPage)
        self.label_2.setGeometry(QtCore.QRect(60, 160, 111, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.label_2.setFont(font)
        self.label_2.setObjectName("label_2")
        self.uname = QtWidgets.QLineEdit(self.LoginPage)
        self.uname.setGeometry(QtCore.QRect(255, 90, 151, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        self.uname.setFont(font)
        self.uname.setObjectName("uname")
        self.pwd = QtWidgets.QLineEdit(self.LoginPage)
        self.pwd.setGeometry(QtCore.QRect(255, 165, 151, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        self.pwd.setFont(font)
        self.pwd.setText("")
        self.pwd.setEchoMode(QtWidgets.QLineEdit.Password)
        self.pwd.setObjectName("pwd")
        self.login = QtWidgets.QPushButton(self.LoginPage)
        self.login.setGeometry(QtCore.QRect(255, 240, 81, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.login.setFont(font)
        self.login.setObjectName("login")
        # self.login.clicked.connect(lambda:self.stackedWidget.setCurrentIndex(3))
        self.login.clicked.connect(self.logdb)
        self.signup = QtWidgets.QPushButton(self.LoginPage)
        self.signup.setGeometry(QtCore.QRect(255, 345, 81, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.signup.setFont(font)
        self.signup.setObjectName("signup")
        self.signup.clicked.connect(lambda: self.stackedWidget.setCurrentIndex(2))
        self.label_3 = QtWidgets.QLabel(self.LoginPage)
        self.label_3.setGeometry(QtCore.QRect(255, 300, 141, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.label_3.setFont(font)
        self.label_3.setObjectName("label_3")
        self.label_4 = QtWidgets.QLabel(self.LoginPage)
        self.label_4.setGeometry(QtCore.QRect(200, 0, 221, 21))
        font = QtGui.QFont()
        font.setPointSize(14)
        font.setBold(True)
        font.setWeight(75)
        self.label_4.setFont(font)
        self.label_4.setObjectName("label_4")
        self.stackedWidget.addWidget(self.LoginPage)
        self.RegPage = QtWidgets.QWidget()
        self.RegPage.setObjectName("RegPage")
        self.label_5 = QtWidgets.QLabel(self.RegPage)
        self.label_5.setGeometry(QtCore.QRect(0, 70, 101, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.label_5.setFont(font)
        self.label_5.setObjectName("label_5")
        self.label_6 = QtWidgets.QLabel(self.RegPage)
        self.label_6.setGeometry(QtCore.QRect(315, 70, 91, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.label_6.setFont(font)
        self.label_6.setObjectName("label_6")
        self.label_7 = QtWidgets.QLabel(self.RegPage)
        self.label_7.setGeometry(QtCore.QRect(0, 120, 91, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.label_7.setFont(font)
        self.label_7.setObjectName("label_7")
        self.label_8 = QtWidgets.QLabel(self.RegPage)
        self.label_8.setGeometry(QtCore.QRect(315, 120, 91, 21))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.label_8.setFont(font)
        self.label_8.setObjectName("label_8")
        self.label_9 = QtWidgets.QLabel(self.RegPage)
        self.label_9.setGeometry(QtCore.QRect(0, 170, 101, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.label_9.setFont(font)
        self.label_9.setObjectName("label_9")
        self.label_10 = QtWidgets.QLabel(self.RegPage)
        self.label_10.setGeometry(QtCore.QRect(315, 170, 91, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.label_10.setFont(font)
        self.label_10.setObjectName("label_10")
        self.label_11 = QtWidgets.QLabel(self.RegPage)
        self.label_11.setGeometry(QtCore.QRect(0, 225, 136, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.label_11.setFont(font)
        self.label_11.setObjectName("label_11")
        self.label_12 = QtWidgets.QLabel(self.RegPage)
        self.label_12.setGeometry(QtCore.QRect(315, 220, 91, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.label_12.setFont(font)
        self.label_12.setObjectName("label_12")
        self.reg_name = QtWidgets.QLineEdit(self.RegPage)
        self.reg_name.setGeometry(QtCore.QRect(135, 70, 151, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        self.reg_name.setFont(font)
        self.reg_name.setObjectName("reg_name")
        self.reg_uname = QtWidgets.QLineEdit(self.RegPage)
        self.reg_uname.setGeometry(QtCore.QRect(135, 120, 151, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        self.reg_uname.setFont(font)
        self.reg_uname.setObjectName("reg_uname")
        self.reg_pwd = QtWidgets.QLineEdit(self.RegPage)
        self.reg_pwd.setGeometry(QtCore.QRect(135, 170, 151, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        self.reg_pwd.setFont(font)
        self.reg_pwd.setObjectName("reg_pwd")
        self.reg_pwd.setEchoMode(QtWidgets.QLineEdit.Password)
        self.reg_confpwd = QtWidgets.QLineEdit(self.RegPage)
        self.reg_confpwd.setGeometry(QtCore.QRect(135, 220, 151, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        self.reg_confpwd.setFont(font)
        self.reg_confpwd.setObjectName("reg_confpwd")
        self.reg_confpwd.setEchoMode(QtWidgets.QLineEdit.Password)
        self.reg_age = QtWidgets.QLineEdit(self.RegPage)
        self.reg_age.setGeometry(QtCore.QRect(405, 70, 151, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        self.reg_age.setFont(font)
        self.reg_age.setText("")
        self.reg_age.setObjectName("reg_age")
        self.reg_email = QtWidgets.QLineEdit(self.RegPage)
        self.reg_email.setGeometry(QtCore.QRect(405, 120, 151, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        self.reg_email.setFont(font)
        self.reg_email.setObjectName("reg_email")
        self.reg_addr = QtWidgets.QLineEdit(self.RegPage)
        self.reg_addr.setGeometry(QtCore.QRect(405, 170, 151, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        self.reg_addr.setFont(font)
        self.reg_addr.setObjectName("reg_addr")
        self.reg_phno = QtWidgets.QLineEdit(self.RegPage)
        self.reg_phno.setGeometry(QtCore.QRect(405, 220, 151, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        self.reg_phno.setFont(font)
        self.reg_phno.setObjectName("reg_phno")
        self.label_13 = QtWidgets.QLabel(self.RegPage)
        self.label_13.setGeometry(QtCore.QRect(200, 0, 261, 31))
        font = QtGui.QFont()
        font.setPointSize(14)
        font.setBold(True)
        font.setWeight(75)
        self.label_13.setFont(font)
        self.label_13.setAutoFillBackground(True)
        self.label_13.setFrameShadow(QtWidgets.QFrame.Plain)
        self.label_13.setObjectName("label_13")
        self.submit = QtWidgets.QPushButton(self.RegPage)
        self.submit.setGeometry(QtCore.QRect(120, 340, 91, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.submit.setFont(font)
        self.submit.setObjectName("submit")
        self.submit.clicked.connect(self.signupdb)
        # self.submit.clicked.connect(lambda:self.stackedWidget.setCurrentIndex(1))
        self.back_reg = QtWidgets.QPushButton(self.RegPage)
        self.back_reg.setGeometry(QtCore.QRect(270, 340, 91, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.back_reg.setFont(font)
        self.back_reg.setObjectName("back_reg")
        self.back_reg.clicked.connect(lambda: self.stackedWidget.setCurrentIndex(1))
        self.clear_reg = QtWidgets.QPushButton(self.RegPage)
        self.clear_reg.setGeometry(QtCore.QRect(420, 340, 91, 31))
        self.clear_reg.clicked.connect(self.cleartxt)
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.clear_reg.setFont(font)
        self.clear_reg.setObjectName("clear_reg")
        self.stackedWidget.addWidget(self.RegPage)
        self.OptionPage = QtWidgets.QWidget()
        self.OptionPage.setObjectName("OptionPage")
        self.BookTktBtn = QtWidgets.QPushButton(self.OptionPage)
        self.BookTktBtn.setGeometry(QtCore.QRect(255, 120, 121, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.BookTktBtn.setFont(font)
        self.BookTktBtn.setObjectName("BookTktBtn")
        self.BookTktBtn.clicked.connect(lambda: self.stackedWidget.setCurrentIndex(4))
        self.cancTktBtn = QtWidgets.QPushButton(self.OptionPage)
        self.cancTktBtn.setGeometry(QtCore.QRect(255, 190, 121, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.cancTktBtn.setFont(font)
        self.cancTktBtn.setObjectName("cancTktBtn")
        self.cancTktBtn.clicked.connect(lambda: self.stackedWidget.setCurrentIndex(9))
        self.ExitBtn = QtWidgets.QPushButton(self.OptionPage)
        self.ExitBtn.setGeometry(QtCore.QRect(255, 280, 121, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.ExitBtn.setFont(font)
        self.ExitBtn.setObjectName("ExitBtn")
        self.ExitBtn.clicked.connect(lambda: self.stackedWidget.setCurrentIndex(1))
        self.label_14 = QtWidgets.QLabel(self.OptionPage)
        self.label_14.setGeometry(QtCore.QRect(45, 125, 161, 21))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.label_14.setFont(font)
        self.label_14.setObjectName("label_14")
        self.label_16 = QtWidgets.QLabel(self.OptionPage)
        self.label_16.setGeometry(QtCore.QRect(45, 200, 161, 21))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.label_16.setFont(font)
        self.label_16.setObjectName("label_16")
        self.label_25 = QtWidgets.QLabel(self.OptionPage)
        self.label_25.setGeometry(QtCore.QRect(200, 10, 211, 21))
        font = QtGui.QFont()
        font.setPointSize(14)
        font.setBold(True)
        font.setWeight(75)
        self.label_25.setFont(font)
        self.label_25.setObjectName("label_25")
        self.stackedWidget.addWidget(self.OptionPage)
        self.SrcDestPage = QtWidgets.QWidget()
        self.SrcDestPage.setObjectName("SrcDestPage")
        self.label_21 = QtWidgets.QLabel(self.SrcDestPage)
        self.label_21.setGeometry(QtCore.QRect(85, 90, 141, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.label_21.setFont(font)
        self.label_21.setObjectName("label_21")
        self.comboBox = QtWidgets.QComboBox(self.SrcDestPage)
        self.comboBox.setGeometry(QtCore.QRect(255, 90, 151, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        self.comboBox.setFont(font)
        self.comboBox.setObjectName("comboBox")
        self.comboBox.addItem("")
        self.comboBox.addItem("")
        self.comboBox.addItem("")
        self.comboBox.addItem("")
        self.comboBox.addItem("")
        self.comboBox.addItem("")
        self.label_22 = QtWidgets.QLabel(self.SrcDestPage)
        self.label_22.setGeometry(QtCore.QRect(85, 170, 141, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.label_22.setFont(font)
        self.label_22.setObjectName("label_22")
        self.comboBox_4 = QtWidgets.QComboBox(self.SrcDestPage)
        self.comboBox_4.setGeometry(QtCore.QRect(255, 170, 151, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        self.comboBox_4.setFont(font)
        self.comboBox_4.setObjectName("comboBox_4")
        self.comboBox_4.addItem("")
        self.comboBox_4.addItem("")
        self.comboBox_4.addItem("")
        self.comboBox_4.addItem("")
        self.comboBox_4.addItem("")
        self.comboBox_4.addItem("")
        self.label_23 = QtWidgets.QLabel(self.SrcDestPage)
        self.label_23.setGeometry(QtCore.QRect(85, 250, 141, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.label_23.setFont(font)
        self.label_23.setObjectName("label_23")
        self.dateEdit = QtWidgets.QDateEdit(self.SrcDestPage)
        self.dateEdit.setGeometry(QtCore.QRect(255, 250, 151, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        self.dateEdit.setFont(font)
        self.dateEdit.setButtonSymbols(QtWidgets.QAbstractSpinBox.UpDownArrows)
        self.dateEdit.setDateTime(QtCore.QDateTime(QtCore.QDate.currentDate(), QtCore.QTime(0, 0, 0)))
        self.dateEdit.setObjectName("dateEdit")
        self.SrcTrnBtn = QtWidgets.QPushButton(self.SrcDestPage)
        self.SrcTrnBtn.setGeometry(QtCore.QRect(90, 345, 151, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.SrcTrnBtn.setFont(font)
        self.SrcTrnBtn.setObjectName("SrcTrnBtn")
        #self.SrcTrnBtn.clicked.connect(lambda: self.stackedWidget.setCurrentIndex(5))
        self.SrcTrnBtn.clicked.connect(self.srctrain)
        self.BackBtn = QtWidgets.QPushButton(self.SrcDestPage)
        self.BackBtn.setGeometry(QtCore.QRect(300, 345, 151, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.BackBtn.setFont(font)
        self.BackBtn.setObjectName("BackBtn")
        self.BackBtn.clicked.connect(lambda: self.stackedWidget.setCurrentIndex(3))
        self.label_26 = QtWidgets.QLabel(self.SrcDestPage)
        self.label_26.setGeometry(QtCore.QRect(200, 0, 251, 31))
        font = QtGui.QFont()
        font.setPointSize(14)
        font.setBold(True)
        font.setWeight(75)
        self.label_26.setFont(font)
        self.label_26.setObjectName("label_26")
        self.stackedWidget.addWidget(self.SrcDestPage)
        self.TrainsPage = QtWidgets.QWidget()
        self.TrainsPage.setObjectName("TrainsPage")
        self.label_50 = QtWidgets.QLabel(self.TrainsPage)
        self.label_50.setGeometry(QtCore.QRect(200, 0, 196, 61))
        font = QtGui.QFont()
        font.setPointSize(14)
        font.setBold(True)
        font.setWeight(75)
        self.label_50.setFont(font)
        self.label_50.setObjectName("label_50")
        self.table = QtWidgets.QTableWidget(self.TrainsPage)
        self.table.setGeometry(QtCore.QRect(60, 71, 526, 256))
        self.table.setShowGrid(True)
        self.table.setObjectName("table")
        self.table.setColumnCount(4)
        self.table.setRowCount(25)
        item = QtWidgets.QTableWidgetItem()
        self.table.setHorizontalHeaderItem(0, item)
        item = QtWidgets.QTableWidgetItem()
        self.table.setHorizontalHeaderItem(1, item)
        item = QtWidgets.QTableWidgetItem()
        self.table.setHorizontalHeaderItem(2, item)
        item = QtWidgets.QTableWidgetItem()
        self.table.setHorizontalHeaderItem(3, item)
        self.pushButton = QtWidgets.QPushButton(self.TrainsPage)
        self.pushButton.setGeometry(QtCore.QRect(345, 360, 91, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.pushButton.setFont(font)
        self.pushButton.setObjectName("pushButton")
        #self.pushButton.clicked.connect(lambda: self.stackedWidget.setCurrentIndex(6))
        self.pushButton.clicked.connect(self.trnbk)
        self.pushButton_2 = QtWidgets.QPushButton(self.TrainsPage)
        self.pushButton_2.setGeometry(QtCore.QRect(495, 360, 91, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.pushButton_2.setFont(font)
        self.pushButton_2.setObjectName("pushButton_2")
        self.pushButton_2.clicked.connect(lambda: self.stackedWidget.setCurrentIndex(4))
        self.stackedWidget.addWidget(self.TrainsPage)
        self.TktbookPage = QtWidgets.QWidget()
        self.TktbookPage.setObjectName("TktbookPage")
        self.label_18 = QtWidgets.QLabel(self.TktbookPage)
        self.label_18.setGeometry(QtCore.QRect(10, 60, 141, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.label_18.setFont(font)
        self.label_18.setObjectName("label_18")
        self.label_19 = QtWidgets.QLabel(self.TktbookPage)
        self.label_19.setGeometry(QtCore.QRect(10, 110, 141, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.label_19.setFont(font)
        self.label_19.setObjectName("label_19")
        self.label_20 = QtWidgets.QLabel(self.TktbookPage)
        self.label_20.setGeometry(QtCore.QRect(10, 170, 131, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.label_20.setFont(font)
        self.label_20.setObjectName("label_20")
        self.label_24 = QtWidgets.QLabel(self.TktbookPage)
        self.label_24.setGeometry(QtCore.QRect(10, 230, 131, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.label_24.setFont(font)
        self.label_24.setObjectName("label_24")
        self.lbl = QtWidgets.QLabel(self.TktbookPage)
        self.lbl.setGeometry(QtCore.QRect(200, 60, 151, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.lbl.setFont(font)
        self.lbl.setObjectName("lbl")
        self.lbl2= QtWidgets.QLabel(self.TktbookPage)
        self.lbl2.setGeometry(QtCore.QRect(200, 110, 151, 31))
        font = QtGui.QFont()
        font.setBold(True)
        font.setPointSize(10)
        self.lbl2.setFont(font)
        self.lbl2.setObjectName("lbl2")
        self.radioButton = QtWidgets.QRadioButton(self.TktbookPage)
        self.radioButton.setGeometry(QtCore.QRect(200, 170, 71, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        self.radioButton.setFont(font)
        self.radioButton.setObjectName("radioButton")
        self.radioButton_2 = QtWidgets.QRadioButton(self.TktbookPage)
        self.radioButton_2.setGeometry(QtCore.QRect(280, 170, 71, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        self.radioButton_2.setFont(font)
        self.radioButton_2.setObjectName("radioButton_2")
        self.comboBox_3 = QtWidgets.QComboBox(self.TktbookPage)
        self.comboBox_3.setGeometry(QtCore.QRect(200, 230, 151, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        self.comboBox_3.setFont(font)
        self.comboBox_3.setObjectName("comboBox_3")
        self.label_27 = QtWidgets.QLabel(self.TktbookPage)
        self.label_27.setGeometry(QtCore.QRect(10, 290, 131, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.label_27.setFont(font)
        self.label_27.setObjectName("label_27")
        self.comboBox_5 = QtWidgets.QComboBox(self.TktbookPage)
        self.comboBox_5.setGeometry(QtCore.QRect(200, 290, 151, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        self.comboBox_5.setFont(font)
        self.comboBox_5.setObjectName("comboBox_5")
        self.comboBox_5.addItem("")
        self.comboBox_5.addItem("")
        self.comboBox_5.addItem("")
        self.comboBox_5.addItem("")
        self.MakeBookBtn = QtWidgets.QPushButton(self.TktbookPage)
        self.MakeBookBtn.setGeometry(QtCore.QRect(75, 360, 151, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.MakeBookBtn.setFont(font)
        self.MakeBookBtn.setObjectName("MakeBookBtn")
        self.MakeBookBtn.clicked.connect(self.mfcheck)
        #self.MakeBookBtn.clicked.connect(lambda: self.stackedWidget.setCurrentIndex(7))
        self.CancBookBtn = QtWidgets.QPushButton(self.TktbookPage)
        self.CancBookBtn.setGeometry(QtCore.QRect(300, 360, 151, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.CancBookBtn.setFont(font)
        self.CancBookBtn.setObjectName("CancBookBtn")
        self.CancBookBtn.clicked.connect(self.cleanCB)
        self.label_17 = QtWidgets.QLabel(self.TktbookPage)
        self.label_17.setGeometry(QtCore.QRect(200, 0, 161, 31))
        font = QtGui.QFont()
        font.setPointSize(14)
        font.setBold(True)
        font.setWeight(75)
        self.label_17.setFont(font)
        self.label_17.setObjectName("label_17")
        self.stackedWidget.addWidget(self.TktbookPage)
        self.SeatsPage = QtWidgets.QWidget()
        self.SeatsPage.setObjectName("SeatsPage")
        self.label_28 = QtWidgets.QLabel(self.SeatsPage)
        self.label_28.setGeometry(QtCore.QRect(60, 45, 226, 31))
        font = QtGui.QFont()
        font.setPointSize(14)
        font.setBold(True)
        font.setWeight(75)
        self.label_28.setFont(font)
        self.label_28.setObjectName("label_28")
        self.NextBtn = QtWidgets.QPushButton(self.SeatsPage)
        self.NextBtn.setGeometry(QtCore.QRect(135, 375, 76, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.NextBtn.setFont(font)
        self.NextBtn.setObjectName("NextBtn")
        self.NextBtn.clicked.connect(self.sl)
        self.NextBtn.clicked.connect(self.fetch2pr)
        self.NextBtn.clicked.connect(lambda: self.stackedWidget.setCurrentIndex(8))

        self.label_39 = QtWidgets.QLabel(self.SeatsPage)
        self.label_39.setGeometry(QtCore.QRect(200, 0, 151, 16))
        font = QtGui.QFont()
        font.setPointSize(14)
        font.setBold(True)
        font.setWeight(75)
        self.label_39.setFont(font)
        self.label_39.setObjectName("label_39")
        self.NextBtn_2 = QtWidgets.QPushButton(self.SeatsPage)
        self.NextBtn_2.setGeometry(QtCore.QRect(330, 375, 76, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.NextBtn_2.setFont(font)
        self.NextBtn_2.setObjectName("NextBtn_2")
        self.NextBtn_2.clicked.connect(lambda: self.stackedWidget.setCurrentIndex(6))
        self.seat1 = QtWidgets.QPushButton(self.SeatsPage)
        self.seat1.setGeometry(QtCore.QRect(50, 120, 75, 23))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.seat1.setFont(font)
        self.seat1.setObjectName("seat1")
        self.seat1.clicked.connect(lambda: self.slotsel(1))
        self.seat2 = QtWidgets.QPushButton(self.SeatsPage)
        self.seat2.setGeometry(QtCore.QRect(150, 120, 75, 23))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.seat2.setFont(font)
        self.seat2.setObjectName("seat2")
        self.seat3 = QtWidgets.QPushButton(self.SeatsPage)
        self.seat3.setGeometry(QtCore.QRect(250, 120, 75, 23))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.seat3.setFont(font)
        self.seat3.setObjectName("seat3")
        self.seat4 = QtWidgets.QPushButton(self.SeatsPage)
        self.seat4.setGeometry(QtCore.QRect(350, 120, 75, 23))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.seat4.setFont(font)
        self.seat4.setObjectName("seat4")
        self.seat5 = QtWidgets.QPushButton(self.SeatsPage)
        self.seat5.setGeometry(QtCore.QRect(450, 120, 75, 23))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.seat5.setFont(font)
        self.seat5.setObjectName("seat5")
        self.seat6 = QtWidgets.QPushButton(self.SeatsPage)
        self.seat6.setGeometry(QtCore.QRect(50, 195, 75, 23))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.seat6.setFont(font)
        self.seat6.setObjectName("seat6")
        self.seat7 = QtWidgets.QPushButton(self.SeatsPage)
        self.seat7.setGeometry(QtCore.QRect(150, 195, 75, 23))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.seat7.setFont(font)
        self.seat7.setObjectName("seat7")
        self.seat8 = QtWidgets.QPushButton(self.SeatsPage)
        self.seat8.setGeometry(QtCore.QRect(250, 195, 75, 23))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.seat8.setFont(font)
        self.seat8.setObjectName("seat8")
        self.seat9 = QtWidgets.QPushButton(self.SeatsPage)
        self.seat9.setGeometry(QtCore.QRect(350, 195, 75, 23))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.seat9.setFont(font)
        self.seat9.setObjectName("seat9")
        self.seat10 = QtWidgets.QPushButton(self.SeatsPage)
        self.seat10.setGeometry(QtCore.QRect(450, 195, 75, 23))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.seat10.setFont(font)
        self.seat10.setObjectName("seat10")
        self.seat11 = QtWidgets.QPushButton(self.SeatsPage)
        self.seat11.setGeometry(QtCore.QRect(50, 270, 75, 23))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.seat11.setFont(font)
        self.seat11.setObjectName("seat11")
        self.seat12 = QtWidgets.QPushButton(self.SeatsPage)
        self.seat12.setGeometry(QtCore.QRect(150, 270, 75, 23))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.seat12.setFont(font)
        self.seat12.setObjectName("seat12")
        self.seat13 = QtWidgets.QPushButton(self.SeatsPage)
        self.seat13.setGeometry(QtCore.QRect(250, 270, 75, 23))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.seat13.setFont(font)
        self.seat13.setObjectName("seat13")
        self.seat14 = QtWidgets.QPushButton(self.SeatsPage)
        self.seat14.setGeometry(QtCore.QRect(350, 270, 75, 23))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.seat14.setFont(font)
        self.seat14.setObjectName("seat14")
        self.seat15 = QtWidgets.QPushButton(self.SeatsPage)
        self.seat15.setGeometry(QtCore.QRect(450, 270, 75, 23))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.seat15.setFont(font)
        self.seat15.setObjectName("seat15")
        self.seat2.clicked.connect(lambda: self.slotsel(2))
        self.seat3.clicked.connect(lambda: self.slotsel(3))
        self.seat4.clicked.connect(lambda: self.slotsel(4))
        self.seat5.clicked.connect(lambda: self.slotsel(5))
        self.seat6.clicked.connect(lambda: self.slotsel(6))
        self.seat7.clicked.connect(lambda: self.slotsel(7))
        self.seat8.clicked.connect(lambda: self.slotsel(8))
        self.seat9.clicked.connect(lambda: self.slotsel(9))
        self.seat10.clicked.connect(lambda: self.slotsel(10))
        self.seat11.clicked.connect(lambda: self.slotsel(11))
        self.seat12.clicked.connect(lambda: self.slotsel(12))
        self.seat13.clicked.connect(lambda: self.slotsel(13))
        self.seat14.clicked.connect(lambda: self.slotsel(14))
        self.seat15.clicked.connect(lambda: self.slotsel(15))
        self.stackedWidget.addWidget(self.SeatsPage)
        self.PrintTktPage = QtWidgets.QWidget()
        self.PrintTktPage.setObjectName("PrintTktPage")
        self.label_29 = QtWidgets.QLabel(self.PrintTktPage)
        self.label_29.setGeometry(QtCore.QRect(200, 0, 201, 31))
        font = QtGui.QFont()
        font.setPointSize(14)
        font.setBold(True)
        font.setWeight(75)
        self.label_29.setFont(font)
        self.label_29.setObjectName("label_29")
        self.l_name = QtWidgets.QLabel(self.PrintTktPage)
        self.l_name.setGeometry(QtCore.QRect(90, 40, 101, 21))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.l_name.setFont(font)
        self.l_name.setObjectName("l_name")
        self.l_trname = QtWidgets.QLabel(self.PrintTktPage)
        self.l_trname.setGeometry(QtCore.QRect(90, 80, 101, 21))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.l_trname.setFont(font)
        self.l_trname.setObjectName("l_trname")
        self.l_trno = QtWidgets.QLabel(self.PrintTktPage)
        self.l_trno.setGeometry(QtCore.QRect(90, 120, 101, 21))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.l_trno.setFont(font)
        self.l_trno.setObjectName("l_trno")

        self.l_prnno = QtWidgets.QLabel(self.PrintTktPage)
        self.l_prnno.setGeometry(QtCore.QRect(90, 160, 101, 21))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.l_prnno.setFont(font)
        self.l_prnno.setObjectName("l_prnno")
        self.l_pref = QtWidgets.QLabel(self.PrintTktPage)
        self.l_pref.setGeometry(QtCore.QRect(90, 200, 101, 21))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.l_pref.setFont(font)
        self.l_pref.setObjectName("l_pref")
        self.l_seats = QtWidgets.QLabel(self.PrintTktPage)
        self.l_seats.setGeometry(QtCore.QRect(90, 240, 101, 21))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.l_seats.setFont(font)
        self.l_seats.setObjectName("l_seats")

        self.l_fare = QtWidgets.QLabel(self.PrintTktPage)
        self.l_fare.setGeometry(QtCore.QRect(90, 280, 101, 21))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.l_fare.setFont(font)
        self.l_fare.setObjectName("l_fare")

        self.l_date = QtWidgets.QLabel(self.PrintTktPage)
        self.l_date.setGeometry(QtCore.QRect(90, 320, 101, 21))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.l_date.setFont(font)
        self.l_date.setObjectName("l_date")


        self.p_name = QtWidgets.QLabel(self.PrintTktPage)
        self.p_name.setGeometry(QtCore.QRect(200, 40, 241, 21))
        font = QtGui.QFont()
        font.setPointSize(10)
        self.p_name.setFont(font)
        self.p_name.setText("")
        self.p_name.setObjectName("p_name")
        self.p_train_name = QtWidgets.QLabel(self.PrintTktPage)
        self.p_train_name.setGeometry(QtCore.QRect(200, 80, 241, 21))
        font = QtGui.QFont()
        font.setPointSize(10)
        self.p_train_name.setFont(font)
        self.p_train_name.setText("")
        self.p_train_name.setObjectName("p_train_name")
        self.p_train_no = QtWidgets.QLabel(self.PrintTktPage)
        self.p_train_no.setGeometry(QtCore.QRect(200, 120, 241, 21))
        font = QtGui.QFont()
        font.setPointSize(10)
        self.p_train_no.setFont(font)
        self.p_train_no.setText("")
        self.p_train_no.setObjectName("p_train_no")
        self.p_prn = QtWidgets.QLabel(self.PrintTktPage)
        self.p_prn.setGeometry(QtCore.QRect(200, 160, 241, 21))
        font = QtGui.QFont()
        font.setPointSize(10)
        self.p_prn.setFont(font)
        self.p_prn.setText("")
        self.p_prn.setObjectName("p_prn")
        self.p_pref = QtWidgets.QLabel(self.PrintTktPage)
        self.p_pref.setGeometry(QtCore.QRect(200, 200, 241, 21))
        font = QtGui.QFont()
        font.setPointSize(10)
        self.p_pref.setFont(font)
        self.p_pref.setText("")
        self.p_pref.setObjectName("p_pref")
        self.p_seats = QtWidgets.QLabel(self.PrintTktPage)
        self.p_seats.setGeometry(QtCore.QRect(200, 240, 241, 21))
        font = QtGui.QFont()
        font.setPointSize(10)
        self.p_seats.setFont(font)
        self.p_seats.setText("")
        self.p_seats.setObjectName("p_seats")

        self.p_fare = QtWidgets.QLabel(self.PrintTktPage)
        self.p_fare.setGeometry(QtCore.QRect(200, 280, 241, 21))
        font = QtGui.QFont()
        font.setPointSize(10)
        self.p_fare.setFont(font)
        self.p_fare.setText("")
        self.p_fare.setObjectName("p_fare")

        self.p_date = QtWidgets.QLabel(self.PrintTktPage)
        self.p_date.setGeometry(QtCore.QRect(200, 320, 241, 21))
        font = QtGui.QFont()
        font.setPointSize(10)
        self.p_date.setFont(font)
        self.p_date.setText("")
        self.p_date.setObjectName("p_date")


        self.PrintBtn = QtWidgets.QPushButton(self.PrintTktPage)
        self.PrintBtn.setGeometry(QtCore.QRect(165, 390, 91, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.PrintBtn.setFont(font)
        self.PrintBtn.setObjectName("PrintBtn")
        self.PrintBtn.clicked.connect(self.cbook)
        self.pushButton_14 = QtWidgets.QPushButton(self.PrintTktPage)
        self.pushButton_14.setGeometry(QtCore.QRect(375, 390, 91, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.pushButton_14.setFont(font)
        self.pushButton_14.setObjectName("pushButton_14")
        self.pushButton_14.clicked.connect(lambda: self.stackedWidget.setCurrentIndex(7))

        self.stackedWidget.addWidget(self.PrintTktPage)
        self.CancelTktPage = QtWidgets.QWidget()
        self.CancelTktPage.setObjectName("CancelTktPage")
        self.label_37 = QtWidgets.QLabel(self.CancelTktPage)
        self.label_37.setGeometry(QtCore.QRect(200, 0, 171, 31))
        font = QtGui.QFont()
        font.setPointSize(14)
        font.setBold(True)
        font.setWeight(75)
        self.label_37.setFont(font)
        self.label_37.setObjectName("label_37")
        self.label_38 = QtWidgets.QLabel(self.CancelTktPage)
        self.label_38.setGeometry(QtCore.QRect(90, 105, 121, 46))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.label_38.setFont(font)
        self.label_38.setObjectName("label_38")
        self.lineEdit_13 = QtWidgets.QLineEdit(self.CancelTktPage)
        self.lineEdit_13.setGeometry(QtCore.QRect(255, 105, 121, 31))
        self.lineEdit_13.setObjectName("lineEdit_13")
        self.pushButton_15 = QtWidgets.QPushButton(self.CancelTktPage)
        self.pushButton_15.setGeometry(QtCore.QRect(130, 240, 121, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.pushButton_15.setFont(font)
        self.pushButton_15.setObjectName("pushButton_15")
        self.pushButton_15.clicked.connect(self.canceltkt)
        self.pushButton_16 = QtWidgets.QPushButton(self.CancelTktPage)
        self.pushButton_16.setGeometry(QtCore.QRect(340, 240, 121, 31))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.pushButton_16.setFont(font)
        self.pushButton_16.setObjectName("pushButton_16")
        self.pushButton_16.clicked.connect(lambda: self.stackedWidget.setCurrentIndex(3))
        self.stackedWidget.addWidget(self.CancelTktPage)
        self.AbtUsPage = QtWidgets.QWidget()
        self.AbtUsPage.setObjectName("AbtUsPage")
        self.label_43 = QtWidgets.QLabel(self.AbtUsPage)
        self.label_43.setGeometry(QtCore.QRect(200, 0, 271, 46))
        font = QtGui.QFont()
        font.setPointSize(16)
        font.setBold(True)
        font.setWeight(75)
        self.label_43.setFont(font)
        self.label_43.setObjectName("label_43")
        self.label_44 = QtWidgets.QLabel(self.AbtUsPage)
        self.label_44.setGeometry(QtCore.QRect(90, 105, 226, 46))
        font = QtGui.QFont()
        font.setPointSize(12)
        font.setBold(True)
        font.setWeight(75)
        self.label_44.setFont(font)
        self.label_44.setObjectName("label_44")
        self.label_45 = QtWidgets.QLabel(self.AbtUsPage)
        self.label_45.setGeometry(QtCore.QRect(375, 105, 226, 46))
        font = QtGui.QFont()
        font.setPointSize(12)
        font.setBold(True)
        font.setWeight(75)
        self.label_45.setFont(font)
        self.label_45.setObjectName("label_45")
        self.label_46 = QtWidgets.QLabel(self.AbtUsPage)
        self.label_46.setGeometry(QtCore.QRect(375, 195, 226, 46))
        font = QtGui.QFont()
        font.setPointSize(12)
        font.setBold(True)
        font.setWeight(75)
        self.label_46.setFont(font)
        self.label_46.setObjectName("label_46")
        self.label_47 = QtWidgets.QLabel(self.AbtUsPage)
        self.label_47.setGeometry(QtCore.QRect(90, 195, 226, 46))
        font = QtGui.QFont()
        font.setPointSize(12)
        font.setBold(True)
        font.setWeight(75)
        self.label_47.setFont(font)
        self.label_47.setObjectName("label_47")
        self.label_48 = QtWidgets.QLabel(self.AbtUsPage)
        self.label_48.setGeometry(QtCore.QRect(375, 285, 226, 46))
        font = QtGui.QFont()
        font.setPointSize(12)
        font.setBold(True)
        font.setWeight(75)
        self.label_48.setFont(font)
        self.label_48.setObjectName("label_48")
        self.label_49 = QtWidgets.QLabel(self.AbtUsPage)
        self.label_49.setGeometry(QtCore.QRect(90, 285, 226, 46))
        font = QtGui.QFont()
        font.setPointSize(12)
        font.setBold(True)
        font.setWeight(75)
        self.label_49.setFont(font)
        self.label_49.setObjectName("label_49")
        self.stackedWidget.addWidget(self.AbtUsPage)
        self.HomeBtn = QtWidgets.QPushButton(self.centralwidget)
        self.HomeBtn.setGeometry(QtCore.QRect(0, 0, 75, 23))
        font = QtGui.QFont()
        font.setBold(True)
        font.setWeight(75)
        self.HomeBtn.setFont(font)
        self.HomeBtn.setObjectName("HomeBtn")
        self.HomeBtn.clicked.connect(lambda: self.stackedWidget.setCurrentIndex(0))
        self.LogOutBtn = QtWidgets.QPushButton(self.centralwidget)
        self.LogOutBtn.setGeometry(QtCore.QRect(70, 0, 75, 23))
        font = QtGui.QFont()
        font.setBold(True)
        font.setWeight(75)
        self.LogOutBtn.setFont(font)
        self.LogOutBtn.setObjectName("LogOutBtn")
        self.LogOutBtn.clicked.connect(self.cleartxt)

        self.LogOutBtn.clicked.connect(lambda: self.stackedWidget.setCurrentIndex(1))
        self.AbtUsBtn = QtWidgets.QPushButton(self.centralwidget)
        self.AbtUsBtn.setGeometry(QtCore.QRect(140, 0, 75, 23))
        font = QtGui.QFont()
        font.setBold(True)
        font.setWeight(75)
        self.AbtUsBtn.setFont(font)
        self.AbtUsBtn.setObjectName("AbtUsBtn")
        self.AbtUsBtn.clicked.connect((lambda: self.stackedWidget.setCurrentIndex(10)))
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtWidgets.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 670, 21))
        self.menubar.setObjectName("menubar")
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtWidgets.QStatusBar(MainWindow)
        self.statusbar.setObjectName("statusbar")
        MainWindow.setStatusBar(self.statusbar)

        self.retranslateUi(MainWindow)
        self.stackedWidget.setCurrentIndex(0)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)

    def retranslateUi(self, MainWindow):
        _translate = QtCore.QCoreApplication.translate
        MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
        self.label_41.setText(_translate("MainWindow", "WELCOME!"))
        self.label.setText(_translate("MainWindow", "USERNAME"))
        self.label_2.setText(_translate("MainWindow", "PASSWORD"))
        self.login.setText(_translate("MainWindow", "LOGIN"))
        self.signup.setText(_translate("MainWindow", "SIGN UP"))
        self.label_3.setText(_translate("MainWindow", "NEW USER?"))
        self.label_4.setText(_translate("MainWindow", "LOGIN HERE"))
        self.label_5.setText(_translate("MainWindow", "NAME"))
        self.label_6.setText(_translate("MainWindow", "AGE"))
        self.label_7.setText(_translate("MainWindow", "USERNAME"))
        self.label_8.setText(_translate("MainWindow", "EMAIL"))
        self.label_9.setText(_translate("MainWindow", "PASSWORD"))
        self.label_10.setText(_translate("MainWindow", "ADDRESS"))
        self.label_11.setText(_translate("MainWindow", "CONFIRM PASSWORD"))
        self.label_12.setText(_translate("MainWindow", "CONTACT"))
        self.label_13.setText(_translate("MainWindow", "        REGISTER HERE"))
        self.submit.setText(_translate("MainWindow", "SUBMIT"))
        self.back_reg.setText(_translate("MainWindow", "BACK"))
        self.clear_reg.setText(_translate("MainWindow", "CLEAR"))
        self.BookTktBtn.setText(_translate("MainWindow", "BOOK TICKET"))
        self.cancTktBtn.setText(_translate("MainWindow", "CANCEL TICKET"))
        self.ExitBtn.setText(_translate("MainWindow", "EXIT"))
        self.label_14.setText(_translate("MainWindow", "      ENTER HERE TO"))
        self.label_16.setText(_translate("MainWindow", "      ENTER HERE TO"))
        self.label_25.setText(_translate("MainWindow", "SELECT OPTION"))
        self.label_21.setText(_translate("MainWindow", "SELECT SOURCE"))
        self.comboBox.setItemText(0, _translate("MainWindow", "SELECT"))
        self.comboBox.setItemText(1, _translate("MainWindow", "MUMBAI"))
        self.comboBox.setItemText(2, _translate("MainWindow", "BANGALORE"))
        self.comboBox.setItemText(3, _translate("MainWindow", "DELHI"))
        self.comboBox.setItemText(4, _translate("MainWindow", "KOLKATA"))
        self.comboBox.setItemText(5, _translate("MainWindow", "HYDERABAD"))
        self.label_22.setText(_translate("MainWindow", "SELECT DESTINATION"))
        self.comboBox_4.setItemText(0, _translate("MainWindow", "SELECT"))
        self.comboBox_4.setItemText(1, _translate("MainWindow", "BANGALORE"))
        self.comboBox_4.setItemText(2, _translate("MainWindow", "DELHI"))
        self.comboBox_4.setItemText(3, _translate("MainWindow", "HYDERABAD"))
        self.comboBox_4.setItemText(4, _translate("MainWindow", "KOLKATA"))
        self.comboBox_4.setItemText(5, _translate("MainWindow", "MUMBAI"))
        self.label_23.setText(_translate("MainWindow", "SELECT DATE"))
        self.SrcTrnBtn.setText(_translate("MainWindow", "SEARCH TRAIN"))
        self.BackBtn.setText(_translate("MainWindow", "BACK"))
        self.label_26.setText(_translate("MainWindow", "SELECT ROUTE"))
        self.label_50.setText(_translate("MainWindow", "TRAINS AVAILABLE"))

        item = self.table.horizontalHeaderItem(0)
        item.setText(_translate("MainWindow", "Train No."))
        item = self.table.horizontalHeaderItem(1)
        item.setText(_translate("MainWindow", "Train Name"))
        item = self.table.horizontalHeaderItem(2)
        item.setText(_translate("MainWindow", "state"))
        item = self.table.horizontalHeaderItem(3)
        item.setText(_translate("MainWindow", "city"))

        self.pushButton.setText(_translate("MainWindow", "NEXT"))
        self.pushButton_2.setText(_translate("MainWindow", "BACK"))
        self.label_18.setText(_translate("MainWindow", "ENTER NAME"))
        self.label_19.setText(_translate("MainWindow", "ENTER AGE"))
        self.label_20.setText(_translate("MainWindow", "SELECT GENDER"))
        self.label_24.setText(_translate("MainWindow", "SELECT TRAIN"))
        self.radioButton.setText(_translate("MainWindow", "MALE"))
        self.radioButton_2.setText(_translate("MainWindow", "FEMALE"))
        self.label_27.setText(_translate("MainWindow", "SELECT CLASS"))
        self.comboBox_5.setItemText(0, _translate("MainWindow", "NO PREFERENCE"))
        self.comboBox_5.setItemText(1, _translate("MainWindow", "FIRST CLASS"))
        self.comboBox_5.setItemText(2, _translate("MainWindow", "SECOND CLASS"))
        self.comboBox_5.setItemText(3, _translate("MainWindow", "SLEEPER"))
        self.MakeBookBtn.setText(_translate("MainWindow", "MAKE BOOKING"))
        self.CancBookBtn.setText(_translate("MainWindow", "CANCEL"))
        self.label_17.setText(_translate("MainWindow", "BOOK TICKET"))
        self.label_28.setText(_translate("MainWindow", "SELECT SEATS:"))
        self.NextBtn.setText(_translate("MainWindow", "NEXT"))
        self.label_39.setText(_translate("MainWindow", "MAKE BOOKING"))
        self.NextBtn_2.setText(_translate("MainWindow", "BACK"))
        self.seat1.setText(_translate("MainWindow", "1"))
        self.seat2.setText(_translate("MainWindow", "2"))
        self.seat3.setText(_translate("MainWindow", "3"))
        self.seat4.setText(_translate("MainWindow", "4"))
        self.seat5.setText(_translate("MainWindow", "5"))
        self.seat6.setText(_translate("MainWindow", "6"))
        self.seat7.setText(_translate("MainWindow", "7"))
        self.seat8.setText(_translate("MainWindow", "8"))
        self.seat9.setText(_translate("MainWindow", "9"))
        self.seat10.setText(_translate("MainWindow", "10"))
        self.seat11.setText(_translate("MainWindow", "11"))
        self.seat12.setText(_translate("MainWindow", "12"))
        self.seat13.setText(_translate("MainWindow", "13"))
        self.seat14.setText(_translate("MainWindow", "14"))
        self.seat15.setText(_translate("MainWindow", "15"))
        self.label_29.setText(_translate("MainWindow", "PRINT TICKET"))
        self.l_name.setText(_translate("MainWindow", "NAME:"))
        self.l_trname.setText(_translate("MainWindow", "TRAIN NAME:"))
        self.l_trno.setText(_translate("MainWindow", "TRAIN NUMBER:"))
        self.l_prnno.setText(_translate("MainWindow", "PRN NO:"))
        self.l_pref.setText(_translate("MainWindow", "PREFERENCE:"))
        self.l_seats.setText(_translate("MainWindow", "SEATS:"))
        self.l_fare.setText(_translate("MainWindow", "FARE"))
        self.l_date.setText(_translate("MainWindow", "DATE:"))
        self.PrintBtn.setText(_translate("MainWindow", "PRINT"))
        self.pushButton_14.setText(_translate("MainWindow", "BACK"))        
        self.label_37.setText(_translate("MainWindow", "CANCEL TICKET"))
        self.label_38.setText(_translate("MainWindow", "ENTER PNR NUMBER"))
        self.pushButton_15.setText(_translate("MainWindow", "CANCEL  TICKET"))
        self.pushButton_16.setText(_translate("MainWindow", "BACK"))
        self.label_43.setText(_translate("MainWindow", "PROJECT TEAM MEMBERS"))
        self.label_44.setText(_translate("MainWindow", "VISHODHAN KRISHNAN"))
        self.label_45.setText(_translate("MainWindow", "117A3061"))
        self.label_46.setText(_translate("MainWindow", "117A3063"))
        self.label_47.setText(_translate("MainWindow", "YASH ZAWAR"))
        self.label_48.setText(_translate("MainWindow", "218A3070"))
        self.label_49.setText(_translate("MainWindow", "HITESH NISHAD"))
        self.HomeBtn.setText(_translate("MainWindow", "HOME"))
        self.LogOutBtn.setText(_translate("MainWindow", "LOG OUT"))
        self.AbtUsBtn.setText(_translate("MainWindow", "ABOUT US"))


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_())
