Skip to content
This repository has been archived by the owner on May 4, 2021. It is now read-only.

Commit

Permalink
Merge branch 'master' of https://github.com/lukasmonk/lucaschess
Browse files Browse the repository at this point in the history
Conflicts:
	Code/QT/PantallaPGN.py
  • Loading branch information
fonkap committed Jan 2, 2017
2 parents 63b7f5d + 9f54481 commit ddc426f
Show file tree
Hide file tree
Showing 103 changed files with 29,416 additions and 127 deletions.
2 changes: 1 addition & 1 deletion Code/Gestor.py
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ def beepExtendido(self, siNuestro=False):
if self.configuracion.siSuenaJugada:
if self.partida.numJugadas():
jg = self.partida.jugada(-1)
self.runSound.playLista(jg.listaSonidos())
self.runSound.playLista(jg.listaSonidos(), siEsperar=True)
elif self.configuracion.siSuenaBeep:
self.runSound.playBeep()

Expand Down
1 change: 0 additions & 1 deletion Code/GestorEntMaq.py
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,6 @@ def masJugada(self, jg, siNuestra):
if not self.siPrimeraJugadaHecha:
self.siPrimeraJugadaHecha = True

# Preguntamos al mono si hay movimiento
if self.siTerminada():
jg.siJaqueMate = jg.siJaque
jg.siAhogado = not jg.siJaque
Expand Down
3 changes: 1 addition & 2 deletions Code/Init.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
DEBUG = False
VERSION = "10.10.1"
VERSION = "10.10.2"

import os
import sys
Expand All @@ -16,7 +16,6 @@
from Code.QT import Gui

def init():
# Needed for feedback
if not DEBUG:
try:
ferr = open("bug.log", "at")
Expand Down
5 changes: 2 additions & 3 deletions Code/QT/Gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,8 @@ def lanzaGUI(procesador):

nico = QTVarios.rondoPuntos()
for k, nombre, porc, author in li:
rotulo = nombre
if porc != "100":
rotulo += " (%s%%)" % porc
if int(porc) < 80:
nombre += " (%s%%)" % porc
menu.opcion(k, nombre, nico.otro())
resp = menu.lanza()
if resp:
Expand Down
7 changes: 4 additions & 3 deletions Code/QT/InfoBase.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def __init__(self):

def listaMotores(self, bloque):
li = [
["Acqua 20180918", "Giovanni Di Maria", "http://www.elektrosoft.it/scacchi/acqua/acqua.asp"],
["Acqua 20160918", "Giovanni Di Maria", "http://www.elektrosoft.it/scacchi/acqua/acqua.asp"],
["Tarrasch ToyEngine Beta V0.905", "Bill Forster", "http://www.triplehappy.com/"],
["Rocinante 2.0", "Antonio Torrecillas", "http://sites.google.com/site/barajandotrebejos/"],
["Roce 0.0390", "Roman Hartmann", "http://www.rocechess.ch/rocee.html"],
Expand All @@ -32,7 +32,7 @@ def listaMotores(self, bloque):
["Clarabit 1.00", "Salvador Pallares Bejarano", "http://sapabe.googlepages.com"],
["Lime v 66", "Richard Allbert", "http://www.geocities.com/taciturn_lemon"],
["Chispa 4.0.3", "Federico Corigliano", "http://chispachess.blogspot.com/"],
["Gaia 3.5", "Jean-Francois Romang, David Rabel", "http://gaiachess.free.fr"],
["Gaïa 3.5", "Jean-Francois Romang, David Rabel", "http://gaiachess.free.fr"],
["Simplex 0.9.8", "Antonio Torrecillas", "http://sites.google.com/site/barajandotrebejos/"],
["Greko 12.9", "Vladimir Medvedev", "http://sourceforge.net/projects/greko"],
["Pawny 0.3.1", "Mincho Georgiev", "http://pawny.netii.net/"],
Expand All @@ -44,7 +44,7 @@ def listaMotores(self, bloque):
["Alaric 707", "Peter Fendrich", "http://alaric.fendrich.se/index.html"],
["Cyrano 06B17", "Harald Johnsen", "http://sites.estvideo.net/tipunch/cyrano/"],
["Daydreamer 1.75 JA", "Aaron Becker", "http://github.com/AaronBecker/daydreamer/downloads"],
["Godel 3.4.9", "Juan Manuel Vazquez", "https://sites.google.com/site/godelchessengine"],
["Gödel 3.4.9", "Juan Manuel Vazquez", "https://sites.google.com/site/godelchessengine"],
["Rhetoric 1.4.3", "Alberto Sanjuan", "http://www.chessrhetoric.com/"],
["Cheng 4 0.39", "Martin Sedlák", "http://www.vlasak.biz/cheng"],
["Glaurung 2.2 JA", "Tord RomsTad", "http://www.glaurungchess.com/"],
Expand All @@ -63,6 +63,7 @@ def listaMotores(self, bloque):
["Gull 3", "Vadim Demichev", "https://sourceforge.net/projects/gullchess/"],
]
li.sort(key=lambda x: x[0])
# Gaia y godel con dos puntos
# for n, a, u in li:
# k = n.split(" ")[0].lower()
# p rint ' ( "%s", "%s", "%s", "%s" ),'%(k,a,n,u)
Expand Down
110 changes: 110 additions & 0 deletions Code/QT/PantallaDatabase.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
from PyQt4 import QtGui

from Code import BookGuide
from Code import DBgames
from Code.QT import Colocacion
from Code.QT import Controles
from Code.QT import Iconos
from Code.QT import QTVarios
from Code.QT import WBG_Games
from Code.QT import WBG_InfoMove
from Code.QT import WBG_Summary

class WBDatabase(QTVarios.WDialogo):
def __init__(self, wParent, procesador):

icono = Iconos.DatabaseC()
extparam = "database"
titulo = _("Database of complete games")
QTVarios.WDialogo.__init__(self, wParent, titulo, icono, extparam)

self.procesador = procesador
self.configuracion = procesador.configuracion

self.dbGames = DBgames.DBgames(self.configuracion.ficheroDBgames)

dicVideo = self.recuperarDicVideo()

self.bookGuide = BookGuide.BookGuide(self)
self.wsummary = WBG_Summary.WSummary(procesador, self, self.dbGames, siMoves=False)

self.wgames = WBG_Games.WGames(procesador, self, self.dbGames, self.wsummary, siMoves=False)

self.registrarGrid(self.wsummary.grid)
self.registrarGrid(self.wgames.grid)

self.ultFocus = None

self.tab = Controles.Tab()
self.tab.nuevaTab(self.wgames, _("Games"))
self.tab.nuevaTab(self.wsummary, _("Summary"))
self.tab.dispatchChange(self.tabChanged)
self.tab.ponTipoLetra(puntos=procesador.configuracion.puntosTB)

self.infoMove = WBG_InfoMove.WInfomove(self, siMoves=False)

self.splitter = splitter = QtGui.QSplitter()
splitter.addWidget(self.tab)
splitter.addWidget(self.infoMove)

layout = Colocacion.H().control(splitter).margen(5)

self.setLayout(layout)

self.recuperarVideo(anchoDefecto=1200, altoDefecto=600)
if not dicVideo:
dicVideo = {
'SPLITTER': [800, 380],
'TREE_1': 25,
'TREE_2': 25,
'TREE_3': 50,
'TREE_4': 661,
}
sz = dicVideo.get("SPLITTER", None)
if sz:
self.splitter.setSizes(sz)

self.inicializa()

def cambiaDBgames(self, fich):
self.dbGames.close()
self.dbGames = DBgames.DBgames(self.configuracion.ficheroDBgames)
self.setdbGames()
self.wsummary.actualizaPV("")

def setdbGames(self):
self.tab.ponValor(0, self.dbGames.rotulo())
self.wsummary.setdbGames(self.dbGames)
self.wgames.setdbGames(self.dbGames)

def tabChanged(self, ntab):
QtGui.QApplication.processEvents()
tablero = self.infoMove.tablero
tablero.desactivaTodas()
if ntab == 0:
self.wgames.actualiza()
else:
self.wsummary.gridActualiza()

def inicializa(self):
self.wsummary.setInfoMove(self.infoMove)
self.wgames.setInfoMove(self.infoMove)
self.setdbGames()
self.wsummary.actualizaPV("")
self.wgames.actualiza(True)

def terminar(self):
self.salvar()
self.accept()

def salvar(self):
dicExten = {
"SPLITTER": self.splitter.sizes(),
}

self.guardarVideo(dicExten)

self.dbGames.close()

def closeEvent(self, event):
self.salvar()
Loading

0 comments on commit ddc426f

Please sign in to comment.