def slot_btn_DONE_function(self):
     received = True
     if received:
         self.hide()
         from Main import First_UI
         self.f = First_UI()
         self.f.show()
     else:
         self.DONE.setText(_translate("MainWindow", "DENIED"))
Exemple #2
0
    def slot_btn1_function(self):
        self.hide()

        rpi1 = Edge_Client_RP1()
        rpi1.quit()
        rpi1.init_session()

        from Main import First_UI
        self.f = First_UI()
        self.f.show()
Exemple #3
0
class BYE(QMainWindow):
    def __init__(self):
        super(BYE, self).__init__()
        self.init_ui()

    def init_ui(self):
        self.centralwidget = QtWidgets.QWidget(self)
        self.centralwidget.setObjectName("centralwidget")
        self.resize(450, 600)
        self.setWindowTitle('Bye~')

        self._banner = QtWidgets.QLabel(self)
        self._banner.setGeometry(70, 20, 301, 111)
        font = QtGui.QFont()
        font.setFamily("Comic Sans MS")
        font.setPointSize(48)
        self._banner.setFont(font)
        self._banner.setObjectName("_banner")
        self._banner.show()
        _translate = QtCore.QCoreApplication.translate
        self._banner.setText(_translate("MainWindow", "Bye~"))

        self.btn = QPushButton('Return Welcome', self)
        self.btn.setGeometry(20, 170, 400, 200)
        font = QtGui.QFont()
        font.setFamily("Comic Sans MS")
        font.setPointSize(36)
        self.btn.setFont(font)
        self.btn.clicked.connect(self.slot_btn1_function)

        self.setCentralWidget(self.centralwidget)
        self.statusbar = QtWidgets.QStatusBar(self)
        self.statusbar.setObjectName("statusbar")
        self.setStatusBar(self.statusbar)

        QtCore.QMetaObject.connectSlotsByName(self)

    def slot_btn1_function(self):
        self.hide()

        rpi1 = Edge_Client_RP1()
        rpi1.quit()
        rpi1.init_session()

        from Main import First_UI
        self.f = First_UI()
        self.f.show()
Exemple #4
0
 def slot_btn1_function(self):
     self.hide()
     from Main import First_UI
     self.f = First_UI()
     self.f.show()
Exemple #5
0
class ui_Menu(QMainWindow):
    def __init__(self):
        super(ui_Menu, self).__init__()
        self.init_ui()
        
    def init_ui(self):
        self.setObjectName("MainWindow")
        self.resize(450, 600)
        self.centralwidget = QtWidgets.QWidget(self)
        self.centralwidget.setObjectName("centralwidget")
        self.Welcome_banner = QtWidgets.QLabel(self.centralwidget)
        self.Welcome_banner.setGeometry(QtCore.QRect(30, 10, 391, 91))
        font = QtGui.QFont()
        font.setFamily("Comic Sans MS")
        font.setPointSize(60)
        self.Welcome_banner.setFont(font)
        self.Welcome_banner.setObjectName("Welcome_banner")
        
        self.SALE = QtWidgets.QPushButton(self.centralwidget)
        self.SALE.setGeometry(QtCore.QRect(70, 130, 300, 90))
        font = QtGui.QFont()
        font.setFamily("Comic Sans MS")
        font.setPointSize(36)
        self.SALE.setFont(font)
        self.SALE.setObjectName("SALE")
        
        self.MAP = QtWidgets.QPushButton(self.centralwidget)
        self.MAP.setGeometry(QtCore.QRect(70, 240, 300, 90))
        font = QtGui.QFont()
        font.setFamily("Comic Sans MS")
        font.setPointSize(36)
        self.MAP.setFont(font)
        self.MAP.setObjectName("MAP")
        
        self.FIND_ITEM = QtWidgets.QPushButton(self.centralwidget)
        self.FIND_ITEM.setGeometry(QtCore.QRect(70, 350, 300, 90))
        font = QtGui.QFont()
        font.setFamily("Comic Sans MS")
        font.setPointSize(36)
        self.FIND_ITEM.setFont(font)
        self.FIND_ITEM.setObjectName("FIND_ITEM")
        
        self.CART = QtWidgets.QPushButton(self.centralwidget)
        self.CART.setGeometry(QtCore.QRect(70, 460, 300, 90))
        font = QtGui.QFont()
        font.setFamily("Comic Sans MS")
        font.setPointSize(36)
        self.CART.setFont(font)
        self.CART.setObjectName("CART")
        
        self.setCentralWidget(self.centralwidget)
        self.statusbar = QtWidgets.QStatusBar(self)
        self.statusbar.setObjectName("statusbar")
        self.setStatusBar(self.statusbar)

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

        self.SALE.clicked.connect(self.slot_btn_SALE_function)
        self.MAP.clicked.connect(self.slot_btn_MAP_function)
        self.FIND_ITEM.clicked.connect(self.slot_btn_FIND_ITEM_function)
        self.CART.clicked.connect(self.slot_btn_CART_function)

    def slot_btn_SALE_function(self):
        self.hide()
        from TopSale import ui_Top_Sale
        self.f = ui_Top_Sale()
        self.f.show()
        
    def slot_btn_MAP_function(self):
        self.hide()
        from Main import First_UI
        self.f = First_UI()
        self.f.show()    
    def slot_btn_FIND_ITEM_function(self):
        self.hide()
        from Main import First_UI
        self.f = First_UI()
        self.f.show()
    
    def slot_btn_CART_function(self):
        self.hide()
        from Main import First_UI
        self.f = First_UI()
        self.f.show()

    def retranslateUi(self, MainWindow):
        _translate = QtCore.QCoreApplication.translate
        MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
        self.Welcome_banner.setText(_translate("MainWindow", "Welcome!"))
        self.SALE.setText(_translate("MainWindow", "TOP SALE"))
        self.MAP.setText(_translate("MainWindow", "MAP"))
        self.FIND_ITEM.setText(_translate("MainWindow", "FIND ITEM"))
        self.CART.setText(_translate("MainWindow", "CART"))
 def slot_btn1_function(self):
     self.hide()
     self.f = First_UI()
     self.f.show()
class ui_Pay(QMainWindow):
    def __init__(self):
        super(ui_Pay, self).__init__()
        self.init_ui()

    def init_ui(self):
        MainWindow = self
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(450, 600)
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.Welcome_banner = QtWidgets.QLabel(self.centralwidget)
        self.Welcome_banner.setGeometry(QtCore.QRect(110, 10, 251, 91))
        font = QtGui.QFont()
        font.setFamily("Comic Sans MS")
        font.setPointSize(40)
        self.Welcome_banner.setFont(font)
        self.Welcome_banner.setObjectName("Welcome_banner")

        self.RETURN = QtWidgets.QPushButton(self.centralwidget)
        self.RETURN.setGeometry(QtCore.QRect(20, 500, 180, 60))
        font = QtGui.QFont()
        font.setFamily("Comic Sans MS")
        font.setPointSize(36)
        self.RETURN.setFont(font)
        self.RETURN.setObjectName("RETURN")

        self.DONE = QtWidgets.QPushButton(self.centralwidget)
        self.DONE.setGeometry(QtCore.QRect(220, 500, 180, 60))
        font = QtGui.QFont()
        font.setFamily("Comic Sans MS")
        font.setPointSize(36)
        self.DONE.setFont(font)
        self.DONE.setObjectName("DONE")

        self.QR_code = QtWidgets.QLabel(self.centralwidget)
        self.QR_code.setGeometry(QtCore.QRect(80, 130, 281, 291))
        font = QtGui.QFont()
        font.setFamily("Comic Sans MS")
        font.setPointSize(20)
        self.QR_code.setFont(font)
        self.QR_code.setObjectName("QR_code")
        MainWindow.setCentralWidget(self.centralwidget)
        self.statusbar = QtWidgets.QStatusBar(MainWindow)
        self.statusbar.setObjectName("statusbar")
        MainWindow.setStatusBar(self.statusbar)

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

        self.RETURN.clicked.connect(self.slot_btn_Return_function)
        self.DONE.clicked.connect(self.slot_btn_DONE_function)

    def slot_btn_DONE_function(self):
        received = True
        if received:
            self.hide()
            from Main import First_UI
            self.f = First_UI()
            self.f.show()
        else:
            self.DONE.setText(_translate("MainWindow", "DENIED"))

    def slot_btn_Return_function(self):
        self.hide()
        from Menu import ui_Menu
        self.f = ui_Menu()
        self.f.show()

    def retranslateUi(self, MainWindow):
        _translate = QtCore.QCoreApplication.translate
        MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
        self.Welcome_banner.setText(_translate("MainWindow", "Payment"))
        self.RETURN.setText(_translate("MainWindow", "Return"))
        self.DONE.setText(_translate("MainWindow", "DONE"))

        data = json.load(open('session.json', 'r', encoding='utf-8'))
        QR_code = data["QR_code"]
        self.QR_code.setText(_translate("MainWindow", QR_code))