From: Pascale Noyret Date: Tue, 28 Aug 2007 10:02:25 +0000 (+0000) Subject: PN pour sauvegarde X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=180f8d9afc8b8a2c9bc5c65c8abab9a0c41d07b3;p=tools%2Feficas.git PN pour sauvegarde --- diff --git a/InterfaceQT/compocommandecomm.py b/InterfaceQT/compocommandecomm.py index bd17f0bf..c28756a9 100644 --- a/InterfaceQT/compocommandecomm.py +++ b/InterfaceQT/compocommandecomm.py @@ -47,7 +47,7 @@ class COMMANDE_COMMTreeItem(Objecttreeitem.ObjectTreeItem): - la fonte dans laquelle afficher ce texte - la couleur du texte """ - return 'commantaire' + return 'commentaire' def get_valeur(self): """ @@ -83,7 +83,6 @@ class COMMANDE_COMMTreeItem(Objecttreeitem.ObjectTreeItem): """ try: commande,nom = self.object.uncomment() - print "uuuuuuuuuuuuuuuu" #self.parent.children[pos].select() except Exception,e: traceback.print_exc() diff --git a/InterfaceQT/compomacro.py b/InterfaceQT/compomacro.py index e59138f1..9e0c2321 100644 --- a/InterfaceQT/compomacro.py +++ b/InterfaceQT/compomacro.py @@ -24,29 +24,38 @@ class MACRONode(browser.JDCNode,typeNode.PopUpMenuNode): class MACROTreeItem(compooper.EtapeTreeItem): - """ Cette classe hérite d'une grande partie des comportements - de la classe compooper.EtapeTreeItem - """ - itemNode=MACRONode +# """ Cette classe hérite d'une grande partie des comportements +# de la classe compooper.EtapeTreeItem +# """ + itemNode=MACRONode + +# ------------------------------------ +# Classes necessaires à INCLUDE +# ------------------------------------ class INCLUDETreeItemBase(MACROTreeItem): - def __init__(self,appli, labeltext, object, setfunction): - MACROTreeItem.__init__(self,appli, labeltext, object, setfunction) + def __init__(self,appli, labeltext, object, setfunction): + MACROTreeItem.__init__(self,appli, labeltext, object, setfunction) - def iscopiable(self): - """ - Retourne 1 si l'objet est copiable, 0 sinon - """ - return 0 + def iscopiable(self): + """ + Retourne 1 si l'objet est copiable, 0 sinon + """ + return 0 class INCLUDENode(browser.JDCNode,typeNode.PopUpMenuNode): -## def getPanel(self): -## """ -## """ -## return INCLUDEPanel( self, self.editor ) - + def getPanel(self): + from monIncludePanel import MonIncludePanel + return MonIncludePanel (self,parent=self.editor ) + + def createPopUpMenu(self): + typeNode.PopUpMenuNode.createPopUpMenu(self) + self.menu.insertItem( qApp.translate('Browser','Edit'), self.makeEdit ) + self.menu.insertItem( qApp.translate('Browser','View'), self.makeView ) + + def makeEdit(self): #,appli,node if self.item.object.text_converted == 0: # Le texte du fichier inclus n'a pas pu etre converti par le module convert @@ -59,10 +68,6 @@ class INCLUDENode(browser.JDCNode,typeNode.PopUpMenuNode): self.item.object.build_include(None,"") # On cree un nouvel onglet dans le bureau -## appli.bureau.ShowJDC( self.item.object.jdc_aux, -## self.item.object.jdc_aux.nom, -## label_onglet=None, -## JDCDISPLAY=macrodisplay.MACRODISPLAY) self.editor.vm.displayJDC( self.item.object.jdc_aux ) #, self.item.object.jdc_aux.nom ) def makeView(self):#,appli,node): @@ -71,10 +76,12 @@ class INCLUDENode(browser.JDCNode,typeNode.PopUpMenuNode): class INCLUDETreeItem(INCLUDETreeItemBase): -## panel=INCLUDEPanel itemNode=INCLUDENode +# ------------------------------------ +# Classes necessaires à POURSUITE +# ------------------------------------ class POURSUITENode(browser.JDCNode, typeNode.PopUpMenuNode): ## def getPanel(self): @@ -168,3 +175,4 @@ import Accas objet=Accas.MACRO_ETAPE #import macrodisplay + diff --git a/InterfaceQT/compooper.py b/InterfaceQT/compooper.py index 5e84c736..1611cea1 100644 --- a/InterfaceQT/compooper.py +++ b/InterfaceQT/compooper.py @@ -55,11 +55,10 @@ class EtapeTreeItem(Objecttreeitem.ObjectTreeItem): Cette classe a entre autres deux attributs importants : - _object qui est un pointeur vers l'objet du noyau - object qui pointe vers l'objet auquel sont délégués les - appels de méthode et les accès aux attributs + appels de méthode et les acces aux attributs Dans le cas d'une ETAPE, _object et object pointent vers le meme objet. """ -## panel = OPERPanel itemNode=Node def IsExpandable(self): @@ -88,7 +87,6 @@ class EtapeTreeItem(Objecttreeitem.ObjectTreeItem): return self.labeltext,None,None else: return self.labeltext, None, None #CS_pbruno todo -## return self.labeltext,fontes.standard_italique,None def get_objet(self,name) : for v in self.object.mc_liste: @@ -113,7 +111,7 @@ class EtapeTreeItem(Objecttreeitem.ObjectTreeItem): def suppitem(self,item) : - # item : item du MOCLE de l'ETAPE à supprimer + # item : item du MOCLE de l'ETAPE a supprimer # item.getObject() = MCSIMP, MCFACT, MCBLOC ou MCList itemobject=item.getObject() if itemobject.isoblig() : diff --git a/InterfaceQT/compoparam.py b/InterfaceQT/compoparam.py index d48b5e66..cfdf276a 100644 --- a/InterfaceQT/compoparam.py +++ b/InterfaceQT/compoparam.py @@ -12,12 +12,20 @@ from qt import * # import modules EFICAS from Editeur import Objecttreeitem from InterfaceQT import browser +from InterfaceQT import typeNode + + +class Node(browser.JDCNode,typeNode.PopUpMenuNode): + def getPanel(self): + """ + """ + from monParamPanel import MonParamPanel + return MonParamPanel(self, parent=self.editor ) + + def createPopUpMenu(self): + typeNode.PopUpMenuNode.createPopUpMenu(self) + -class Node(browser.JDCNode): pass -## def getPanel(self): -## """ -## """ -## return PARAMPanel( self, self.editor ) class PARAMTreeItem(Objecttreeitem.ObjectTreeItem): @@ -26,7 +34,6 @@ class PARAMTreeItem(Objecttreeitem.ObjectTreeItem): qui représente le PARAMETRE """ itemNode=Node -## panel = PARAMPanel def init(self): self.setfunction = self.set_valeur diff --git a/InterfaceQT/compoproc.py b/InterfaceQT/compoproc.py index 862795f4..c128496a 100644 --- a/InterfaceQT/compoproc.py +++ b/InterfaceQT/compoproc.py @@ -2,19 +2,21 @@ from Editeur import Objecttreeitem from InterfaceQT import compooper from InterfaceQT import browser +from InterfaceQT import typeNode from qt import * -class Node(browser.JDCNode): pass -## def getPanel(self): -## """ -## """ -## return PROCPanel( self, self.editor ) +class Node(browser.JDCNode,typeNode.PopUpMenuNode): + def getPanel(self): + from monMacroPanel import MonMacroPanel + return MonMacroPanel(self,parent=self.editor) + + def createPopUpMenu(self): + typeNode.PopUpMenuNode.createPopUpMenu(self) + class ProcEtapeTreeItem(compooper.EtapeTreeItem): itemNode=Node -## panel = PROCPanel - pass import Accas treeitem = ProcEtapeTreeItem diff --git a/InterfaceQT/editor.py b/InterfaceQT/editor.py index 9d25046f..450f1c29 100644 --- a/InterfaceQT/editor.py +++ b/InterfaceQT/editor.py @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- +# -*- coding: iso-8859-1 -*- # Modules Python import types,sys,os @@ -150,7 +150,7 @@ class JDCEditor(QSplitter): self.resize(bnd) self.panel = QWidget(self) - self.connect(self, SIGNAL('modificationChanged(bool)'), self.handleModificationChanged) + #self.connect(self, SIGNAL('modificationChanged(bool)'), self.handleModificationChanged) #-------------------------------------------------------------------# diff --git a/InterfaceQT/eficas.py b/InterfaceQT/eficas.py index 0a9c2a99..731589d0 100644 --- a/InterfaceQT/eficas.py +++ b/InterfaceQT/eficas.py @@ -18,7 +18,6 @@ class UserInterface(Eficas): # Generate the debug server object dbs = DebugServer() - # Create main layout type 4 (floating windows) # Create the view manager depending on the configuration setting diff --git a/InterfaceQT/monIncludePanel.py b/InterfaceQT/monIncludePanel.py new file mode 100644 index 00000000..20334335 --- /dev/null +++ b/InterfaceQT/monIncludePanel.py @@ -0,0 +1,142 @@ +# -*- coding: utf-8 -*- +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== +# Modules Python +# Modules Eficas + +import os +from qt import * +from desMacro import DMacro + +from monMacroPanel import MonMacroPanel + + +# Import des panels + +class MonIncludePanel(MonMacroPanel): + """ + Classe définissant le panel associé aux mots-clés qui demandent + à l'utilisateur de choisir une seule valeur parmi une liste de valeurs + discrètes + """ + def __init__(self,node, parent = None,name = None,fl = 0): + MonMacroPanel.__init__(self,node,parent,name,fl) + if not hasattr(self.node.item.object,'fichier_ini'): + self.ajoutPageBad() + else: + self.ajoutPageOk() + + def ajoutPageOk(self): + self.TabPage = QWidget(self.TWChoix,"TabPage") + self.LENomFichier = QLineEdit(self.TabPage,"LENomFichier") + self.LENomFichier.setGeometry(QRect(18,127,450,30)) + self.textLabel1_3 = QLabel(self.TabPage,"textLabel1_3") + self.textLabel1_3.setGeometry(QRect(70,50,350,41)) + self.BBrowse = QPushButton(self.TabPage,"BBrowse") + self.BBrowse.setGeometry(QRect(288,306,161,41)) + self.TWChoix.insertTab(self.TabPage,QString("")) + self.textLabel1_3.setText(self._DMacro__tr("La commande INCLUDE requiert un nom de Fichier :")) + self.BBrowse.setText(self._DMacro__tr("Browse")) + self.TWChoix.changeTab(self.TabPage,self._DMacro__tr("Fichier Include")) + self.TWChoix.setCurrentPage(2) + + self.LENomFichier.setText(self.node.item.object.fichier_ini) + + self.connect(self.BBrowse,SIGNAL("clicked()"),self.BBrowsePressed) + self.connect(self.LENomFichier,SIGNAL("returnPressed()"),self.LENomFichReturnPressed) + + + def ajoutPageBad(self) : + self.TabPage = QWidget(self.TWChoix,"TabPage") + self.textLabel1_5 = QLabel(self.TabPage,"textLabel1_5") + self.textLabel1_5.setGeometry(QRect(88,96,290,131)) + self.TWChoix.insertTab(self.TabPage,QString("")) + self.textLabel1_5.setText(self._DMacro__trUtf8("\x3c\x66\x6f\x6e\x74\x20\x73\x69\x7a\x65\x3d\x22\x2b\x31\x22\x3e\x3c\x70\x20\x61\x6c\x69\x67\x6e\x3d\x22\x63\x65\x6e\x74\x65\x72\x22\x3e\x4c\x61\x20\x63\x6f\x6d\x6d\x61\x6e\x64\x65\x20\x49\x4e\x43\x4c\x55\x44\x45\x20\x6e\x27\x61\x20\x70\x61\x73\x20\x64\x65\x20\x66\x69\x63\x68\x69\x65\x72\x20\x61\x73\x73\x6f\x63\x69\xc3\xa9\x2e\x0a\x49\x6c\x20\x66\x61\x75\x74\x20\x64\x27\x61\x62\x6f\x72\x64\x20\x63\x68\x6f\x69\x73\x69\x72\x20\x75\x6e\x20\x6e\x75\x6d\xc3\xa9\x72\x6f\x20\x64\x27\x75\x6e\x69\x74\xc3\xa9\x3c\x2f\x70\x3e\x3c\x2f\x66\x6f\x6e\x74\x3e")) + self.TWChoix.changeTab(self.TabPage,self._DMacro__tr("Fichier Include")) + self.TWChoix.setCurrentPage(2) + + + def BBrowsePressed(self): + pass + + def BOkIncPressed (self): + self.LENomFichReturnPressed() + + def LENomFichReturnPressed(self): + nomFichier=str(self.LENomFichier.text()) + if not os.path.isfile(nomFichier) : + commentaire = "Fichier introuvable" + self.Commentaire.setText(QString(commentaire)) + return + + text=self.convert_file(nomFichier) + print text +""" + # Si probleme a la lecture-conversion on arrete le traitement + if not text: + return + + try: + self.node.item.object.change_fichier_init(new_fic,text) + self.parent.appli.affiche_infos("Fichier %s modifié" %self.node.item.get_nom()) + except: + # Erreurs lors de l'evaluation de text dans un JDC auxiliaire + self.parent.appli.affiche_infos("Fichier invalide") + l=traceback.format_exception_only("Fichier invalide",sys.exc_info()[1]) + f=FenetreYesNo(self.parent.appli,titre="Fichier invalide : voulez vous retablir l ancien fichi +er ?", + texte="Erreur dans l'interprétation du nouveau fichier ...\n\n"+string. +join(l), + yes="Retablir",no="Changer") + f.wait() + reponse=f.result + if reponse: + # On retablit l'ancien fichier + self.entry.delete(0,Tkinter.END) + self.node.item.object.restore_fichier_init() + self.parent.appli.affiche_infos("Fichier invalide ... Ancien fichier restauré") + + +""" + + def convert_file(self,file): + """ + Methode pour convertir le fichier file dans le format courant + """ + format=self.parent.appli.format_fichier.get() + if convert.plugins.has_key(format): + # Le convertisseur existe on l'utilise + p=convert.plugins[format]() + p.readfile(file) + text=p.convert('execnoparseur') + if not p.cr.estvide(): + self.parent.appli.affiche_infos("Erreur à la conversion") + Fenetre(self, + titre="compte-rendu d'erreurs, EFICAS ne sait pas convertir ce fichier", + texte = str(p.cr)) + return None + return text + else: + # Il n'existe pas c'est une erreur + self.parent.appli.affiche_infos("Type de fichier non reconnu") + showerror("Type de fichier non reconnu","EFICAS ne sait pas ouvrir ce type de fichier") + return None + + diff --git a/InterfaceQT/monParamPanel.py b/InterfaceQT/monParamPanel.py new file mode 100644 index 00000000..2abe2745 --- /dev/null +++ b/InterfaceQT/monParamPanel.py @@ -0,0 +1,125 @@ +# -*- coding: utf-8 -*- +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== +# Modules Python +import string,types,os,re + +# Modules Eficas +from Aster import prefs + +from qt import * + +from desParam import DParam +from qtCommun import QTPanel +from qtCommun import QTPanelTBW2 + +# Import des panels + +class MonParamPanel(DParam,QTPanelTBW2,QTPanel): + """ + Classe définissant le panel associé aux mots-clés qui demandent + à l'utilisateur de choisir une seule valeur parmi une liste de valeurs + discrètes + """ + def __init__(self,node, parent = None,name = None,fl = 0): + DParam.__init__(self,parent,name,fl) + QTPanel.__init__(self,node,parent) + QTPanelTBW2.__init__(self,node,parent) + self.InitLEs() + + def InitLEs(self): + nom=self.node.item.get_nom() + self.lineEditNom.setText(nom) + valeur=self.node.item.get_valeur() + if valeur != None: + try : + str=QString("").setNum(valeur) + except : + str=QString(valeur) + self.lineEditVal.setText(str) + else : + self.lineEditVal.clear() + + def BOkParamPressed(self): + val=self.LEValeurPressed() + nom=self.LENomPressed() + if not nom : + commentaire="Entrer un nom de parametre" + self.Commentaire.setText(QString(commentaire)) + return + self.node.item.set_nom(nom) + self.node.item.set_valeur(val) + self.node.update_texte() + self.node.update_valid() + self.editor.init_modif() + self.InitLEs() + + def BSupPressed(self): + QTPanel.BSupPressed(self) + + def LEValeurPressed(self): + self.Commentaire.setText(QString("")) + commentaire="Valeur incorrecte" + qtVal=self.lineEditVal.text() + try : + val,boul=QString.toFloat(qtVal) + except : + try : + val,boul=QString.toInt(qtVal) + except : + val=str(qtVal) + boul=1 + if boul: commentaire="Valeur correcte" + self.Commentaire.setText(QString(commentaire)) + return val + + def LENomPressed(self): + self.Commentaire.setText(QString("")) + qtNom=self.lineEditNom.text() + nom=str(qtNom) + numDebutPattern=re.compile('[a-zA-Z]') + if numDebutPattern.match(nom) : + return nom + else : + commentaire="Les noms de parametre doivent commencer par une lettre" + self.Commentaire.setText(QString(commentaire)) + return None + + def BuildTabCommand(self): + QTPanelTBW2.BuildLBNouvCommande(self) + + def LEFiltreTextChanged(self): + QTPanelTBW2.LEFiltreTextChanged(self) + + def LEfiltreReturnPressed(self): + QTPanelTBW2.LEfiltreReturnPressed(self) + + def LBNouvCommandeClicked(self): + QTPanelTBW2.LBNouvCommandeClicked(self) + + def AppelleBuildLBRegles(self): + listeRegles=self.node.item.get_regles() + listeNomsEtapes = self.node.item.get_l_noms_etapes() + self.BuildLBRegles(listeRegles,listeNomsEtapes) + + def BOkPressed(self): + QTPanel.BOkPressed(self) + + diff --git a/InterfaceQT/monRacinePanel.py b/InterfaceQT/monRacinePanel.py index c36411ac..e7b0aeb8 100644 --- a/InterfaceQT/monRacinePanel.py +++ b/InterfaceQT/monRacinePanel.py @@ -39,7 +39,7 @@ class MonRacinePanel(DRac,QTPanelTBW2): def __init__(self,node, parent = None,name = None,fl = 0): DRac.__init__(self,parent,name,fl) QTPanel.__init__(self,node,parent) - QTPanelTBW2.__init__(self,node,parent) + QTPanelTBW2.__init__(self,node,parent,racine=1) def BSupPressed(self): QTPanel.BSupPressed(self) diff --git a/InterfaceQT/qtCommun.py b/InterfaceQT/qtCommun.py index d0502605..7a376c8f 100644 --- a/InterfaceQT/qtCommun.py +++ b/InterfaceQT/qtCommun.py @@ -57,6 +57,10 @@ class QTPanel: self.DefMC() if label==QString("Définition Formule"): self.BOkPressedFormule() + if label==QString("Valeur Parametre"): + self.BOkParamPressed() + if label==QString("Fichier Include"): + self.BOkIncPressed() def AppelleBuildLBRegles(self): listeRegles = self.node.item.get_regles() @@ -127,11 +131,11 @@ class QTPanelTBW2(QTPanel): Gére plus précisement : """ - def __init__(self,node, parent = None): + def __init__(self,node, parent = None, racine = 0): self.editor = parent self.node = node self.BuildLBNouvCommande() - self.AppelleBuildLBRegles() + if racine == 1 : self.AppelleBuildLBRegles() def BuildLBNouvCommande(self): @@ -162,6 +166,7 @@ class QTPanelTBW2(QTPanel): QObject.connect( self.LBNouvCommande, SIGNAL("doubleClicked(QListBoxItem*)"),self.DefCmd ) def DefCmd(self): + if self.LBNouvCommande.selectedItem()== 0 : return name=str(self.LBNouvCommande.selectedItem().text()) if name==QString(" "): return diff --git a/InterfaceQT/qtEficas.py b/InterfaceQT/qtEficas.py index a94621b3..199e82b4 100644 --- a/InterfaceQT/qtEficas.py +++ b/InterfaceQT/qtEficas.py @@ -1,6 +1,5 @@ -""" +# -*- coding: iso-8859-1 -*- -""" import os, sys REPINI=os.path.dirname(os.path.abspath(__file__)) INSTALLDIR=os.path.join(REPINI,'..') @@ -39,8 +38,6 @@ class Appli(Eficas): self.recentMenu = QPopupMenu(self.Fichier) self.Fichier.insertItem(self.trUtf8('Open &Recent Files'), self.recentMenu) self.connect(self.recentMenu,SIGNAL('aboutToShow()'),self.handleShowRecentMenu) - - self.connect(self,PYSIGNAL('preferencesChanged'), self.viewmanager.handlePreferencesChanged) @@ -61,9 +58,21 @@ class Appli(Eficas): self.ficPatrons={} self.initPatrons() self.ihm="QT" + #self.ouvreFichers() + + def ouvreFichiers(self) : + # Ouverture des fichiers de commandes donnes sur la ligne de commande + cwd=os.getcwd() + self.dir=cwd + for study in session.d_env.studies: + os.chdir(cwd) + d=session.get_unit(study,self) + self.viewmanager.handleOpen(fn=study["comm"]) + def initPatrons(self) : + # Mise à jour du menu des fichiers recemment ouverts from Editeur import listePatrons self.listePatrons = listePatrons.listePatrons() idx = 0 @@ -110,7 +119,6 @@ class Appli(Eficas): """ Private method to clear the recent files menu. """ -## self.recent = QStringList() self.viewmanager.recent = QStringList() @@ -171,9 +179,6 @@ class Appli(Eficas): def jdcRapport(self): self.viewmanager.handleViewJdcRapport() - - - if __name__=='__main__': @@ -187,8 +192,6 @@ if __name__=='__main__': del sys.setdefaultencoding # Fin hack - #CS_pbruno note: fait implicitement des trucs ces imports (grr) - #import styles from Editeur import import_code from Editeur import session @@ -200,6 +203,7 @@ if __name__=='__main__': mw = Appli() app.setMainWidget(mw) app.connect(app, SIGNAL("lastWindowClosed()"), app, SLOT("quit()")) + mw.ouvreFichiers() mw.show() res = app.exec_loop() diff --git a/InterfaceQT/qtSaisie.py b/InterfaceQT/qtSaisie.py index 3ec98d3d..d8ddcecd 100644 --- a/InterfaceQT/qtSaisie.py +++ b/InterfaceQT/qtSaisie.py @@ -56,7 +56,7 @@ class SaisieValeur: self.listBoxVal.clear() lChoix=self.node.item.get_liste_possible(listeDejaLa) for valeur in lChoix : - self.listBoxVal.insertItem( valeur ) + self.listBoxVal.insertItem( str(valeur) ) def ClicASSD(self): valeurQstring=self.listBoxASSD.selectedItem().text() diff --git a/InterfaceQT/readercata.py b/InterfaceQT/readercata.py index 2fbe686b..55e34210 100644 --- a/InterfaceQT/readercata.py +++ b/InterfaceQT/readercata.py @@ -302,18 +302,12 @@ class READERCATA: QMessageBox.critical( self.parent, "", "Aucun catalogue déclaré pour %s" %self.code) self.appli.quit() sys.exit(1) - #elif len(liste_choix) == 1: - # self.fic_cata = self.dico_catalogues[liste_choix[0]][2] - # self.version_code = liste_choix[0] - lab=QString("Eficas V1.12 pour ASTER avec le catalogue ") - # lab+=self.version_code - # qApp.mainWidget().setCaption(lab) - # return # création d'une boite de dialogue modale widgetChoix=MonChoixCata(liste_choix,self, self.parent, "", True ) ret=widgetChoix.exec_loop() + lab=QString("Eficas V1.12 pour ASTER avec le catalogue ") if ret == QDialog.Accepted: self.version_cata=str(self.version_cata) self.fic_cata = self.dico_catalogues[self.version_cata][2] @@ -321,6 +315,8 @@ class READERCATA: self.appli.format_fichier.set( self.dico_catalogues[self.version_cata][3] ) lab+=self.version_cata qApp.mainWidget().setCaption(lab) + else : + sys.exit(0) diff --git a/Ui/desInclude.py b/Ui/desInclude.py new file mode 100644 index 00000000..a28c5e55 --- /dev/null +++ b/Ui/desInclude.py @@ -0,0 +1,214 @@ +# -*- coding: utf-8 -*- + +# Form implementation generated from reading ui file 'desInclude.ui' +# +# Created: mar aoû 28 09:57:43 2007 +# by: The PyQt User Interface Compiler (pyuic) 3.13 +# +# WARNING! All changes made in this file will be lost! + + +from qt import * + +image0_data = \ + "\x89\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d" \ + "\x49\x48\x44\x52\x00\x00\x00\x21\x00\x00\x00\x0e" \ + "\x08\x06\x00\x00\x00\xa1\x1e\x75\x8c\x00\x00\x00" \ + "\xcf\x49\x44\x41\x54\x38\x8d\xd5\x94\xdb\x0e\xc3" \ + "\x20\x0c\x43\xed\xfd\xf8\xd8\x97\xbb\x0f\x34\x5b" \ + "\x48\x08\x45\xd5\x1e\xb6\x48\x88\xf4\x12\xe7\x60" \ + "\x01\xc0\x0f\x04\x6f\xd6\xe9\x9b\xba\x77\x20\x04" \ + "\x80\x92\x4a\x10\x32\xc9\x2e\xfb\xd8\xc7\xd5\xca" \ + "\xbc\xc0\x25\x40\x00\x99\xe9\x57\x84\x95\x68\xfe" \ + "\x7f\x06\xc0\xde\xd1\xde\xb3\x2b\x4a\x1e\xc4\xea" \ + "\x82\x4b\x9e\x74\x09\x71\x65\xbd\x01\xf8\x55\x27" \ + "\xf7\x8a\x72\x01\xe0\xa3\x12\x9f\x34\x5a\x01\x7c" \ + "\x54\x3b\xaf\xdc\x98\x3d\x0f\x71\x09\xd1\x5a\x33" \ + "\x1b\x47\x1f\x47\x07\x2c\x17\x49\x4a\x82\x33\x8f" \ + "\x61\x78\x20\x3a\x88\x17\xe6\x73\x06\xb1\xf0\x8b" \ + "\x07\xba\x03\xe6\x02\xc9\xb8\x31\x07\x7e\x37\xe0" \ + "\x20\x9e\x67\xe3\x38\x67\x10\x97\x7b\x17\xde\x80" \ + "\xc1\x85\xad\x38\x69\x5a\x51\xd5\x22\xc8\x2c\xe7" \ + "\x79\x12\xe2\xfe\xd8\xbe\x83\x76\x20\x92\xf5\x2b" \ + "\x18\x20\xdd\x11\xbb\x10\xe5\x65\xb5\x3a\x5a\x3b" \ + "\xba\xff\x13\x07\x13\xd6\x6f\xa6\x98\x18\x57\x06" \ + "\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82" + +class DInc1(QWidget): + def __init__(self,parent = None,name = None,fl = 0): + QWidget.__init__(self,parent,name,fl) + + self.image0 = QPixmap() + self.image0.loadFromData(image0_data,"PNG") + if not name: + self.setName("DInc1") + + self.setMinimumSize(QSize(505,0)) + + + self.Commentaire = QLabel(self,"Commentaire") + self.Commentaire.setGeometry(QRect(10,410,490,20)) + + self.bSup = QPushButton(self,"bSup") + self.bSup.setGeometry(QRect(320,440,142,30)) + self.bSup.setAutoDefault(1) + + self.bOk = QPushButton(self,"bOk") + self.bOk.setGeometry(QRect(170,440,142,30)) + self.bOk.setAutoDefault(1) + self.bOk.setDefault(1) + + self.bHelp = QPushButton(self,"bHelp") + self.bHelp.setGeometry(QRect(10,440,142,30)) + self.bHelp.setAutoDefault(1) + + self.TWChoix = QTabWidget(self,"TWChoix") + self.TWChoix.setGeometry(QRect(0,0,500,400)) + + self.MotClef = QWidget(self.TWChoix,"MotClef") + + self.textLabel1_2 = QLabel(self.MotClef,"textLabel1_2") + self.textLabel1_2.setGeometry(QRect(360,0,50,37)) + + self.LBMCPermis = QListBox(self.MotClef,"LBMCPermis") + self.LBMCPermis.setGeometry(QRect(10,40,220,290)) + self.LBMCPermis.setMinimumSize(QSize(0,0)) + + self.LBRegles = QListBox(self.MotClef,"LBRegles") + self.LBRegles.setGeometry(QRect(260,40,230,290)) + + self.textLabel1 = QLabel(self.MotClef,"textLabel1") + self.textLabel1.setGeometry(QRect(50,10,120,20)) + self.textLabel1.setMinimumSize(QSize(0,0)) + self.TWChoix.insertTab(self.MotClef,QString("")) + + self.Commande = QWidget(self.TWChoix,"Commande") + + self.textLabel6 = QLabel(self.Commande,"textLabel6") + self.textLabel6.setGeometry(QRect(10,60,60,30)) + + self.textLabel4 = QLabel(self.Commande,"textLabel4") + self.textLabel4.setGeometry(QRect(90,340,300,30)) + + self.LBNouvCommande = QListBox(self.Commande,"LBNouvCommande") + self.LBNouvCommande.setGeometry(QRect(50,100,410,240)) + + self.buttonGroup1 = QButtonGroup(self.Commande,"buttonGroup1") + self.buttonGroup1.setGeometry(QRect(300,20,151,70)) + + self.RBGroupe = QRadioButton(self.buttonGroup1,"RBGroupe") + self.RBGroupe.setGeometry(QRect(20,40,101,20)) + + self.RBalpha = QRadioButton(self.buttonGroup1,"RBalpha") + self.RBalpha.setGeometry(QRect(20,20,101,20)) + self.RBalpha.setChecked(1) + + self.LEFiltre = QLineEdit(self.Commande,"LEFiltre") + self.LEFiltre.setGeometry(QRect(50,60,160,30)) + + self.textLabel1_4 = QLabel(self.Commande,"textLabel1_4") + self.textLabel1_4.setGeometry(QRect(50,20,171,21)) + + self.BNext = QToolButton(self.Commande,"BNext") + self.BNext.setGeometry(QRect(220,60,30,31)) + self.BNext.setIconSet(QIconSet(self.image0)) + self.TWChoix.insertTab(self.Commande,QString("")) + + self.TabPage = QWidget(self.TWChoix,"TabPage") + + self.BBrowse = QPushButton(self.TabPage,"BBrowse") + self.BBrowse.setGeometry(QRect(288,306,161,41)) + + self.textLabel1_3 = QLabel(self.TabPage,"textLabel1_3") + self.textLabel1_3.setGeometry(QRect(70,50,350,41)) + + self.LENomFichier = QLineEdit(self.TabPage,"LENomFichier") + self.LENomFichier.setGeometry(QRect(18,127,450,30)) + self.TWChoix.insertTab(self.TabPage,QString("")) + + self.TabPage_2 = QWidget(self.TWChoix,"TabPage_2") + + self.textLabel1_5 = QLabel(self.TabPage_2,"textLabel1_5") + self.textLabel1_5.setGeometry(QRect(88,96,290,131)) + self.TWChoix.insertTab(self.TabPage_2,QString("")) + + self.languageChange() + + self.resize(QSize(521,499).expandedTo(self.minimumSizeHint())) + self.clearWState(Qt.WState_Polished) + + self.connect(self.LBNouvCommande,SIGNAL("clicked(QListBoxItem*)"),self.LBNouvCommandeClicked) + self.connect(self.LEFiltre,SIGNAL("textChanged(const QString&)"),self.LEFiltreTextChanged) + self.connect(self.LEFiltre,SIGNAL("returnPressed()"),self.LEfiltreReturnPressed) + self.connect(self.bSup,SIGNAL("pressed()"),self.BSupPressed) + self.connect(self.bOk,SIGNAL("clicked()"),self.BOkPressed) + self.connect(self.RBalpha,SIGNAL("clicked()"),self.BuildTabCommand) + self.connect(self.RBGroupe,SIGNAL("clicked()"),self.BuildTabCommand) + self.connect(self.BNext,SIGNAL("clicked()"),self.BNextPressed) + self.connect(self.BBrowse,SIGNAL("clicked()"),self.BBrowsePressed) + self.connect(self.LENomFichier,SIGNAL("returnPressed()"),self.LENomFichReturnPressed) + + + def languageChange(self): + self.setCaption(self.__tr("DMacro")) + self.Commentaire.setText(QString.null) + self.bSup.setText(self.__tr("&Supprimer")) + self.bSup.setAccel(self.__tr("Alt+S")) + QToolTip.add(self.bSup,self.__tr("suppression du mot clef")) + self.bOk.setText(self.__tr("&Valider")) + self.bOk.setAccel(self.__tr("Shift+A, Alt+A, Alt+A, Alt+A")) + QToolTip.add(self.bOk,self.__tr("validation de la saisie")) + self.bHelp.setText(self.__tr("&Documentation")) + self.bHelp.setAccel(self.__tr("Alt+D")) + QToolTip.add(self.bHelp,self.__tr("affichage documentation aster")) + self.textLabel1_2.setText(self.__trUtf8("\x3c\x68\x33\x3e\x3c\x70\x20\x61\x6c\x69\x67\x6e\x3d\x22\x63\x65\x6e\x74\x65\x72\x22\x3e\x3c\x75\x3e\x3c\x62\x3e\x52\xc3\xa9\x67\x6c\x65\x73\x3c\x2f\x62\x3e\x3c\x2f\x75\x3e\x3c\x2f\x70\x3e\x3c\x2f\x68\x33\x3e")) + self.textLabel1.setText(self.__tr("

Mots Clefs Permis

")) + self.TWChoix.changeTab(self.MotClef,self.__tr("Ajouter Mot-Clef")) + self.textLabel6.setText(self.__tr("Filtre")) + self.textLabel4.setText(self.__trUtf8("\x4c\x61\x20\x63\x6f\x6d\x6d\x61\x6e\x64\x65\x20\x63\x68\x6f\x69\x73\x69\x65\x20\x73\x65\x72\x61\x20\x61\x6a\x6f\x75\x74\xc3\xa9\x65\x20\x41\x50\x52\x45\x53\x20\x6c\x61\x20\x63\x6f\x6d\x6d\x61\x6e\x64\x65\x20\x63\x6f\x75\x72\x61\x6e\x74\x65")) + self.buttonGroup1.setTitle(self.__tr("Affichage")) + self.RBGroupe.setText(self.__tr("par groupe")) + self.RBalpha.setText(self.__trUtf8("\x61\x6c\x70\x68\x61\x62\xc3\xa9\x74\x69\x71\x75\x65")) + self.textLabel1_4.setText(self.__tr("Commandes :")) + self.BNext.setText(QString.null) + QToolTip.add(self.BNext,self.__tr("affiche la prochaine occurence")) + self.TWChoix.changeTab(self.Commande,self.__tr("Nouvelle Commande")) + self.BBrowse.setText(self.__tr("Browse")) + self.textLabel1_3.setText(self.__tr("La commande INCLUDE requiert un nom de Fichier :")) + self.TWChoix.changeTab(self.TabPage,self.__tr("Fichier Include")) + self.textLabel1_5.setText(self.__trUtf8("\x3c\x66\x6f\x6e\x74\x20\x73\x69\x7a\x65\x3d\x22\x2b\x31\x22\x3e\x3c\x70\x20\x61\x6c\x69\x67\x6e\x3d\x22\x63\x65\x6e\x74\x65\x72\x22\x3e\x4c\x61\x20\x63\x6f\x6d\x6d\x61\x6e\x64\x65\x20\x49\x4e\x43\x4c\x55\x44\x45\x20\x6e\x27\x61\x20\x70\x61\x73\x20\x64\x65\x20\x66\x69\x63\x68\x69\x65\x72\x20\x61\x73\x73\x6f\x63\x69\xc3\xa9\x2e\x0a\x49\x6c\x20\x66\x61\x75\x74\x20\x64\x27\x61\x62\x6f\x72\x64\x20\x63\x68\x6f\x69\x73\x69\x72\x20\x75\x6e\x20\x6e\x75\x6d\xc3\xa9\x72\x6f\x20\x64\x27\x75\x6e\x69\x74\xc3\xa9\x3c\x2f\x70\x3e\x3c\x2f\x66\x6f\x6e\x74\x3e")) + self.TWChoix.changeTab(self.TabPage_2,self.__tr("Fichier Inc")) + + + def LBNouvCommandeClicked(self): + print "DInc1.LBNouvCommandeClicked(): Not implemented yet" + + def LEFiltreTextChanged(self): + print "DInc1.LEFiltreTextChanged(): Not implemented yet" + + def LEfiltreReturnPressed(self): + print "DInc1.LEfiltreReturnPressed(): Not implemented yet" + + def BSupPressed(self): + print "DInc1.BSupPressed(): Not implemented yet" + + def BOkPressed(self): + print "DInc1.BOkPressed(): Not implemented yet" + + def BuildTabCommand(self): + print "DInc1.BuildTabCommand(): Not implemented yet" + + def BNextPressed(self): + print "DInc1.BNextPressed(): Not implemented yet" + + def BBrowsePressed(self): + print "DInc1.BBrowsePressed(): Not implemented yet" + + def LENomFichReturnPressed(self): + print "DInc1.LENomFichReturnPressed(): Not implemented yet" + + def __tr(self,s,c = None): + return qApp.translate("DInc1",s,c) + + def __trUtf8(self,s,c = None): + return qApp.translate("DInc1",s,c,QApplication.UnicodeUTF8) diff --git a/Ui/desInclude.ui b/Ui/desInclude.ui new file mode 100644 index 00000000..9bbaa390 --- /dev/null +++ b/Ui/desInclude.ui @@ -0,0 +1,522 @@ + +DInc1 + + + DInc1 + + + + 0 + 0 + 521 + 499 + + + + + 505 + 0 + + + + DMacro + + + + Commentaire + + + + 10 + 410 + 490 + 20 + + + + + + + + + bSup + + + + 320 + 440 + 142 + 30 + + + + &Supprimer + + + Alt+S + + + true + + + suppression du mot clef + + + + + bOk + + + + 170 + 440 + 142 + 30 + + + + &Valider + + + Shift+A, Alt+A, Alt+A, Alt+A + + + true + + + true + + + validation de la saisie + + + + + bHelp + + + + 10 + 440 + 142 + 30 + + + + &Documentation + + + Alt+D + + + true + + + affichage documentation aster + + + + + TWChoix + + + + 0 + 0 + 500 + 400 + + + + + MotClef + + + Ajouter Mot-Clef + + + + textLabel1_2 + + + + 360 + 0 + 50 + 37 + + + + <h3><p align="center"><u><b>Régles</b></u></p></h3> + + + + + LBMCPermis + + + + 10 + 40 + 220 + 290 + + + + + 0 + 0 + + + + + + LBRegles + + + + 260 + 40 + 230 + 290 + + + + + + textLabel1 + + + + 50 + 10 + 120 + 20 + + + + + 0 + 0 + + + + <h3><p align="center"><u><b>Mots Clefs Permis</b></u></p></h3> + + + + + + Commande + + + Nouvelle Commande + + + + textLabel6 + + + + 10 + 60 + 60 + 30 + + + + Filtre + + + + + textLabel4 + + + + 90 + 340 + 300 + 30 + + + + La commande choisie sera ajoutée APRES la commande courante + + + + + LBNouvCommande + + + + 50 + 100 + 410 + 240 + + + + + + buttonGroup1 + + + + 300 + 20 + 151 + 70 + + + + Affichage + + + + RBGroupe + + + + 20 + 40 + 101 + 20 + + + + par groupe + + + + + RBalpha + + + + 20 + 20 + 101 + 20 + + + + alphabétique + + + true + + + + + + LEFiltre + + + + 50 + 60 + 160 + 30 + + + + + + textLabel1_4 + + + + 50 + 20 + 171 + 21 + + + + <b><u>Commandes :</u></b> + + + + + BNext + + + + 220 + 60 + 30 + 31 + + + + + + + image0 + + + affiche la prochaine occurence + + + + + + TabPage + + + Fichier Include + + + + BBrowse + + + + 288 + 306 + 161 + 41 + + + + Browse + + + + + textLabel1_3 + + + + 70 + 50 + 350 + 41 + + + + <font size="+1">La commande INCLUDE requiert un nom de Fichier :</font> + + + + + LENomFichier + + + + 18 + 127 + 450 + 30 + + + + + + + TabPage + + + Fichier Inc + + + + textLabel1_5 + + + + 88 + 96 + 290 + 131 + + + + <font size="+1"><p align="center">La commande INCLUDE n'a pas de fichier associé. +Il faut d'abord choisir un numéro d'unité</p></font> + + + + + + + + 89504e470d0a1a0a0000000d49484452000000210000000e0806000000a11e758c000000cf49444154388dd594db0ec3200c43edfdf8d897bb0f345b480845d51eb64888f412e76001c00f046fd6e99bba77200480924a1032c92efbd8c7d5cabcc025400099e957849568fe7f06c0ded1deb32b4a1ec4ea824b9e74097165bd01f85527f78a7201e0a3129f345a017c543bafdc983d0f7109d15a331b471f47072c17494a82338f6178203a8817e67306b1f08b07ba03e602c9b831077e37e0209e67e3386710977b17de80c185ad38695a51d522c82ce77912e2fed8be83762092f52b1820dd11bb10e565b53a5a3bbaff130713d66fa6981857060000000049454e44ae426082 + + + + + LBNouvCommande + clicked(QListBoxItem*) + DInc1 + LBNouvCommandeClicked() + + + LEFiltre + textChanged(const QString&) + DInc1 + LEFiltreTextChanged() + + + LEFiltre + returnPressed() + DInc1 + LEfiltreReturnPressed() + + + bSup + pressed() + DInc1 + BSupPressed() + + + bOk + clicked() + DInc1 + BOkPressed() + + + RBalpha + clicked() + DInc1 + BuildTabCommand() + + + RBGroupe + clicked() + DInc1 + BuildTabCommand() + + + BNext + clicked() + DInc1 + BNextPressed() + + + BBrowse + clicked() + DInc1 + BBrowsePressed() + + + LENomFichier + returnPressed() + DInc1 + LENomFichReturnPressed() + + + + LBNouvCommandeClicked() + LEFiltreTextChanged() + LEfiltreReturnPressed() + BSupPressed() + BOkPressed() + BuildTabCommand() + BNextPressed() + BBrowsePressed() + LENomFichReturnPressed() + + + diff --git a/Ui/desParam.py b/Ui/desParam.py index 185c7df1..307a8421 100644 --- a/Ui/desParam.py +++ b/Ui/desParam.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- -# Form implementation generated from reading ui file 'desParam.ui' +# Form implementation generated from reading ui file '../Ui/desParam.ui' # -# Created: mar aoû 21 15:48:22 2007 +# Created: ven aoû 24 10:19:53 2007 # by: The PyQt User Interface Compiler (pyuic) 3.13 # # WARNING! All changes made in this file will be lost! @@ -10,67 +10,138 @@ from qt import * +image0_data = \ + "\x89\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d" \ + "\x49\x48\x44\x52\x00\x00\x00\x21\x00\x00\x00\x0e" \ + "\x08\x06\x00\x00\x00\xa1\x1e\x75\x8c\x00\x00\x00" \ + "\xcf\x49\x44\x41\x54\x38\x8d\xd5\x94\xdb\x0e\xc3" \ + "\x20\x0c\x43\xed\xfd\xf8\xd8\x97\xbb\x0f\x34\x5b" \ + "\x48\x08\x45\xd5\x1e\xb6\x48\x88\xf4\x12\xe7\x60" \ + "\x01\xc0\x0f\x04\x6f\xd6\xe9\x9b\xba\x77\x20\x04" \ + "\x80\x92\x4a\x10\x32\xc9\x2e\xfb\xd8\xc7\xd5\xca" \ + "\xbc\xc0\x25\x40\x00\x99\xe9\x57\x84\x95\x68\xfe" \ + "\x7f\x06\xc0\xde\xd1\xde\xb3\x2b\x4a\x1e\xc4\xea" \ + "\x82\x4b\x9e\x74\x09\x71\x65\xbd\x01\xf8\x55\x27" \ + "\xf7\x8a\x72\x01\xe0\xa3\x12\x9f\x34\x5a\x01\x7c" \ + "\x54\x3b\xaf\xdc\x98\x3d\x0f\x71\x09\xd1\x5a\x33" \ + "\x1b\x47\x1f\x47\x07\x2c\x17\x49\x4a\x82\x33\x8f" \ + "\x61\x78\x20\x3a\x88\x17\xe6\x73\x06\xb1\xf0\x8b" \ + "\x07\xba\x03\xe6\x02\xc9\xb8\x31\x07\x7e\x37\xe0" \ + "\x20\x9e\x67\xe3\x38\x67\x10\x97\x7b\x17\xde\x80" \ + "\xc1\x85\xad\x38\x69\x5a\x51\xd5\x22\xc8\x2c\xe7" \ + "\x79\x12\xe2\xfe\xd8\xbe\x83\x76\x20\x92\xf5\x2b" \ + "\x18\x20\xdd\x11\xbb\x10\xe5\x65\xb5\x3a\x5a\x3b" \ + "\xba\xff\x13\x07\x13\xd6\x6f\xa6\x98\x18\x57\x06" \ + "\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82" class DParam(QWidget): def __init__(self,parent = None,name = None,fl = 0): QWidget.__init__(self,parent,name,fl) + self.image0 = QPixmap() + self.image0.loadFromData(image0_data,"PNG") if not name: self.setName("DParam") - self.setMinimumSize(QSize(350,0)) + self.setMinimumSize(QSize(505,0)) - self.tabuniqueinto = QTabWidget(self,"tabuniqueinto") - self.tabuniqueinto.setGeometry(QRect(10,20,460,440)) + self.Commentaire = QLabel(self,"Commentaire") + self.Commentaire.setGeometry(QRect(10,410,490,20)) + self.Commentaire.setFrameShape(QLabel.NoFrame) + self.Commentaire.setFrameShadow(QLabel.Plain) - self.Widget8 = QWidget(self.tabuniqueinto,"Widget8") - - self.bSup = QPushButton(self.Widget8,"bSup") - self.bSup.setGeometry(QRect(310,370,142,30)) + self.bSup = QPushButton(self,"bSup") + self.bSup.setGeometry(QRect(320,440,142,30)) self.bSup.setAutoDefault(1) - self.bOk = QPushButton(self.Widget8,"bOk") - self.bOk.setGeometry(QRect(160,370,142,30)) + self.bOk = QPushButton(self,"bOk") + self.bOk.setGeometry(QRect(170,440,142,30)) self.bOk.setAutoDefault(1) self.bOk.setDefault(1) - self.bHelp = QPushButton(self.Widget8,"bHelp") - self.bHelp.setGeometry(QRect(10,370,142,30)) + self.bHelp = QPushButton(self,"bHelp") + self.bHelp.setGeometry(QRect(10,440,142,30)) self.bHelp.setAutoDefault(1) - self.textLabel2 = QLabel(self.Widget8,"textLabel2") - self.textLabel2.setGeometry(QRect(40,160,50,21)) + self.TWChoix = QTabWidget(self,"TWChoix") + self.TWChoix.setGeometry(QRect(0,0,500,400)) + + self.Valeur_Parametre = QWidget(self.TWChoix,"Valeur_Parametre") - self.lineEditVal = QLineEdit(self.Widget8,"lineEditVal") - self.lineEditVal.setGeometry(QRect(120,150,231,31)) + self.textLabel2_2_2 = QLabel(self.Valeur_Parametre,"textLabel2_2_2") + self.textLabel2_2_2.setGeometry(QRect(180,20,90,21)) - self.lineEditNom = QLineEdit(self.Widget8,"lineEditNom") - self.lineEditNom.setGeometry(QRect(118,86,231,31)) + self.textLabel2_2 = QLabel(self.Valeur_Parametre,"textLabel2_2") + self.textLabel2_2.setGeometry(QRect(50,60,50,21)) - self.textLabel2_2 = QLabel(self.Widget8,"textLabel2_2") - self.textLabel2_2.setGeometry(QRect(40,90,50,21)) + self.lineEditNom = QLineEdit(self.Valeur_Parametre,"lineEditNom") + self.lineEditNom.setGeometry(QRect(120,60,231,31)) - self.textLabel2_2_2 = QLabel(self.Widget8,"textLabel2_2_2") - self.textLabel2_2_2.setGeometry(QRect(180,20,90,21)) + self.lineEditVal = QLineEdit(self.Valeur_Parametre,"lineEditVal") + self.lineEditVal.setGeometry(QRect(120,100,231,31)) + + self.textLabel2 = QLabel(self.Valeur_Parametre,"textLabel2") + self.textLabel2.setGeometry(QRect(50,100,50,21)) + + self.Commentaire2 = QLabel(self.Valeur_Parametre,"Commentaire2") + self.Commentaire2.setGeometry(QRect(40,160,400,100)) + + self.Commentaire_2 = QLabel(self.Valeur_Parametre,"Commentaire_2") + self.Commentaire_2.setGeometry(QRect(30,280,410,41)) + self.TWChoix.insertTab(self.Valeur_Parametre,QString("")) + + self.Commande = QWidget(self.TWChoix,"Commande") + + self.textLabel6 = QLabel(self.Commande,"textLabel6") + self.textLabel6.setGeometry(QRect(10,60,60,30)) + + self.textLabel4 = QLabel(self.Commande,"textLabel4") + self.textLabel4.setGeometry(QRect(90,340,300,30)) + + self.LBNouvCommande = QListBox(self.Commande,"LBNouvCommande") + self.LBNouvCommande.setGeometry(QRect(50,100,410,240)) + + self.buttonGroup1 = QButtonGroup(self.Commande,"buttonGroup1") + self.buttonGroup1.setGeometry(QRect(298,17,151,70)) + + self.RBGroupe = QRadioButton(self.buttonGroup1,"RBGroupe") + self.RBGroupe.setGeometry(QRect(20,40,101,20)) - self.Commentaire = QLabel(self.Widget8,"Commentaire") - self.Commentaire.setGeometry(QRect(30,230,400,100)) - self.tabuniqueinto.insertTab(self.Widget8,QString("")) + self.RBalpha = QRadioButton(self.buttonGroup1,"RBalpha") + self.RBalpha.setGeometry(QRect(20,20,101,20)) + self.RBalpha.setChecked(1) + + self.LEFiltre = QLineEdit(self.Commande,"LEFiltre") + self.LEFiltre.setGeometry(QRect(50,60,160,30)) + + self.BNext = QToolButton(self.Commande,"BNext") + self.BNext.setGeometry(QRect(220,60,30,31)) + self.BNext.setIconSet(QIconSet(self.image0)) + + self.textLabel1_4 = QLabel(self.Commande,"textLabel1_4") + self.textLabel1_4.setGeometry(QRect(50,20,171,21)) + self.TWChoix.insertTab(self.Commande,QString("")) self.languageChange() - self.resize(QSize(482,480).expandedTo(self.minimumSizeHint())) + self.resize(QSize(505,483).expandedTo(self.minimumSizeHint())) self.clearWState(Qt.WState_Polished) - self.connect(self.bHelp,SIGNAL("clicked()"),self.ViewDoc) - self.connect(self.bOk,SIGNAL("clicked()"),self.BOk2Pressed) - self.connect(self.bSup,SIGNAL("clicked()"),self.BSupPressed) - self.connect(self.lineEditVal,SIGNAL("returnPressed()"),self.LEValeurPressed) + self.connect(self.LBNouvCommande,SIGNAL("clicked(QListBoxItem*)"),self.LBNouvCommandeClicked) + self.connect(self.LEFiltre,SIGNAL("textChanged(const QString&)"),self.LEFiltreTextChanged) + self.connect(self.LEFiltre,SIGNAL("returnPressed()"),self.LEfiltreReturnPressed) + self.connect(self.bSup,SIGNAL("pressed()"),self.BSupPressed) + self.connect(self.bOk,SIGNAL("clicked()"),self.BOkPressed) + self.connect(self.RBGroupe,SIGNAL("clicked()"),self.BuildTabCommand) + self.connect(self.RBalpha,SIGNAL("clicked()"),self.BuildTabCommand) + self.connect(self.bHelp,SIGNAL("clicked()"),self.BHelpPressed) + self.connect(self.BNext,SIGNAL("pressed()"),self.BNextPressed) def languageChange(self): - self.setCaption(self.__tr("DUnIn")) + self.setCaption(self.__tr("DComm")) + self.Commentaire.setText(QString.null) self.bSup.setText(self.__tr("&Supprimer")) self.bSup.setAccel(self.__tr("Alt+S")) QToolTip.add(self.bSup,self.__tr("suppression du mot clef")) @@ -80,24 +151,49 @@ class DParam(QWidget): self.bHelp.setText(self.__tr("&Documentation")) self.bHelp.setAccel(self.__tr("Alt+D")) QToolTip.add(self.bHelp,self.__tr("affichage documentation aster")) - self.textLabel2.setText(self.__tr("

Valeur:

")) - self.textLabel2_2.setText(self.__tr("

Nom:

")) self.textLabel2_2_2.setText(self.__tr("

Parametre

")) - self.Commentaire.setText(self.__trUtf8("\x52\x65\x74\x6f\x75\x72\x20\x43\x68\x61\x72\x69\x6f\x74\x20\x64\x61\x6e\x73\x20\x75\x6e\x65\x20\x73\x6f\x6e\x65\x20\x64\x65\x20\x73\x61\x69\x73\x69\x65\x20\x70\x65\x72\x6d\x65\x74\x20\x64\x65\x20\x76\xc3\xa9\x72\x69\x66\x69\x65\x72\x20\x6c\x61\x20\x76\x61\x6c\x69\x64\x69\x74\xc3\xa9\x20\x64\x65\x20\x6c\x61\x20\x76\x61\x6c\x65\x75\x72\x20\x73\x61\x69\x73\x69\x65\x2e\x0a\x0a\x4c\x65\x73\x20\x6e\x6f\x75\x76\x65\x6c\x6c\x65\x73\x20\x76\x61\x6c\x65\x75\x72\x73\x20\x73\x6f\x6e\x74\x20\x70\x72\x69\x73\x65\x73\x20\x65\x66\x66\x65\x63\x74\x69\x76\x65\x6d\x65\x6e\x74\x20\x65\x6e\x20\x63\x6f\x6d\x70\x74\x65\x20\x61\x70\x72\xc3\xa8\x73\x20\x61\x76\x6f\x69\x72\x20\x61\x70\x70\x75\x79\xc3\xa9\x20\x73\x75\x72\x0a\x20\x6c\x65\x20\x62\x6f\x75\x74\x6f\x6e\x20\x56\x61\x6c\x69\x64\x65\x72\x2e")) - self.tabuniqueinto.changeTab(self.Widget8,self.__tr("Valeur Parametre")) + self.textLabel2_2.setText(self.__tr("

Nom:

")) + self.textLabel2.setText(self.__tr("

Valeur:

")) + self.Commentaire2.setText(self.__trUtf8("\x52\x65\x74\x6f\x75\x72\x20\x43\x68\x61\x72\x69\x6f\x74\x20\x64\x61\x6e\x73\x20\x75\x6e\x65\x20\x73\x6f\x6e\x65\x20\x64\x65\x20\x73\x61\x69\x73\x69\x65\x20\x70\x65\x72\x6d\x65\x74\x20\x64\x65\x20\x76\xc3\xa9\x72\x69\x66\x69\x65\x72\x20\x6c\x61\x20\x76\x61\x6c\x69\x64\x69\x74\xc3\xa9\x20\x64\x65\x20\x6c\x61\x20\x76\x61\x6c\x65\x75\x72\x20\x73\x61\x69\x73\x69\x65\x2e\x0a\x0a\x4c\x65\x73\x20\x6e\x6f\x75\x76\x65\x6c\x6c\x65\x73\x20\x76\x61\x6c\x65\x75\x72\x73\x20\x6e\x65\x20\x73\x65\x72\x6f\x6e\x74\x20\x70\x72\x69\x73\x65\x73\x20\x20\x65\x6e\x20\x63\x6f\x6d\x70\x74\x65\x20\x71\x75\x27\x61\x70\x72\xc3\xa8\x73\x20\x61\x76\x6f\x69\x72\x20\x61\x70\x70\x75\x79\xc3\xa9\x20\x73\x75\x72\x20\x0a\x20\x6c\x65\x20\x62\x6f\x75\x74\x6f\x6e\x20\x56\x61\x6c\x69\x64\x65\x72\x2e")) + self.Commentaire_2.setText(QString.null) + self.TWChoix.changeTab(self.Valeur_Parametre,self.__tr("Valeur Parametre")) + self.textLabel6.setText(self.__tr("Filtre")) + self.textLabel4.setText(self.__trUtf8("\x4c\x61\x20\x63\x6f\x6d\x6d\x61\x6e\x64\x65\x20\x63\x68\x6f\x69\x73\x69\x65\x20\x73\x65\x72\x61\x20\x61\x6a\x6f\x75\x74\xc3\xa9\x65\x20\x41\x50\x52\x45\x53\x20\x6c\x61\x20\x63\x6f\x6d\x6d\x61\x6e\x64\x65\x20\x63\x6f\x75\x72\x61\x6e\x74\x65")) + self.buttonGroup1.setTitle(self.__tr("Affichage")) + self.RBGroupe.setText(self.__tr("par groupe")) + self.RBalpha.setText(self.__trUtf8("\x61\x6c\x70\x68\x61\x62\xc3\xa9\x74\x69\x71\x75\x65")) + self.BNext.setText(QString.null) + QToolTip.add(self.BNext,self.__tr("affiche la prochaine occurence")) + self.textLabel1_4.setText(self.__tr("Commandes :")) + self.TWChoix.changeTab(self.Commande,self.__tr("Nouvelle Commande")) + + + def LBNouvCommandeClicked(self): + print "DParam.LBNouvCommandeClicked(): Not implemented yet" + def LEFiltreTextChanged(self): + print "DParam.LEFiltreTextChanged(): Not implemented yet" + + def LEfiltreReturnPressed(self): + print "DParam.LEfiltreReturnPressed(): Not implemented yet" def BSupPressed(self): print "DParam.BSupPressed(): Not implemented yet" - def ViewDoc(self): - print "DParam.ViewDoc(): Not implemented yet" + def LENomConceptReturnPressed(self): + print "DParam.LENomConceptReturnPressed(): Not implemented yet" + + def BOkPressed(self): + print "DParam.BOkPressed(): Not implemented yet" + + def BuildTabCommand(self): + print "DParam.BuildTabCommand(): Not implemented yet" - def BOk2Pressed(self): - print "DParam.BOk2Pressed(): Not implemented yet" + def BHelpPressed(self): + print "DParam.BHelpPressed(): Not implemented yet" - def LEValeurPressed(self): - print "DParam.LEValeurPressed(): Not implemented yet" + def BNextPressed(self): + print "DParam.BNextPressed(): Not implemented yet" def __tr(self,s,c = None): return qApp.translate("DParam",s,c) diff --git a/Ui/desParam.ui b/Ui/desParam.ui new file mode 100644 index 00000000..756ceeb9 --- /dev/null +++ b/Ui/desParam.ui @@ -0,0 +1,483 @@ + +DParam + + + DParam + + + + 0 + 0 + 505 + 483 + + + + + 505 + 0 + + + + DComm + + + + Commentaire + + + + 10 + 410 + 490 + 20 + + + + NoFrame + + + Plain + + + + + + + + bSup + + + + 320 + 440 + 142 + 30 + + + + &Supprimer + + + Alt+S + + + true + + + suppression du mot clef + + + + + bOk + + + + 170 + 440 + 142 + 30 + + + + &Valider + + + Shift+A, Alt+A, Alt+A, Alt+A + + + true + + + true + + + validation de la saisie + + + + + bHelp + + + + 10 + 440 + 142 + 30 + + + + &Documentation + + + Alt+D + + + true + + + affichage documentation aster + + + + + TWChoix + + + + 0 + 0 + 500 + 400 + + + + + Valeur_Parametre + + + Valeur Parametre + + + + textLabel2_2_2 + + + + 180 + 20 + 90 + 21 + + + + <u><b><p align="center">Parametre</p></b></u> + + + + + textLabel2_2 + + + + 50 + 60 + 50 + 21 + + + + <b><p align="center">Nom: </p></b> + + + + + lineEditNom + + + + 120 + 60 + 231 + 31 + + + + + + lineEditVal + + + + 120 + 100 + 231 + 31 + + + + + + textLabel2 + + + + 50 + 100 + 50 + 21 + + + + <b><p align="center">Valeur: </p></b> + + + + + Commentaire2 + + + + 40 + 160 + 400 + 100 + + + + Retour Chariot dans une sone de saisie permet de vérifier la validité de la valeur saisie. + +Les nouvelles valeurs ne seront prises en compte qu'après avoir appuyé sur + le bouton Valider. + + + + + Commentaire_2 + + + + 30 + 280 + 410 + 41 + + + + + + + + + + Commande + + + Nouvelle Commande + + + + textLabel6 + + + + 10 + 60 + 60 + 30 + + + + Filtre + + + + + textLabel4 + + + + 90 + 340 + 300 + 30 + + + + La commande choisie sera ajoutée APRES la commande courante + + + + + LBNouvCommande + + + + 50 + 100 + 410 + 240 + + + + + + buttonGroup1 + + + + 298 + 17 + 151 + 70 + + + + Affichage + + + + RBGroupe + + + + 20 + 40 + 101 + 20 + + + + par groupe + + + + + RBalpha + + + + 20 + 20 + 101 + 20 + + + + alphabétique + + + true + + + + + + LEFiltre + + + + 50 + 60 + 160 + 30 + + + + + + BNext + + + + 220 + 60 + 30 + 31 + + + + + + + image0 + + + affiche la prochaine occurence + + + + + textLabel1_4 + + + + 50 + 20 + 171 + 21 + + + + <b><u>Commandes :</u></b> + + + + + + + + 89504e470d0a1a0a0000000d49484452000000210000000e0806000000a11e758c000000cf49444154388dd594db0ec3200c43edfdf8d897bb0f345b480845d51eb64888f412e76001c00f046fd6e99bba77200480924a1032c92efbd8c7d5cabcc025400099e957849568fe7f06c0ded1deb32b4a1ec4ea824b9e74097165bd01f85527f78a7201e0a3129f345a017c543bafdc983d0f7109d15a331b471f47072c17494a82338f6178203a8817e67306b1f08b07ba03e602c9b831077e37e0209e67e3386710977b17de80c185ad38695a51d522c82ce77912e2fed8be83762092f52b1820dd11bb10e565b53a5a3bbaff130713d66fa6981857060000000049454e44ae426082 + + + + + LBNouvCommande + clicked(QListBoxItem*) + DParam + LBNouvCommandeClicked() + + + LEFiltre + textChanged(const QString&) + DParam + LEFiltreTextChanged() + + + LEFiltre + returnPressed() + DParam + LEfiltreReturnPressed() + + + bSup + pressed() + DParam + BSupPressed() + + + bOk + clicked() + DParam + BOkPressed() + + + RBGroupe + clicked() + DParam + BuildTabCommand() + + + RBalpha + clicked() + DParam + BuildTabCommand() + + + bHelp + clicked() + DParam + BHelpPressed() + + + BNext + pressed() + DParam + BNextPressed() + + + + LBNouvCommandeClicked() + LEFiltreTextChanged() + LEfiltreReturnPressed() + BSupPressed() + LENomConceptReturnPressed() + BOkPressed() + BuildTabCommand() + BHelpPressed() + BNextPressed() + + +