def config(self): menu = QTVarios.LCMenu(self) smenu = menu.submenu(_("Tactics"), Iconos.Tacticas()) go_fast = self.tol.go_fast dico = {True: Iconos.Aceptar(), False: Iconos.PuntoAmarillo()} smenu.opcion("t_false", _("Stop after solve"), dico[not go_fast]) smenu.opcion("t_true", _("Jump to the next after solve"), dico[go_fast]) menu.separador() menu.opcion("remove", _("Remove all results of all levels"), Iconos.Cancelar()) resp = menu.lanza() if resp: if resp.startswith("t_"): self.tol.go_fast = resp == "t_true" TurnOnLights.write_tol(self.tol) elif resp == "remove": if not QTUtil2.pregunta( self, _("Are you sure you want to delete all results of all levels and start again from scratch?" )): return TurnOnLights.remove_tol(self.tol) self.reinit = True self.guardarVideo() self.accept()
def rebuild(self): if not QTUtil2.pregunta( self, _("Are you sure you want to delete all results of all levels and start again from scratch?" )): return if self.one_line: self.tol.new() else: TurnOnLights.remove_tol(self.tol) self.reinit = True self.guardarVideo() self.accept()
def rebuild(self): if not QTUtil2.pregunta(self, _( "Are you sure you want to delete all results of all levels and start again from scratch?")): return if self.one_line: self.tol.new() else: TurnOnLights.remove_tol(self.tol) if self.tol.name.startswith("uwe_easy"): TurnOnLights.compruebaUweEasy(self.procesador.configuracion, self.tol.name) self.reinit = True self.guardarVideo() self.accept()