7 this file is part of the project scolasync
9 Copyright (C) 2010-2015 Georges Khaznadar <georgesk@debian.org>
11 This program is free software: you can redistribute it and/or modify
12 it under the terms of the GNU General Public License as published by
13 the Free Software Foundation, either version3 of the License, or
14 (at your option) any later version.
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with this program. If not, see <http://www.gnu.org/licenses/>.
28 from globaldef
import _dir
29 from xml.dom.minidom
import parse
37 QDialog.__init__(self, parent)
38 from Ui_help
import Ui_Aide
41 self.ui.labelVersion.setText(QApplication.translate(
"Main",
"Version numéro {major}.{minor}",
None).format(major=version.major(), minor=version.minor()))
43 self.ui.closeButton.clicked.connect(self.close)
53 self.ui.usageBrowser.setHtml(QUrl(
"file://"+dir+
"/usage_"+locale+
".html"))
54 self.ui.authorsBrowser.setHtml(QUrl(
"file://"+dir+
"/authors_"+locale+
".html"))
55 self.ui.licenseBrowser.setHtml(QUrl(
"file://"+dir+
"/license_"+locale+
".html"))
56 self.ui.languagesBrowser.setHtml(QUrl(
"file://"+dir+
"/languages_"+locale+
".html"))
59 manuals=parse(dir+
"/manual_"+locale+
".html")
60 dl=manuals.documentElement.getElementsByTagName(
"dl")[0]
61 dd=dl.getElementsByTagName(
"dd")[1]
62 a=dd.getElementsByTagName(
"a")[0]
63 a.setAttribute(
"href", self.parent().manFileLocation)
65 self.ui.manualBrowser.setText(manuals.toxml())
def __init__
Le constructeur.
def loadBrowsers(self, dir, locale)
met en place les textes dans les afficheurs, en fonction de la locale.