def initialStatus(self, partialBoard): if (self.load_views is None) or (self.load_views != root_path()): self.reset_clothing() self.loadViewAlternatives() self.load_views = root_path() self.boardV = BoardViewer(self, parseABoardString(partialBoard), self.mainW.getClothing()) self.boardV.setParent(self.ui.boardViewer) self.ui.boardViewer.removeTab(0) self.ui.boardViewer.insertTab(0, self.boardV, i18n('Board')) self.setPressAKeyState() self.init_switcher()
def __init__(self): super(AboutWidget, self).__init__() self.version = QtCore.QString( utils.read_file(os.path.join(root_path(), 'version'))) self.setModal(True) icon = QtGui.QIcon(':/logoGobstones.png') self.setWindowIcon(icon) self.setWindowTitle(i18n("About")) logoHtml = "" logoHtml += ("<div align = 'center'>" '<img src=":/logoHelp.png">' "</div>") versionHtml = "" versionHtml += ('<div align = "center">' "<h3>PyGobstones</h3>" "<p>Versión " + self.version + "</p>".decode('utf8') + "<p>" + i18n("Developed with Python and PyQt") + "</p>" "</div>") logo = QtGui.QLabel(logoHtml) version = QtGui.QLabel(versionHtml) hLayout = QtGui.QHBoxLayout() hLayout.addWidget(logo) hLayout.addWidget(version) tabs = QtGui.QTabWidget(self) tabs.tabBar().setStyleSheet( "background-color:'white'; color:'#4682b4'; border:2px solid #4682b4; font-size:15px" ) tabs.tabBar().setAttribute(QtCore.Qt.WA_TranslucentBackground) about = self.openAndReturnHelpFile( os.path.join(root_path(), 'about_files', 'about.html')) authors = self.openAndReturnHelpFile( os.path.join(root_path(), 'about_files', 'authors.html')) history = self.openAndReturnHelpFile( os.path.join(root_path(), 'about_files', 'history.html')) tabs.addTab(about, _fromUtf8("")) tabs.addTab(authors, _fromUtf8("")) tabs.addTab(history, _fromUtf8("")) tabs.setTabText(0, i18n("About")) tabs.setTabText(1, i18n("Authors")) tabs.setTabText(2, i18n("History")) vLayout = QtGui.QVBoxLayout() vLayout.addLayout(hLayout) vLayout.addWidget(tabs) self.setLayout(vLayout)
def __init__(self): super(AboutWidget, self).__init__() self.version = QtCore.QString(utils.read_file(os.path.join(root_path(), 'version'))) self.setModal(True) icon = QtGui.QIcon(':/logoGobstones.png') self.setWindowIcon(icon) self.setWindowTitle(i18n("About")) logoHtml = "" logoHtml += ( "<div align = 'center'>" '<img src=":/logoHelp.png">' "</div>" ) versionHtml = "" versionHtml += ( '<div align = "center">' "<h3>PyGobstones</h3>" "<p>Versión " + self.version + "</p>".decode('utf8') + "<p>" + i18n("Developed with Python and PyQt") + "</p>" "</div>" ) logo = QtGui.QLabel(logoHtml) version = QtGui.QLabel(versionHtml) hLayout = QtGui.QHBoxLayout() hLayout.addWidget(logo) hLayout.addWidget(version) tabs = QtGui.QTabWidget(self) tabs.tabBar().setStyleSheet("background-color:'white'; color:'#4682b4'; border:2px solid #4682b4; font-size:15px") tabs.tabBar().setAttribute(QtCore.Qt.WA_TranslucentBackground) about = self.openAndReturnHelpFile(os.path.join(root_path(), 'about_files','about.html')) authors = self.openAndReturnHelpFile(os.path.join(root_path(), 'about_files','authors.html')) history = self.openAndReturnHelpFile(os.path.join(root_path(), 'about_files','history.html')) tabs.addTab(about, _fromUtf8("")) tabs.addTab(authors, _fromUtf8("")) tabs.addTab(history, _fromUtf8("")) tabs.setTabText(0, i18n("About")) tabs.setTabText(1, i18n("Authors")) tabs.setTabText(2, i18n("History")) vLayout = QtGui.QVBoxLayout() vLayout.addLayout(hLayout) vLayout.addWidget(tabs) self.setLayout(vLayout)
def __init__(self): super(CommandHelpWidget, self).__init__() self.setModal(True) self.setWindowTitle(i18n('User guide editor board')) tabs = QtGui.QTabWidget(self) tabs.tabBar().setStyleSheet("background-color:'white'; color:'#4682b4'; border:2px solid #4682b4; font-size:15px") tabs.tabBar().setAttribute(QtCore.Qt.WA_TranslucentBackground) command = self.openAndReturnHelpFile(os.path.join(root_path(), 'about_files','command_editor.html')) tabs.addTab(command, _fromUtf8("")) tabs.setTabText(0, i18n("commands enables")) vLayout = QtGui.QVBoxLayout() vLayout.addWidget(tabs) self.setLayout(vLayout)
def __init__(self): super(CommandHelpWidget, self).__init__() self.setModal(True) self.setWindowTitle(i18n('User guide editor board')) tabs = QtGui.QTabWidget(self) tabs.tabBar().setStyleSheet( "background-color:'white'; color:'#4682b4'; border:2px solid #4682b4; font-size:15px" ) tabs.tabBar().setAttribute(QtCore.Qt.WA_TranslucentBackground) command = self.openAndReturnHelpFile( os.path.join(root_path(), 'about_files', 'command_editor.html')) tabs.addTab(command, _fromUtf8("")) tabs.setTabText(0, i18n("commands enables")) vLayout = QtGui.QVBoxLayout() vLayout.addWidget(tabs) self.setLayout(vLayout)
def __init__(self): super(MainWindow, self).__init__() self.logger = logging.getLogger() self.ui = Ui_MainWindow() self.ui.setupUi(self) self.initOptions() self.initMenuBarActions() self.initSignalsAndSlots() self.ui.actionStop.setEnabled(False) self.clothing = 'Gobstones.xml' self.lang = GOBSTONES self.initWindowTitle() self.initPreferencesDictionary() self.initLoggerSize() self.initialBoardGenerator = InitialBoardGenerator() self.guiInterpreterHandler = GUIInterpreterHandler(self) self.programRun = ProgramRun(self.getLang(), self.guiInterpreterHandler) self.rootDirectory = root_path() self.runButton = RunButton(self, self.ui.actionRun, self.ui.actionStop) self.setStyleSheet( "QMainWindow{background-image:url(':/backgroundWidget.png')}")