def __init__(self): self.newDialog = QtWidgets.QMainWindow() self.new_screen = New() self.new_screen.setupUi(self.newDialog) self.EvaluateWindow = QtWidgets.QMainWindow() self.eval_screen = Eva() self.eval_screen.setupUi(self.EvaluateWindow) self.openDialog = QtWidgets.QMainWindow() self.open_screen = Open() self.open_screen.setupUi(self.openDialog)
def __init__(self): # linking files and creating objects self.new_Window = QtWidgets.QMainWindow() self.new_screen = New() self.new_screen.setupUi(self.new_Window) self.evaluate_Window = QtWidgets.QMainWindow() self.eval_screen = Eva() self.eval_screen.setupUi(self.evaluate_Window) self.open_Window = QtWidgets.QMainWindow() self.open_screen = Open() self.open_screen.setupUi(self.open_Window)
def execute(self): barsize = 100 title = ' *' + self.repo.ghrepo + '* ' bar = (barsize - len(title)) / 2 ret = '\n\n' + ('_' * bar) + title + ('_' * bar) + '\n' title = ' *Tempo de espera* ' bar = (barsize - len(title)) / 2 ret += '\n\n' + ('_' * bar) + title + ('_' * bar) + '\n' command = Leadtime(self.repo, self.text) setattr(command, 'average', self.average) setattr(command, 'tags', self.tags) setattr(command, 'full', self.full) setattr(command, 'from_date', self.from_date) setattr(command, 'to_date', self.to_date) ret += command.execute() title = ' *Vazão* ' bar = (barsize - len(title)) / 2 ret += '\n\n' + ('_' * bar) + title + ('_' * bar) + '\n' command = Throughput(self.repo, self.text) setattr(command, 'average', self.average) setattr(command, 'tags', self.tags) setattr(command, 'full', self.full) setattr(command, 'from_date', self.from_date) setattr(command, 'to_date', self.to_date) ret += command.execute() title = ' *Backlog atual* ' bar = (barsize - len(title)) / 2 ret += '\n\n' + ('_' * bar) + title + ('_' * bar) + '\n' command = Open(self.repo, self.text) setattr(command, 'tags', self.tags) ret += command.execute() title = ' *Retrospectivas* ' bar = (barsize - len(title)) / 2 ret += '\n\n' + ('_' * bar) + title + ('_' * bar) + '\n' command = Retro(self.repo, self.text) ret += command.execute() title = ' *APR* ' bar = (barsize - len(title)) / 2 ret += '\n\n' + ('_' * bar) + title + ('_' * bar) + '\n' command = Apr(self.repo, self.text) ret += command.execute() title = ' *FIM* ' bar = (barsize - len(title)) / 2 ret += '\n\n' + ('_' * bar) + title + ('_' * bar) + '\n' return ret
def __init__(self): #NEW self.newDialog = QtWidgets.QMainWindow() self.new_screen = New() self.new_screen.setupUi(self.newDialog) #EVALUATE self.EvaluateWindow = QtWidgets.QMainWindow() self.eval_screen = Eva() self.eval_screen.setupUi(self.EvaluateWindow) #OPEN self.openDialog = QtWidgets.QMainWindow() self.open_screen = Open() self.open_screen.setupUi(self.openDialog)
class main: # TODOS AS 'TABELAS' bc = "contact" bcom = "command" bcar = "car" ba = "aprendizado" bt = "teach" # salvando no bd # dados = {"letra": "B", "descricao": "Eu vou falar aqui tudo sobre a letra B!"} # controller.register('teach/portugues', dados) # list = controller.list(bcom) # print (list) op = Open() op.youtube("Luccas Neto")
def print_time(threadName, delay, counter, cad): while counter: time.sleep(delay) list = controller.list(threadName) if (counter == 1): fim = 0 if (list != 0): aux = len(list) else: aux = 0 # print list if (fim < aux): i = 1 for key in sorted(list.keys(), reverse=True): if (counter != 1): if (i == 1): result = list[key] if (threadName == "car"): move = result.get(u'move') outroTest = test.motor(move) print(outroTest) elif (threadName == "command"): execute = result.get(u'execute') quebrar = execute.split(" ") tam = len(quebrar) if (quebrar[0] == "assistir"): if thread2.isAlive(): print("Matei thread2") thread2.kill() elif threadaux.isAlive(): print("Matei AUX") threadaux.kill() op = Open() x = 1 palavra = "" while x < tam: palavra = palavra + quebrar[x] + " " x += 1 if thread2.isAlive(): print("Deixei vivo AUX") threadaux.start() elif threadaux.isAlive(): print("Deixei vivo 2") thread2.start() op.youtube(palavra) elif (quebrar[0] == "pesquisar"): op = Open() x = 1 palavra = "" while x < tam: palavra = palavra + quebrar[x] + " " x += 1 op.google(palavra) elif (quebrar[0] == "aprender"): if (tam > 1): if (quebrar[1] == "portugues"): if (tam > 3): pt = controller.list(bt + "/portugues") for key in sorted(pt.keys()): letra = pt[key] qLetra = letra.get(u'letra') if (qLetra == quebrar[3]): descricaoLetra = letra.get( u'descricao') print(descricaoLetra) voice.fala(descricaoLetra) else: voice.fala( "Voce nao informou uma letra para aprender" ) else: voice.fala( "Você não disse o que deseja aprender") elif (quebrar[0] == "ligar"): x = 1 palavra = "" while x < tam: palavra = palavra + quebrar[x] + " " x += 1 print("estou ligando para ", palavra) fim = aux i += 1 counter += 1