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()
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
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()
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 __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 login(self): # destroy current window self.win.destroy() #open the new window windowLogin = LoginWindow.LoginWindow() windowLogin.add_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 __init__(self): """ """ self.login = LoginWindow.LoginWindow() self.main = None self.contacts = {} self.conversations = {} self.server = None self.conversation = None
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()
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()
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()
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)
def logOut(self, e): self.parent.parent.close() loginWindow = LoginWindow.LoginWindow() loginWindow.show()
def main(): app = QtWidgets.QApplication(sys.argv) window = LoginWindow.LoginWindow(windows) window.show() sys.exit(app.exec())
def switchToLogin (self, _window): _window.destroy () LoginWindow.LoginWindow ()
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)
from DB import DB import LoginWindow import SignUp LoginWindow.LoginWindow()
import LoginWindow import sys if __name__ == "__main__": app = LoginWindow.QApplication(sys.argv) wind = LoginWindow.LoginWindow() wind.show() sys.exit(app.exec_())
def outBtn(self): self.loginWin = LoginWindow() self.loginWin.show() self.close()
def init(): app = QtWidgets.QApplication(sys.argv) app.setAttribute(QtCore.Qt.AA_DisableHighDpiScaling, True) window = LoginWindow.LoginWindow() window.show() sys.exit(app.exec_())
def OnInit(self): self.frame = LoginWindow.LoginFrame() # self.frame = ContactWindow.ContactFrame() self.frame.Show() # self.SetTopWindow(self.frame) return True
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()
def initData(self): self.clientThread = None self.loginWindow = LoginWindow.LoginWindow(self) self.hall = None self.chessRoom = None self.playerNickname = ""