Exemple #1
0
 def gitmenu(self, newadmin):
     from musterigiris import Ui_musterigiris
     self.mainWindow = QtWidgets.QMainWindow()
     self.ui = Ui_musterigiris()
     self.ui.setupUi(self.mainWindow)
     self.mainWindow.show()
     self.Form.close()  # önceki sayfayı kapatmak için
Exemple #2
0
 def gitmenu(self):
     from menu import Ui_menu
     self.mainWindow = QtWidgets.QMainWindow()
     self.ui = Ui_menu()
     self.ui.setupUi(self.mainWindow)
     self.mainWindow.show()
     self.Form.close()  # önceki sayfayı kapatmak için
Exemple #3
0
class Ui_giris(object):
    def setupUi(self, giris):
        self.Form = giris
        giris.setObjectName("giris")
        giris.resize(810, 468)
        giris.setStyleSheet("#giris{ \n"
                            "background-image: url(:/newPrefix/pizza.jpg)\n"
                            "}\n"
                            "\n"
                            "")
        self.pushButton = QtWidgets.QPushButton(giris)
        self.pushButton.setGeometry(QtCore.QRect(50, 190, 701, 101))
        self.pushButton.setStyleSheet(
            ".QPushButton{\n"
            "font: 30pt \"Ink Free\";\n"
            "border-radius: 30px;\n"
            "background: rgb(170, 170, 255);\n"
            "}\n"
            "\n"
            "\n"
            ".QPushButton:hover\n"
            "{\n"
            " \n"
            "    background-color: rgb(100, 100, 255);\n"
            "}\n"
            "")
        self.pushButton.setObjectName("pushButton")

        self.retranslateUi(giris)
        QtCore.QMetaObject.connectSlotsByName(giris)
        self.pushButton.clicked.connect(self.gitmusterigiris)

    def retranslateUi(self, giris):
        _translate = QtCore.QCoreApplication.translate
        giris.setWindowTitle(_translate("giris", "Form"))
        self.pushButton.setText(
            _translate("giris", " Click Here and Come To Pizza"))

    def gitmusterigiris(self):
        from musterigiris import Ui_musterigiris
        self.mainWindow = QtWidgets.QMainWindow()
        self.ui = Ui_musterigiris()
        self.ui.setupUi(self.mainWindow)
        self.mainWindow.show()
        self.Form.close()  #önceki sayfayı kapatmak için
Exemple #4
0
class Ui_newadmin(object):
    def setupUi(self, newadmin):
        newadmin.setObjectName("newadmin")
        newadmin.resize(651, 550)
        self.pushButton_4 = QtWidgets.QPushButton(newadmin)
        self.pushButton_4.setGeometry(QtCore.QRect(530, 10, 101, 41))
        font = QtGui.QFont()
        font.setFamily("8514oem")
        font.setPointSize(17)
        font.setBold(False)
        font.setItalic(False)
        font.setWeight(50)
        self.pushButton_4.setFont(font)
        self.pushButton_4.setStyleSheet(
            ".QPushButton\n"
            "{\n"
            "background: rgb(170,170, 255);\n"
            "\n"
            "font: 17pt \"8514oem\";\n"
            "border-radius: 10px;\n"
            "}\n"
            "\n"
            ".QPushButton:hover\n"
            "{\n"
            "     background-color: rgb(100, 150, 255);\n"
            "}\n"
            "")
        self.pushButton_4.setAutoDefault(False)
        self.pushButton_4.setObjectName("pushButton_4")
        self.pushButton_5 = QtWidgets.QPushButton(newadmin)
        self.pushButton_5.setGeometry(QtCore.QRect(380, 380, 121, 31))
        self.pushButton_5.setStyleSheet(
            ".QPushButton\n"
            "{\n"
            "background: rgb(170,170, 255);\n"
            "\n"
            "font: 15pt \"8514oem\";\n"
            "border-radius: 10px;\n"
            "}\n"
            "\n"
            ".QPushButton:hover\n"
            "{\n"
            "     background-color: rgb(100, 150, 255);\n"
            "}\n"
            "")
        self.pushButton_5.setAutoDefault(False)
        self.pushButton_5.setObjectName("pushButton_5")
        #  self.pushButton_6 = QtWidgets.QPushButton(newadmin)
        # self.pushButton_6.setGeometry(QtCore.QRect(380, 430, 121, 31))
        #self.pushButton_6.setStyleSheet(".QPushButton\n"
        #"{\n"
        #"background: rgb(170,170, 255);\n"
        #"\n"
        #"font: 15pt \"8514oem\";\n"
        #"border-radius: 10px;\n"
        #"}\n"
        #"\n"
        #".QPushButton:hover\n"
        #"{\n"
        #"     background-color: rgb(100, 150, 255);\n"
        #"}\n"
        #"")
        #       self.pushButton_6.setAutoDefault(False)
        #      self.pushButton_6.setObjectName("pushButton_6")
        self.pushButton_7 = QtWidgets.QPushButton(newadmin)
        self.pushButton_7.setGeometry(QtCore.QRect(380, 480, 121, 31))
        self.pushButton_7.setStyleSheet(
            ".QPushButton\n"
            "{\n"
            "background: rgb(170,170, 255);\n"
            "\n"
            "font: 15pt \"8514oem\";\n"
            "border-radius: 10px;\n"
            "}\n"
            "\n"
            ".QPushButton:hover\n"
            "{\n"
            "     background-color: rgb(100, 150, 255);\n"
            "}\n"
            "")
        self.pushButton_7.setAutoDefault(False)
        self.pushButton_7.setObjectName("pushButton_7")
        #    self.pushButton_8 = QtWidgets.QPushButton(newadmin)
        #   self.pushButton_8.setGeometry(QtCore.QRect(360, 50, 121, 31))
        #  self.pushButton_8.setStyleSheet(".QPushButton\n"
        #"{\n"
        #"background: rgb(170,170, 255);\n"
        #"\n"
        #"font: 15pt \"8514oem\";\n"
        #"border-radius: 10px;\n"
        #"}\n"
        #"\n"
        #".QPushButton:hover\n"
        #"{\n"
        #"     background-color: rgb(100, 150, 255);\n"
        #"}\n"
        #"")
        #       self.pushButton_8.setAutoDefault(False)
        #      self.pushButton_8.setObjectName("pushButton_8")
        self.tableWidget = QtWidgets.QTableWidget(newadmin)
        self.tableWidget.setGeometry(QtCore.QRect(30, 110, 501, 192))
        self.tableWidget.setObjectName("tableWidget")
        self.tableWidget.setColumnCount(4)
        self.tableWidget.setRowCount(0)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(0, item)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(1, item)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(2, item)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(3, item)
        self.label_4 = QtWidgets.QLabel(newadmin)
        self.label_4.setGeometry(QtCore.QRect(70, 370, 60, 27))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.label_4.setFont(font)
        self.label_4.setObjectName("label_4")
        self.label_5 = QtWidgets.QLabel(newadmin)
        self.label_5.setGeometry(QtCore.QRect(50, 490, 101, 27))
        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(newadmin)
        self.label_6.setGeometry(QtCore.QRect(50, 410, 111, 27))
        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(newadmin)
        self.label_7.setGeometry(QtCore.QRect(50, 450, 101, 27))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.label_7.setFont(font)
        self.label_7.setObjectName("label_7")
        self.textEdit = QtWidgets.QTextEdit(newadmin)
        self.textEdit.setGeometry(QtCore.QRect(160, 370, 171, 31))
        self.textEdit.setObjectName("textEdit")
        self.textEdit_2 = QtWidgets.QTextEdit(newadmin)
        self.textEdit_2.setGeometry(QtCore.QRect(160, 410, 171, 31))
        self.textEdit_2.setObjectName("textEdit_2")
        self.textEdit_3 = QtWidgets.QTextEdit(newadmin)
        self.textEdit_3.setGeometry(QtCore.QRect(160, 450, 171, 31))
        self.textEdit_3.setObjectName("textEdit_3")
        self.textEdit_4 = QtWidgets.QTextEdit(newadmin)
        self.textEdit_4.setGeometry(QtCore.QRect(160, 490, 171, 31))
        self.textEdit_4.setObjectName("textEdit_4")
        #self.textEdit_5 = QtWidgets.QTextEdit(newadmin)
        #self.textEdit_5.setGeometry(QtCore.QRect(170, 50, 171, 31))
        # self.textEdit_5.setObjectName("textEdit_5")
        self.label_8 = QtWidgets.QLabel(newadmin)
        self.label_8.setGeometry(QtCore.QRect(70, 50, 91, 27))
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.label_8.setFont(font)
        self.label_8.setObjectName("label_8")
        self.pushButton_9 = QtWidgets.QPushButton(newadmin)
        self.pushButton_9.setGeometry(QtCore.QRect(60, 320, 121, 31))
        self.pushButton_9.setStyleSheet(
            ".QPushButton\n"
            "{\n"
            "background: rgb(170,170, 255);\n"
            "\n"
            "font: 15pt \"8514oem\";\n"
            "border-radius: 10px;\n"
            "}\n"
            "\n"
            ".QPushButton:hover\n"
            "{\n"
            "     background-color: rgb(100, 150, 255);\n"
            "}\n"
            "")
        self.pushButton_9.setAutoDefault(False)
        self.pushButton_9.setObjectName("pushButton_9")

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

        self.Form = newadmin
        self.pushButton_5.clicked.connect(lambda: self.adminekle(newadmin))
        self.pushButton_4.clicked.connect(lambda: self.gitmenu(newadmin))
        self.pushButton_9.clicked.connect(lambda: self.uyelist(newadmin))
        self.pushButton_7.clicked.connect(lambda: self.delete(newadmin))


#        self.pushButton_8.clicked.connect(self.ara)

#self.pushButton_6.clicked.connect(self.update)
#self.tableWidget.itemSelectionChanged.connect(self.goster)

    def retranslateUi(self, newadmin):
        _translate = QtCore.QCoreApplication.translate
        newadmin.setWindowTitle(_translate("newadmin", "Form"))
        self.pushButton_4.setText(_translate("newadmin", "BACK"))
        self.pushButton_5.setText(_translate("newadmin", "ADD"))
        #self.pushButton_6.setText(_translate("newadmin", "UPDATE"))
        self.pushButton_7.setText(_translate("newadmin", "DELETE"))
        #self.pushButton_8.setText(_translate("newadmin", "SEARCH"))
        item = self.tableWidget.horizontalHeaderItem(0)
        item.setText(_translate("newadmin", "name"))
        item = self.tableWidget.horizontalHeaderItem(1)
        item.setText(_translate("newadmin", "surname"))
        item = self.tableWidget.horizontalHeaderItem(2)
        item.setText(_translate("newadmin", "username"))
        item = self.tableWidget.horizontalHeaderItem(3)
        item.setText(_translate("newadmin", "password"))
        self.label_4.setText(_translate("newadmin", "Name :"))
        self.label_5.setText(_translate("newadmin", "Password :"******"newadmin", "Surname :"))
        self.label_7.setText(_translate("newadmin", "Username :"******"newadmin", "Username"))
        self.pushButton_9.setText(_translate("newadmin", "DISPLAY"))

        self.tableWidget.doubleClicked.connect(self.tiklanmisSatir)

    def tiklanmisSatir(self):
        print("Table clicked")

    def adminekle(self, newadmin):
        import veribaglan
        name = self.textEdit.toPlainText()
        surname = self.textEdit_2.toPlainText()
        username = self.textEdit_3.toPlainText()
        password = self.textEdit_4.toPlainText()

        veri = veribaglan.musteriekle(name, surname, username, password)
        results = QMessageBox.warning(newadmin, 'New Admin',
                                      'added succesfully')
        newadmin.show()
        if not veri:
            return

    def ara(self):
        searchroll = ""
        searchroll = self.textEdit_5.toPlainText()
        try:
            conn = sqlite3.connect("pizza.db")
            c = conn.cursor()
            result = c.execute("SELECT * FROM musteri WHERE username= "******"no find")

    def arama(self):
        searchroll = ""
        searchroll = self.textEdit_5.toPlainText()
        try:
            conn = sqlite3.connect("pizza.db")
            c = conn.cursor()
            result = c.execute("SELECT * FROM musteri WHERE username= "******"pizza.db")
        query = "SELECT * FROM musteri"
        result = self.connection.execute(query)
        self.tableWidget.setRowCount(0)
        for row_number, row_data in enumerate(result):
            self.tableWidget.insertRow(row_number)
            for column_number, data in enumerate(row_data):
                self.tableWidget.setItem(row_number, column_number,
                                         QTableWidgetItem(str(data)))
        self.connection.close()

    def delete(self, newadmin):
        conn = sqlite3.connect('pizza.db')
        curs = conn.cursor()
        content = 'SELECT *FROM musteri'
        res = curs.execute(content)
        for row in enumerate(res):
            if row[0] == self.tableWidget.currentRow():
                data = row[1]
                name = data[0]
                surname = data[1]
                curs.execute(
                    '''DELETE FROM musteri WHERE name=? AND surname=?''',
                    (name, surname))
                conn.commit()
        result = QMessageBox.warning(newadmin, 'Message', 'Deleted User!')
Exemple #5
0
class Ui_about(object):
    def setupUi(self, about):
        about.setObjectName("about")
        about.resize(697, 363)
        about.setStyleSheet("#about{\n"
                            "border-image: url(:/newPrefix/pizza.jpg);\n"
                            "}")
        self.pushButton_3 = QtWidgets.QPushButton(about)
        self.pushButton_3.setGeometry(QtCore.QRect(200, 30, 291, 71))
        self.pushButton_3.setStyleSheet(
            ".QPushButton{\n"
            "font: 20pt \"Ink Free\";\n"
            "border-radius: 30px;\n"
            "background: rgb(170, 170, 255);\n"
            "}\n"
            "\n"
            "\n"
            ".QPushButton:hover\n"
            "{\n"
            " \n"
            "    background-color: rgb(100, 100, 255);\n"
            "}\n"
            "")
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(":/newPrefix/order.png"),
                       QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pushButton_3.setIcon(icon)
        self.pushButton_3.setIconSize(QtCore.QSize(35, 35))
        self.pushButton_3.setObjectName("pushButton_3")
        self.textEdit = QtWidgets.QTextEdit(about)
        self.textEdit.setGeometry(QtCore.QRect(50, 120, 611, 201))
        font = QtGui.QFont()
        font.setPointSize(13)
        self.textEdit.setFont(font)
        self.textEdit.setObjectName("textEdit")
        self.pushButton_4 = QtWidgets.QPushButton(about)
        self.pushButton_4.setGeometry(QtCore.QRect(580, 10, 101, 41))
        font = QtGui.QFont()
        font.setFamily("8514oem")
        font.setPointSize(17)
        font.setBold(False)
        font.setItalic(False)
        font.setWeight(50)
        self.pushButton_4.setFont(font)
        self.pushButton_4.setStyleSheet(
            ".QPushButton\n"
            "{\n"
            "background: rgb(170,170, 255);\n"
            "\n"
            "font: 17pt \"8514oem\";\n"
            "border-radius: 10px;\n"
            "}\n"
            "\n"
            ".QPushButton:hover\n"
            "{\n"
            "     background-color: rgb(100, 150, 255);\n"
            "}\n"
            "")
        self.pushButton_4.setAutoDefault(False)
        self.pushButton_4.setObjectName("pushButton_4")

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

        self.Form = about
        self.pushButton_4.clicked.connect(self.gitmenu)

    def retranslateUi(self, about):
        _translate = QtCore.QCoreApplication.translate
        about.setWindowTitle(_translate("about", "Form"))
        self.pushButton_3.setText(_translate("about", "ABOUT"))
        self.textEdit.setHtml(
            _translate(
                "about",
                "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
                "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
                "p, li { white-space: pre-wrap; }\n"
                "</style></head><body style=\" font-family:\'MS Shell Dlg 2\'; font-size:13pt; font-weight:400; font-style:normal;\">\n"
                "<p align=\"center\" style=\"-qt-paragraph-type:empty; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; line-height:30px; background-color:#ffffff;\"><br /></p>\n"
                "<p align=\"center\" style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; line-height:30px; background-color:#ffffff;\"><span style=\" font-family:\'Hind Vadodara,sans-serif\'; font-size:14pt; color:#505061; background-color:#ffffff;\">1996 yılında Türkiyede ilk şubesini Istanbul, Ulus\'ta açan Come To Pizza\'s Türkiye olarak şu an, İstanbul, İzmir, Ankara ve Bursa başta olmak üzere 69 ile yayılmış 530 şubemiz ile Türkiye pizza endüstrisine öncülük ediyoruz. </span></p></body></html>"
            ))
        self.pushButton_4.setText(_translate("about", "BACK"))

    def gitmenu(self):
        from musterigiris import Ui_musterigiris
        self.mainWindow = QtWidgets.QMainWindow()
        self.ui = Ui_musterigiris()
        self.ui.setupUi(self.mainWindow)
        self.mainWindow.show()
        self.Form.close()  # önceki sayfayı kapatmak için
Exemple #6
0
class Ui_listmenu(object):
    def setupUi(self, listmenu):
        listmenu.setObjectName("listmenu")
        listmenu.resize(686, 809)
        listmenu.setStyleSheet("#listmenu{\n"
                               "border-image: url(resim/list.jpg);\n"
                               "}")
        self.pushButton_4 = QtWidgets.QPushButton(listmenu)
        self.pushButton_4.setGeometry(QtCore.QRect(330, 70, 101, 41))
        font = QtGui.QFont()
        font.setFamily("8514oem")
        font.setPointSize(17)
        font.setBold(False)
        font.setItalic(False)
        font.setWeight(50)
        self.pushButton_4.setFont(font)
        self.pushButton_4.setStyleSheet(
            ".QPushButton\n"
            "{\n"
            "background: rgb(170,170, 255);\n"
            "\n"
            "font: 17pt \"8514oem\";\n"
            "border-radius: 10px;\n"
            "}\n"
            "\n"
            ".QPushButton:hover\n"
            "{\n"
            "     background-color: rgb(100, 150, 255);\n"
            "}\n"
            "")
        self.pushButton_4.setAutoDefault(False)
        self.pushButton_4.setObjectName("pushButton_4")
        self.pushButton_5 = QtWidgets.QPushButton(listmenu)
        self.pushButton_5.setGeometry(QtCore.QRect(450, 70, 131, 41))
        font = QtGui.QFont()
        font.setFamily("8514oem")
        font.setPointSize(18)
        font.setBold(False)
        font.setItalic(False)
        font.setWeight(50)
        self.pushButton_5.setFont(font)
        self.pushButton_5.setStyleSheet(
            ".QPushButton\n"
            "{\n"
            "background: rgb(170,170, 255);\n"
            "\n"
            "font: 18pt \"8514oem\";\n"
            "border-radius: 10px;\n"
            "}\n"
            "\n"
            ".QPushButton:hover\n"
            "{\n"
            "     background-color: rgb(100, 150, 255);\n"
            "}\n"
            "")
        self.pushButton_5.setAutoDefault(False)
        self.pushButton_5.setObjectName("pushButton_5")
        self.tableWidget = QtWidgets.QTableWidget(listmenu)
        self.tableWidget.setGeometry(QtCore.QRect(180, 150, 311, 411))
        self.tableWidget.setObjectName("tableWidget")
        self.tableWidget.setColumnCount(2)
        self.tableWidget.setRowCount(0)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(0, item)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(1, item)
        self.pushButton_9 = QtWidgets.QPushButton(listmenu)
        self.pushButton_9.setGeometry(QtCore.QRect(120, 590, 121, 31))
        self.pushButton_9.setStyleSheet(
            ".QPushButton\n"
            "{\n"
            "background: rgb(170,170, 255);\n"
            "\n"
            "font: 15pt \"8514oem\";\n"
            "border-radius: 10px;\n"
            "}\n"
            "\n"
            ".QPushButton:hover\n"
            "{\n"
            "     background-color: rgb(100, 150, 255);\n"
            "}\n"
            "")
        self.pushButton_9.setAutoDefault(False)
        self.pushButton_9.setObjectName("pushButton_9")
        self.pushButton_6 = QtWidgets.QPushButton(listmenu)
        self.pushButton_6.setGeometry(QtCore.QRect(270, 590, 121, 31))
        self.pushButton_6.setStyleSheet(
            ".QPushButton\n"
            "{\n"
            "background: rgb(170,170, 255);\n"
            "\n"
            "font: 15pt \"8514oem\";\n"
            "border-radius: 10px;\n"
            "}\n"
            "\n"
            ".QPushButton:hover\n"
            "{\n"
            "     background-color: rgb(100, 150, 255);\n"
            "}\n"
            "")
        self.pushButton_6.setAutoDefault(False)
        self.pushButton_6.setObjectName("pushButton_6")
        self.pushButton_7 = QtWidgets.QPushButton(listmenu)
        self.pushButton_7.setGeometry(QtCore.QRect(420, 590, 121, 31))
        self.pushButton_7.setStyleSheet(
            ".QPushButton\n"
            "{\n"
            "background: rgb(170,170, 255);\n"
            "\n"
            "font: 15pt \"8514oem\";\n"
            "border-radius: 10px;\n"
            "}\n"
            "\n"
            ".QPushButton:hover\n"
            "{\n"
            "     background-color: rgb(100, 150, 255);\n"
            "}\n"
            "")
        self.pushButton_7.setAutoDefault(False)
        self.pushButton_7.setObjectName("pushButton_7")
        self.lineEdit = QtWidgets.QLineEdit(listmenu)
        self.lineEdit.setGeometry(QtCore.QRect(200, 660, 131, 31))
        self.lineEdit.setObjectName("lineEdit")
        self.lineEdit.setPlaceholderText('NAME')

        self.lineEdit_2 = QtWidgets.QLineEdit(listmenu)
        self.lineEdit_2.setGeometry(QtCore.QRect(360, 660, 131, 31))
        self.lineEdit_2.setObjectName("lineEdit_2")
        self.lineEdit_2.setPlaceholderText('COST')

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

        self.Form = listmenu
        self.pushButton_4.clicked.connect(self.gitmenu)
        self.pushButton_5.clicked.connect(self.gitmusterigiris)
        self.pushButton_6.clicked.connect(lambda: self.ekle(listmenu))
        self.pushButton_7.clicked.connect(lambda: self.sil(listmenu))
        self.pushButton_9.clicked.connect(lambda: self.goster(listmenu))

    def retranslateUi(self, listmenu):
        _translate = QtCore.QCoreApplication.translate
        listmenu.setWindowTitle(_translate("listmenu", "Form"))
        self.pushButton_4.setText(_translate("listmenu", "BACK"))
        self.pushButton_5.setText(_translate("listmenu", "LOGOUT"))
        item = self.tableWidget.horizontalHeaderItem(0)
        item.setText(_translate("listmenu", "name"))
        item = self.tableWidget.horizontalHeaderItem(1)
        item.setText(_translate("listmenu", "cost"))
        self.pushButton_9.setText(_translate("listmenu", "DISPLAY"))
        self.pushButton_6.setText(_translate("listmenu", "ADD"))
        self.pushButton_7.setText(_translate("listmenu", "DELETE"))

    def gitmenu(self):
        from menu import Ui_menu
        self.mainWindow = QtWidgets.QMainWindow()
        self.ui = Ui_menu()
        self.ui.setupUi(self.mainWindow)
        self.mainWindow.show()
        self.Form.close()  # önceki sayfayı kapatmak için

    def gitmusterigiris(self):
        from musterigiris import Ui_musterigiris
        self.mainWindow = QtWidgets.QMainWindow()
        self.ui = Ui_musterigiris()
        self.ui.setupUi(self.mainWindow)
        self.mainWindow.show()
        self.Form.close()  # önceki sayfayı kapatmak için

    def ekle(self, listmenu):
        import veribaglan
        username = self.lineEdit.text()
        cost = self.lineEdit_2.text()

        results = QMessageBox.warning(listmenu, 'LIST', 'added menu')
        listmenu.show()
        veri = veribaglan.ekle(username, cost)

        if not veri:
            return

    def sil(self, listmenu):
        conn = sqlite3.connect('pizza.db')
        curs = conn.cursor()
        content = 'SELECT *FROM list'
        res = curs.execute(content)
        for row in enumerate(res):
            if row[0] == self.tableWidget.currentRow():
                data = row[1]
                name = data[0]
                cost = data[1]
                curs.execute('''DELETE FROM list WHERE name=? AND cost=?''',
                             (name, cost))
                conn.commit()
        result = QMessageBox.warning(listmenu, 'Message', 'Deleted Menu!')

    def goster(self, listmenu):
        self.connection = sqlite3.connect("pizza.db")
        query = "SELECT * FROM list"
        result = self.connection.execute(query)
        self.tableWidget.setRowCount(0)
        for row_number, row_data in enumerate(result):
            self.tableWidget.insertRow(row_number)
            for column_number, data in enumerate(row_data):
                self.tableWidget.setItem(row_number, column_number,
                                         QTableWidgetItem(str(data)))
        self.connection.close()