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 __init__(self, tabsAnalisis, procesador, dbstat): QtGui.QWidget.__init__(self) self.tabsAnalisis = tabsAnalisis self.pv = None self.bookGuide = self self.dbstat = dbstat self.wsummary = WBG_Summary.WSummaryBase(procesador, dbstat) layout = Colocacion.H().control(self.wsummary) self.setLayout(layout)
def __init__(self, wParent, procesador, fenM2inicial=None, pvInicial=None): icono = Iconos.BookGuide() extparam = "edicionMyOwnBook" titulo = _("Personal Opening Guide") QTVarios.WDialogo.__init__(self, wParent, titulo, icono, extparam) self.procesador = procesador self.configuracion = procesador.configuracion self.fenM2inicial = fenM2inicial self.pvInicial = pvInicial self.bookGuide = BookGuide.BookGuide(self) self.dbGames = DBgames.DBgames(self.configuracion.ficheroDBgames) dicVideo = self.recuperarDicVideo() self.wmoves = WBG_Moves.WMoves(procesador, self) self.wsummary = WBG_Summary.WSummary(procesador, self, self.dbGames) self.wgames = WBG_Games.WGames(procesador, self, self.dbGames, self.wsummary) self.registrarGrid(self.wsummary.grid) self.registrarGrid(self.wgames.grid) self.ultFocus = None self.splitterMoves = QtGui.QSplitter(self) self.splitterMoves.setOrientation(QtCore.Qt.Vertical) self.splitterMoves.addWidget(self.wmoves) self.splitterMoves.addWidget(self.wsummary) self.tab = Controles.Tab() self.tab.nuevaTab(self.splitterMoves, _("Moves")) self.tab.nuevaTab(self.wgames, _("Games")) self.tab.dispatchChange(self.tabChanged) self.infoMove = WBG_InfoMove.WInfomove(self) self.splitter = splitter = QtGui.QSplitter(self) splitter.addWidget(self.infoMove) splitter.addWidget(self.tab) layout = Colocacion.H().control(splitter).margen(5) self.setLayout(layout) self.wmoves.tree.setFocus() self.recuperarVideo(anchoDefecto=1175) if not dicVideo: dicVideo = { 'SPLITTER': [380, 816], 'TREE_1': 25, 'TREE_2': 25, 'TREE_3': 50, 'TREE_4': 661, 'SPLITTERMOVES': [344, 244] } sz = dicVideo.get("SPLITTER", None) if sz: self.splitter.setSizes(sz) for x in range(1, 6): w = dicVideo.get("TREE_%d" % x, None) if w: self.wmoves.tree.setColumnWidth(x, w) self.inicializa()