From 315fbe3623d7b6a883eb1140832f357a21d3ff1a Mon Sep 17 00:00:00 2001 From: Pascale Noyret Date: Mon, 28 Nov 2011 10:09:47 +0000 Subject: [PATCH] ajout CARMEL3D --- InterfaceQT4/qtEficas.py | 37 +++++++++++++++++++----- InterfaceQT4/viewManager.py | 5 ++++ UiQT4/OptionsPdf.ui | 57 ++++++++++++++++++------------------- UiQT4/desChoixCode.ui | 2 +- 4 files changed, 64 insertions(+), 37 deletions(-) diff --git a/InterfaceQT4/qtEficas.py b/InterfaceQT4/qtEficas.py index fe9f49c8..5bce823e 100644 --- a/InterfaceQT4/qtEficas.py +++ b/InterfaceQT4/qtEficas.py @@ -23,7 +23,7 @@ class Appli(Ui_Eficas,QMainWindow): Ui_Eficas.__init__(self) self.setupUi(self) - self.VERSION_EFICAS="Eficas QT4 V6.3.1" + self.VERSION_EFICAS="Eficas QT4 V6.4" self.salome=salome self.ihm="QT" self.top = self #(pour CONFIGURATION) @@ -79,8 +79,8 @@ class Appli(Ui_Eficas,QMainWindow): import sys reload(sys) sys.setdefaultencoding(prefsCode.encoding) - if code in Appli.__dict__.keys(): - listeTexte=apply(Appli.__dict__[code],(self,)) + if self.code in Appli.__dict__.keys(): + listeTexte=apply(Appli.__dict__[self.code],(self,)) self.initPatrons() self.ficRecents={} @@ -105,6 +105,23 @@ class Appli(Ui_Eficas,QMainWindow): + def CARMEL3D(self): + if self.salome == 0 : return + self.menuMesh = self.menubar.addMenu("menuMesh") + self.menuMesh.setObjectName("Mesh") + self.actionChercheGrpMesh = QAction(self) + self.actionChercheGrpMesh.setText("Acquiert Groupe Maille") + self.menuMesh.addAction(self.actionChercheGrpMesh) + self.connect(self.actionChercheGrpMesh,SIGNAL("activated()"),self.ChercheGrpMesh) + + def ChercheGrpMesh(self): + Msg,listeGroup=self.ChercheGrpMeshInSalome() + if Msg == None : + self.viewmanager.handleAjoutGroup(listeGroup) + #self.viewmanager.handleAjoutGroup(('Grp1','Grp2')) + else : + print "il faut gerer les erreurs" + def MAP(self): self.menuExecution = self.menubar.addMenu(QApplication.translate("Eficas", "Execution", None, QApplication.UnicodeUTF8)) self.menuExecution.setObjectName("menuExecution") @@ -140,6 +157,12 @@ class Appli(Ui_Eficas,QMainWindow): self.actionExecutionYACS.setText(QApplication.translate("Eficas", "Execution YACS", None, QApplication.UnicodeUTF8)) self.connect(self.actionExecutionYACS,SIGNAL("activated()"),self.runYACS) + def OPENTURNS_STUDY(self): + self.menuOptions.setDisabled(True) + + def OPENTURNS_WRAPPER(self): + self.menuOptions.setDisabled(True) + def ajoutIcones(self) : # Pour pallier les soucis de repertoire d icone icon = QIcon(self.RepIcon+"/New24.png") @@ -229,7 +252,7 @@ class Appli(Ui_Eficas,QMainWindow): def initRecents(self): try : rep=self.CONFIGURATION.rep_user - monFichier=rep+"/.listefichiers_"+self.code + monFichier=rep+"/listefichiers_"+self.code index=0 f=open(monFichier) while ( index < 9) : @@ -257,7 +280,7 @@ class Appli(Ui_Eficas,QMainWindow): def sauveRecents(self) : rep=self.CONFIGURATION.rep_user - monFichier=rep+"/.listefichiers_"+self.code + monFichier=rep+"/listefichiers_"+self.code try : f=open(monFichier,'w') if len(self.recent) == 0 : return @@ -421,9 +444,9 @@ class Appli(Ui_Eficas,QMainWindow): return texte def cleanPath(self): - for pathCode in ('Aster','Cuve2dg','Openturns_Study','Openturns_Wrapper','MAP'): + for pathCode in ('Aster','Carmel3D','Cuve2dg','Openturns_Study','Openturns_Wrapper','MAP'): try: - aEnlever=os.path.abspath(os.path.join(os.getcwd(),'..',pathCode)) + aEnlever=os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(__file__),'..',pathCode))) sys.path.remove(aEnlever) except : pass diff --git a/InterfaceQT4/viewManager.py b/InterfaceQT4/viewManager.py index 23aec468..70b50f53 100644 --- a/InterfaceQT4/viewManager.py +++ b/InterfaceQT4/viewManager.py @@ -309,3 +309,8 @@ class MyTabview: self.myQtab.setTabText(index,fileName) return ok return res + + def handleAjoutGroup(self,listeGroup): + index=self.myQtab.currentIndex() + editor=self.dict_editors[index] + editor.handleAjoutGroup(listeGroup) diff --git a/UiQT4/OptionsPdf.ui b/UiQT4/OptionsPdf.ui index 1884d98c..4128a1da 100644 --- a/UiQT4/OptionsPdf.ui +++ b/UiQT4/OptionsPdf.ui @@ -1,8 +1,7 @@ - - + desPdf - - + + 0 0 @@ -10,28 +9,28 @@ 142 - - desPdf + + Lire les Pdf - - - + + + - - + + Lecteur Pdf : - + false - - + + Qt::Horizontal - + 40 20 @@ -41,27 +40,27 @@ - - - + + + 0 30 - + acroread - - + + - - + + Qt::Horizontal - + 40 20 @@ -70,15 +69,15 @@ - - + + Ok - - + + Cancel @@ -87,7 +86,7 @@ - + qPixmapFromMimeSource LERepPdf diff --git a/UiQT4/desChoixCode.ui b/UiQT4/desChoixCode.ui index 607b09a5..2006fc34 100644 --- a/UiQT4/desChoixCode.ui +++ b/UiQT4/desChoixCode.ui @@ -124,7 +124,7 @@ - + 0 -- 2.39.2