def voltarHome(id, type): MainWindow.close() if type == "administrador": homeAdm.startHomeAdm(id) else: homeServidor.startHomeServidor(id)
def logar(): email = tela.lineEmail.text() senha = tela.lineSenha.text() if email == "": raise ValueError if senha == "": raise ValueError id, type = database.autenticar(email, senha) if id == None: raise UserWarning if type == "professor": MainWindow.close() homeProfessor.startHomeProfessor(id) elif type == "servidor": MainWindow.close() homeServidor.startHomeServidor(id) elif type == "administrador": MainWindow.close() homeAdm.startHomeAdm(id)
def voltarHome(id, type): MainWindow.close() homeAdm.startHomeAdm(id)