From 30acbce4041c07c1da993ecc7bdf3a2086ac7c99 Mon Sep 17 00:00:00 2001 From: Pascale Noyret Date: Thu, 6 Mar 2008 13:06:43 +0000 Subject: [PATCH] *** empty log message *** --- AIDE/__init__.py | 6 ++ AIDE/fichiers/{INSTALL => INSTALL.txt} | 0 AIDE/fichiers/{NEWS => NEWS.txt} | 0 AIDE/fichiers/index.html | 4 +- AIDE/viewer.py | 25 +++++ InterfaceQT/qtEficas.py | 2 +- Ui/aideQT.py | 78 +++++++++++++++ Ui/aideQT.ui | 131 +++++++++++++++++++++++++ Ui/makefile | 2 +- 9 files changed, 244 insertions(+), 4 deletions(-) rename AIDE/fichiers/{INSTALL => INSTALL.txt} (100%) rename AIDE/fichiers/{NEWS => NEWS.txt} (100%) create mode 100644 Ui/aideQT.py create mode 100644 Ui/aideQT.ui diff --git a/AIDE/__init__.py b/AIDE/__init__.py index 99db3d63..edcb6b4d 100644 --- a/AIDE/__init__.py +++ b/AIDE/__init__.py @@ -19,3 +19,9 @@ def go2(fichier=None,master=None): o = aide_gui.AIDE_GUI(index,master=master) o.build() return o + +def go3(fichier=None,parent=None): + if not fichier : + pathDoc=os.path.join(os.path.dirname(__file__),"fichiers") + viewer.HTMLQTViewer(parent,pathDoc) + diff --git a/AIDE/fichiers/INSTALL b/AIDE/fichiers/INSTALL.txt similarity index 100% rename from AIDE/fichiers/INSTALL rename to AIDE/fichiers/INSTALL.txt diff --git a/AIDE/fichiers/NEWS b/AIDE/fichiers/NEWS.txt similarity index 100% rename from AIDE/fichiers/NEWS rename to AIDE/fichiers/NEWS.txt diff --git a/AIDE/fichiers/index.html b/AIDE/fichiers/index.html index b61b73ec..a9076e83 100644 --- a/AIDE/fichiers/index.html +++ b/AIDE/fichiers/index.html @@ -10,8 +10,8 @@

EFICAS


-

Installation -

Evolution des versions +

Installation +

Evolution des versions

FAQ

Macros INCLUDE, INCLUDE_MATERIAU et POURSUITE diff --git a/AIDE/viewer.py b/AIDE/viewer.py index b383e3d7..a9ef3aad 100644 --- a/AIDE/viewer.py +++ b/AIDE/viewer.py @@ -4,6 +4,12 @@ import Tkinter import ScrolledText import formatter import htmllib +try : + from aideQT import Aide + from qt import * +except : + class Aide: + pass class TkWriter(formatter.DumbWriter): def __init__(self, text,viewer): @@ -208,6 +214,25 @@ class HTMLViewer: except: pass + +class HTMLQTViewer(Aide): + def __init__(self,parent,pathDoc): + Aide.__init__(self,parent=parent,fl=Qt.WType_Dialog) + self.pathDoc=pathDoc + self.parent=parent + self.url=None + self.home=None + self.historique=Historique() + self.TB1init() + self.TB1.setSource("index.html") + self.show() + + def TB1init(self): + self.TB1.mimeSourceFactory().addFilePath(QString(self.pathDoc)); + + def PBIndexPushed(self): + self.TB1.setSource("index.html") + if __name__ == "__main__": v=HTMLViewer(None) v.display("fichiers/index.html") diff --git a/InterfaceQT/qtEficas.py b/InterfaceQT/qtEficas.py index 93443557..f387b47a 100644 --- a/InterfaceQT/qtEficas.py +++ b/InterfaceQT/qtEficas.py @@ -229,7 +229,7 @@ class Appli(Eficas): def helpAbout(self): import AIDE - AIDE.go() + AIDE.go3(parent=self) def NewInclude(self): self.viewmanager.newIncludeEditor() diff --git a/Ui/aideQT.py b/Ui/aideQT.py new file mode 100644 index 00000000..22156da9 --- /dev/null +++ b/Ui/aideQT.py @@ -0,0 +1,78 @@ +# -*- coding: utf-8 -*- + +# Form implementation generated from reading ui file 'aideQT.ui' +# +# Created: jeu mar 6 14:02:27 2008 +# by: The PyQt User Interface Compiler (pyuic) 3.13 +# +# WARNING! All changes made in this file will be lost! + + +from qt import * + + +class Aide(QWidget): + def __init__(self,parent = None,name = None,fl = 0): + QWidget.__init__(self,parent,name,fl) + + if not name: + self.setName("Aide") + + + AideLayout = QGridLayout(self,1,1,11,6,"AideLayout") + + layout2 = QHBoxLayout(None,0,6,"layout2") + + self.PBIndex = QPushButton(self,"PBIndex") + self.PBIndex.setMinimumSize(QSize(0,30)) + layout2.addWidget(self.PBIndex) + + self.PBBack = QPushButton(self,"PBBack") + self.PBBack.setEnabled(1) + self.PBBack.setMinimumSize(QSize(0,30)) + layout2.addWidget(self.PBBack) + + self.PBForward = QPushButton(self,"PBForward") + self.PBForward.setEnabled(1) + self.PBForward.setMinimumSize(QSize(0,30)) + layout2.addWidget(self.PBForward) + + AideLayout.addLayout(layout2,1,0) + + self.TB1 = QTextBrowser(self,"TB1") + + AideLayout.addMultiCellWidget(self.TB1,0,0,0,1) + spacer1 = QSpacerItem(311,20,QSizePolicy.Expanding,QSizePolicy.Minimum) + AideLayout.addItem(spacer1,1,1) + + self.languageChange() + + self.resize(QSize(602,480).expandedTo(self.minimumSizeHint())) + self.clearWState(Qt.WState_Polished) + + self.connect(self.PBBack,SIGNAL("clicked()"),self.TB1.backward) + self.connect(self.PBForward,SIGNAL("clicked()"),self.TB1.forward) + self.connect(self.PBIndex,SIGNAL("clicked()"),self.TB1.home) + + + def languageChange(self): + self.setCaption(self.__tr("Aide")) + self.PBIndex.setText(self.__tr("Index")) + self.PBBack.setText(self.__tr("Back")) + self.PBForward.setText(self.__tr("Forward")) + + + def PBIndexPushed(self): + print "Aide.PBIndexPushed(): Not implemented yet" + + def PBBackPushed(self): + print "Aide.PBBackPushed(): Not implemented yet" + + def PBForwardPushed(self): + print "Aide.PBForwardPushed(): Not implemented yet" + + def SlotSourceChanged(self): + print "Aide.SlotSourceChanged(): Not implemented yet" + + def __tr(self,s,c = None): + return qApp.translate("Aide",s,c) diff --git a/Ui/aideQT.ui b/Ui/aideQT.ui new file mode 100644 index 00000000..40a8d593 --- /dev/null +++ b/Ui/aideQT.ui @@ -0,0 +1,131 @@ + +Aide + + + Aide + + + + 0 + 0 + 602 + 480 + + + + Aide + + + + unnamed + + + + layout2 + + + + unnamed + + + + PBIndex + + + + 0 + 30 + + + + Index + + + + + PBBack + + + true + + + + 0 + 30 + + + + Back + + + + + PBForward + + + true + + + + 0 + 30 + + + + Forward + + + + + + + TB1 + + + + + spacer1 + + + Horizontal + + + Expanding + + + + 311 + 20 + + + + + + + + PBBack + clicked() + TB1 + backward() + + + PBForward + clicked() + TB1 + forward() + + + PBIndex + clicked() + TB1 + home() + + + + PBIndexPushed() + PBBackPushed() + PBForwardPushed() + SlotSourceChanged() + + + diff --git a/Ui/makefile b/Ui/makefile index 64582e54..3cd68adc 100644 --- a/Ui/makefile +++ b/Ui/makefile @@ -7,7 +7,7 @@ PY_FILES = desChoixCata.py desCommande.py desCommentaire.py desError.py desFormu desInclude.py desListeParam.py desMacro.py desMCFact.py desMCListAjout.py desParam.py \ desPlusieursBase.py desPlusieursInto.py desPoursuite.py desRacine.py desSelectVal.py \ desUniqueASSD.py desUniqueBase.py desUniqueComp.py desUniqueInto.py desUniqueSDCOInto.py \ - desUniqueSDCO.py desVisu.py myMain.py + desUniqueSDCO.py desVisu.py myMain.py aideQT.py %.py:%.ui ${PYUIC} -o $@ $< -- 2.39.2