# help.py

Aller à la documentation de ce fichier.

    00001 #!/usr/bin/python
    00002 # -*- coding: utf-8 -*-
    00003 #       $Id: help.py 47 2011-06-13 10:20:14Z georgesk $
    00004
    00005 licence={}
    00006 licence['en']="""
    00007     file help.py
    00008     this file is part of the project scolasync
    00009
    00010     Copyright (C) 2010 Georges Khaznadar <georgesk@ofset.org>
    00011
    00012     This program is free software: you can redistribute it and/or modify
    00013     it under the terms of the GNU General Public License as published by
    00014     the Free Software Foundation, either version3 of the License, or
    00015     (at your option) any later version.
    00016
    00017     This program is distributed in the hope that it will be useful,
    00018     but WITHOUT ANY WARRANTY; without even the implied warranty of
    00019     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    00020     GNU General Public License for more details.
    00021
    00022     You should have received a copy of the GNU General Public License
    00023     along with this program.  If not, see <http://www.gnu.org/licenses/>.
    00024 """
    00025
    00026 from PyQt4.QtCore import *
    00027 from PyQt4.QtGui import *
    00028 import version
    00029
    00030 class helpWindow(QDialog):
    00031     ##
    00032     #
    00033     #         Le constructeur
    00034     #
    00035     def __init__(self, parent=None):
    00036         QDialog.__init__(self, parent)
    00037         from Ui_help import Ui_Aide
    00038         self.ui=Ui_Aide()
    00039         self.ui.setupUi(self)
    00040         self.ui.labelVersion.setText(QApplication.translate("Main","Version numéro %1.%2",None, QApplication.UnicodeUTF8).arg(version.major(), version.minor()))
    00041         QObject.connect(self.ui.closeButton, SIGNAL("clicked()"), self.close)
    00042
    00043     ##
    00044     #
    00045     #         met en place les textes dans les afficheurs, en fonction de la locale.
    00046     #         le répertoire où sont les textes au format HTML est \b dir.
    00047     #         @param dir le répertoire où sont les fichiers HTML
    00048     #         @param locale la langue choisie
    00049     #
    00050     def loadBrowsers(self, dir, locale):
    00051         self.ui.usageBrowser.setHtml(QUrl("file://"+dir+"/usage_"+locale+".html"))
    00052         self.ui.authorsBrowser.setHtml(QUrl("file://"+dir+"/authors_"+locale+".html"))
    00053         self.ui.licenseBrowser.setHtml(QUrl("file://"+dir+"/license_"+locale+".html"))
    00054         self.ui.languagesBrowser.setHtml(QUrl("file://"+dir+"/languages_"+locale+".html"))
    00055