Example #1
0
class Graphics(Frame):
    def __init__(self, parent):
        Frame.__init__(self, parent)

        self.parent = parent

        self.loginWindow = LoginWindow(parent)

        container = Frame(self)
        container.pack(side="top", fill="both", expand=True)

        self.loginWindow.place(x=0, y=0, relwidth=1, relheight=1)

        self.loginWindow.lift()

        self.initUI()

    def initUI(self):

        self.parent.title("NextGen POS")

        #can do menubar stuff here if we want

    def onExit(self):
        self.quit()
Example #2
0
class SignupWindow(QtWidgets.QMainWindow, SignupWindow.Ui_MainWindow):
    def __init__(self):
        super().__init__()
        self.setupUi(self)
        self.pushButton.clicked.connect(self.SignUpBtn)

    def resizeEvent(self, event):
        self.authenticationField.move(self.centralwidget.width()/2 - self.authenticationField.width()/2,
                                      self.centralwidget.height()/2 - self.authenticationField.height()/2)

    def SignUpBtn(self):
        username = self.usernameEdit.text()
        password = self.passwordEdit.text()
        password_confimation = self.passwordConfimationEdit.text()
        if self.checkUsername(username) and self.checkPassword(password, password_confimation):
            self.loginWin = LoginWindow()
            self.loginWin.show()
            self.close()
        else:
            self.errorMessage.setText("Invalid username or password")

    def checkPassword(self, password, password_confimation):
        return 1

    def checkUsername(self, username):
        return 1
Example #3
0
class MainWindow(QtWidgets.QMainWindow, MainWindow.Ui_MainWindow):
    def __init__(self, token, login):
        super().__init__()
        self.token = token
        self.login = login
        self.setupUi(self)
        self.InfoField.setVisible(False)
        self.storeButton.clicked.connect(self.storeBtn)
        self.profileButton.clicked.connect(self.profileBtn)
        self.statisticButton.clicked.connect(self.statisticBtn)
        self.outButton.clicked.connect(self.outBtn)

    def storeBtn(self):
        print("storeBtn")

    def profileBtn(self):
        self.InfoField.setVisible(False)
        self.InfoField = profile(self.ViewField, self.token, self.login)
        self.resizeEvent()
        self.InfoField.setVisible(True)

    def statisticBtn(self):
        self.InfoField.setVisible(False)
        self.InfoField = statistic(self.ViewField, self.token)
        self.resizeEvent()
        self.InfoField.setVisible(True)

    def resizeEvent(self, event=None):
        self.InfoField.move(self.ViewField.width()/2 - self.InfoField.width()/2,
                            self.ViewField.height()/2 - self.InfoField.height()/2)

    def outBtn(self):
        self.loginWin = LoginWindow()
        self.loginWin.show()
        self.close()
Example #4
0
 def SignUpBtn(self):
     username = self.usernameEdit.text()
     password = self.passwordEdit.text()
     password_confimation = self.passwordConfimationEdit.text()
     if self.checkUsername(username) and self.checkPassword(password, password_confimation):
         self.loginWin = LoginWindow()
         self.loginWin.show()
         self.close()
     else:
         self.errorMessage.setText("Invalid username or password")
Example #5
0
    def __init__(self, parent):
        Frame.__init__(self, parent)

        self.parent = parent

        self.loginWindow = LoginWindow(parent)

        container = Frame(self)
        container.pack(side="top", fill="both", expand=True)

        self.loginWindow.place(x=0, y=0, relwidth=1, relheight=1)

        self.loginWindow.lift()

        self.initUI()
Example #6
0
    def login(self):
        # destroy current window
        self.win.destroy()

        #open the new window
        windowLogin = LoginWindow.LoginWindow()
        windowLogin.add_frame()
Example #7
0
	def __init__(self,parent):
		Frame.__init__(self,parent)
		self.POS = POS().instance
		self.parent = parent

		
		self.mainMenu = MainMenu(parent,self)
		self.loginWindow = LoginWindow(parent,self)
		self.transactionWindow = TransactionWindow(parent,self)
		self.manageUsers = ManageUsersWindow(parent,self)
		self.paymentWindow = PaymentWindow(parent,self)
		self.returnWindow = ReturnWindow(parent,self)
		self.rentalPaymentWindow = RentalPaymentWindow(parent,self)

		container = Frame(self)
		container.pack(side="top", fill="both", expand=True)

		self.mainMenu.place(x=0,y=0,relwidth=1,relheight=1)
		self.loginWindow.place(x=0,y=0,relwidth=1,relheight=1)
		self.transactionWindow.place(x=0,y=0,relwidth=1,relheight=1)
		self.manageUsers.place(x=0,y=0,relwidth=1,relheight=1)
		self.paymentWindow.place(x=0,y=0,relwidth=1,relheight=1)
		self.returnWindow.place(x=0,y=0,relwidth=1,relheight=1)
		self.rentalPaymentWindow.place(x=0,y=0,relwidth=1,relheight=1)

		self.loginWindow.lift()

		self.initUI()
Example #8
0
 def __init__(self):
     """
     """
     self.login = LoginWindow.LoginWindow()
     self.main = None
     self.contacts = {}
     self.conversations = {}
     self.server = None
     self.conversation = None
Example #9
0
    def start(self, server):
        """
        Function that must be called to start this interface

        server -- A reference to the Server object of the application
        """
        self.login = LoginWindow.LoginWindow()
        self.login.setQrCode(server.genUri())
        self.login.show()
Example #10
0
    def __init__(self, parent):
        Frame.__init__(self, parent)
        self.POS = POS().instance
        self.parent = parent

        # Thematic settings
        self.mainColor = "#99ccff"
        self.btnWidth1 = 20
        self.btnWidth2 = 10
        self.btnWidth3 = 40
        self.btnHeight1 = 1
        self.btnFontHeight1 = 9
        self.grey = "#818181"

        self.mainMenu = MainMenu(parent, self)
        self.loginWindow = LoginWindow(parent, self)
        self.transactionWindow = TransactionWindow(parent, self)
        self.manageUsers = ManageUsersWindow(parent, self)
        self.paymentWindow = PaymentWindow(parent, self)
        self.returnWindow = ReturnWindow(parent, self)
        self.rentalPaymentWindow = RentalPaymentWindow(parent, self)

        container = Frame(self)
        container.pack(side="top", fill="both", expand=True)

        self.mainMenu.place(x=0, y=0, relwidth=1, relheight=1)
        self.loginWindow.place(x=0, y=0, relwidth=1, relheight=1)
        self.transactionWindow.place(x=0, y=0, relwidth=1, relheight=1)
        self.manageUsers.place(x=0, y=0, relwidth=1, relheight=1)
        self.paymentWindow.place(x=0, y=0, relwidth=1, relheight=1)
        self.returnWindow.place(x=0, y=0, relwidth=1, relheight=1)
        self.rentalPaymentWindow.place(x=0, y=0, relwidth=1, relheight=1)

        self.loginWindow.lift()

        self.initUI()
Example #11
0
class Graphics(Frame):
	def __init__(self,parent):
		Frame.__init__(self,parent)
		self.POS = POS().instance
		self.parent = parent

		
		self.mainMenu = MainMenu(parent,self)
		self.loginWindow = LoginWindow(parent,self)
		self.transactionWindow = TransactionWindow(parent,self)
		self.manageUsers = ManageUsersWindow(parent,self)
		self.paymentWindow = PaymentWindow(parent,self)
		self.returnWindow = ReturnWindow(parent,self)
		self.rentalPaymentWindow = RentalPaymentWindow(parent,self)

		container = Frame(self)
		container.pack(side="top", fill="both", expand=True)

		self.mainMenu.place(x=0,y=0,relwidth=1,relheight=1)
		self.loginWindow.place(x=0,y=0,relwidth=1,relheight=1)
		self.transactionWindow.place(x=0,y=0,relwidth=1,relheight=1)
		self.manageUsers.place(x=0,y=0,relwidth=1,relheight=1)
		self.paymentWindow.place(x=0,y=0,relwidth=1,relheight=1)
		self.returnWindow.place(x=0,y=0,relwidth=1,relheight=1)
		self.rentalPaymentWindow.place(x=0,y=0,relwidth=1,relheight=1)

		self.loginWindow.lift()

		self.initUI()

	def initUI(self):

		self.parent.title("NextGen POS")

		#can do menubar stuff here if we want

	def onExit(self):
		self.quit()

	def liftLayer(self,layer):
		if layer == "main":
			self.mainMenu.lift()
		elif layer == "login":
			self.loginWindow.lift()
			#add something here to logout as the current user
		elif layer == "transaction":
			self.transactionWindow.lift()
		elif layer == "manageUsers":
			self.manageUsers.lift()
		elif layer == "payment":
			self.paymentWindow.lift()
		elif layer == "return":
			self.returnWindow.lift()
		elif layer == "Rpayment":
			self.rentalPaymentWindow.lift()
Example #12
0
    def __init__(self, parent = None):
        super(LoggedInWindow, self).__init__(parent)

        # NOTE:
        # class configurations
        self.resize(1024, 768)
        self.loginWindow = LoginWindow()
        self.widget = LoggedInWidget(self.loginWindow)
        self.setWindowTitle('rendt')
        self.setWindowIcon(QtGui.QIcon(
            '../../assets/img/rendt_new_logo_square.png'))

        layout = QHBoxLayout()
        layout.addWidget(self.widget)

        widget = QWidget()
        widget.setLayout(layout)

        self.setCentralWidget(self.widget)
        self.centralWidget().layout.setContentsMargins(0, 0, 0, 0)
Example #13
0
 def logOut(self, e):
     self.parent.parent.close()
     loginWindow = LoginWindow.LoginWindow()
     loginWindow.show()
Example #14
0
def main():
    app = QtWidgets.QApplication(sys.argv)
    window = LoginWindow.LoginWindow(windows)
    window.show()
    sys.exit(app.exec())
Example #15
0
 def switchToLogin (self, _window):
     _window.destroy ()
     LoginWindow.LoginWindow ()
Example #16
0
 def openLoginWindow(self, username, password, autoLogin, color):
     self.loginWindow = LoginWindow.LoginWindow(color, self.loginClicked,
                                                self.createClicked)
     if autoLogin is True:
         self.loginWindow.updateCredentials(username, password, autoLogin)
Example #17
0
from DB import DB
import LoginWindow
import SignUp

LoginWindow.LoginWindow()
Example #18
0
import LoginWindow
import sys
if __name__ == "__main__":
    app = LoginWindow.QApplication(sys.argv)
    wind = LoginWindow.LoginWindow()
    wind.show()
    sys.exit(app.exec_())
Example #19
0
 def outBtn(self):
     self.loginWin = LoginWindow()
     self.loginWin.show()
     self.close()
Example #20
0
def init():
    app = QtWidgets.QApplication(sys.argv)
    app.setAttribute(QtCore.Qt.AA_DisableHighDpiScaling, True)
    window = LoginWindow.LoginWindow()
    window.show()
    sys.exit(app.exec_())
Example #21
0
 def OnInit(self):
     self.frame = LoginWindow.LoginFrame()
     #        self.frame = ContactWindow.ContactFrame()
     self.frame.Show()
     #        self.SetTopWindow(self.frame)
     return True
Example #22
0
class Graphics(Frame):
    def __init__(self, parent):
        Frame.__init__(self, parent)
        self.POS = POS().instance
        self.parent = parent

        # Thematic settings
        self.mainColor = "#99ccff"
        self.btnWidth1 = 20
        self.btnWidth2 = 10
        self.btnWidth3 = 40
        self.btnHeight1 = 1
        self.btnFontHeight1 = 9
        self.grey = "#818181"

        self.mainMenu = MainMenu(parent, self)
        self.loginWindow = LoginWindow(parent, self)
        self.transactionWindow = TransactionWindow(parent, self)
        self.manageUsers = ManageUsersWindow(parent, self)
        self.paymentWindow = PaymentWindow(parent, self)
        self.returnWindow = ReturnWindow(parent, self)
        self.rentalPaymentWindow = RentalPaymentWindow(parent, self)

        container = Frame(self)
        container.pack(side="top", fill="both", expand=True)

        self.mainMenu.place(x=0, y=0, relwidth=1, relheight=1)
        self.loginWindow.place(x=0, y=0, relwidth=1, relheight=1)
        self.transactionWindow.place(x=0, y=0, relwidth=1, relheight=1)
        self.manageUsers.place(x=0, y=0, relwidth=1, relheight=1)
        self.paymentWindow.place(x=0, y=0, relwidth=1, relheight=1)
        self.returnWindow.place(x=0, y=0, relwidth=1, relheight=1)
        self.rentalPaymentWindow.place(x=0, y=0, relwidth=1, relheight=1)

        self.loginWindow.lift()

        self.initUI()

    def initUI(self):

        self.parent.title("NextGen POS")

        #can do menubar stuff here if we want

    def onExit(self):
        self.quit()

    def liftLayer(self, layer):
        if layer == "main":
            self.mainMenu.lift()
        elif layer == "login":
            self.loginWindow.lift()
            #add something here to logout as the current user
        elif layer == "transaction":
            self.transactionWindow.lift()
        elif layer == "manageUsers":
            self.manageUsers.lift()
        elif layer == "payment":
            self.paymentWindow.lift()
        elif layer == "return":
            self.returnWindow.lift()
        elif layer == "Rpayment":
            self.rentalPaymentWindow.lift()
def main():
    root = Tk()
    app = LoginWindow(root)
    root.mainloop()
Example #24
0
 def initData(self):
     self.clientThread = None
     self.loginWindow = LoginWindow.LoginWindow(self)
     self.hall = None
     self.chessRoom = None
     self.playerNickname = ""