+ self.initAides()
+ for intituleMenu in ("menuTraduction","menuOptions","menuMesh","menuExecution","menuN1"):
+ if hasattr(self,intituleMenu):
+ menu=getattr(self,intituleMenu)
+ menu.setAttribute(Qt.WA_DeleteOnClose)
+ menu.close()
+ delattr(self,intituleMenu)
+ for intituleAction in ("actionExecution","actionSaveRun",):
+ if hasattr(self,intituleAction):
+ action=getattr(self,intituleAction)
+ self.toolBar.removeAction(action)
+ if self.code.upper() in Appli.__dict__:
+ Appli.__dict__[self.code.upper()](self,)
+ if self.suiteTelemac : self.lookSuiteTelemac()
+
+ def initAides(self):
+ #print "je passe la"
+ repAide=os.path.dirname(os.path.abspath(__file__))
+ fileName='index.html'
+ self.docPath=repAide+"/../Aide"
+ if hasattr(self,'CONFIGURATION') and hasattr(self.CONFIGURATION,'docPath') : self.docPath=self.CONFIGURATION.docPath
+ if hasattr(self,'CONFIGURATION') and hasattr(self.CONFIGURATION,'fileName'):fileName=self.CONFIGURATION.fileName
+ self.fileDoc=os.path.join(self.docPath,fileName)
+ self.actionCode.setText(tr("Aide specifique ")+str(self.code))
+ if not os.path.isfile(self.fileDoc) :
+ self.fileDoc=""
+ self.docPath=""
+ self.actionCode.setEnabled(False)
+ return
+
+ self.actionCode.setEnabled(True)
+ self.menuAide.addAction(self.actionCode)
+
+ def newN1(self):
+ ssCode=None
+ code="PSEN_N1"
+ self.cleanPath()
+ dirCode=os.path.abspath(os.path.join(os.path.abspath(__file__),'../..',"ProcessOutputs_Eficas"))
+ sys.path.insert(0,dirCode)
+ self.code=code
+ self.definitCode(code,ssCode)
+ self.initRecents()
+ self.multi=True
+ self.demande=False
+ self.fileNew()
+
+ def newPSEN(self):
+ ssCode=None
+ code="PSEN"
+ self.cleanPath()
+ dirCode=os.path.abspath(os.path.join(os.path.abspath(__file__),'../..',code))
+ sys.path.insert(0,dirCode)
+ self.code=code
+ self.definitCode(code,ssCode)
+ self.multi=True
+ self.demande=False
+ self.fileNew()
+
+ def ajoutN1(self):
+ self.menuN1 = self.menubar.addMenu(tr("Process Output"))
+ self.actionN1 = QAction(self)
+ self.actionN1.setText(tr("Process Output"))
+ self.menuN1.addAction(self.actionN1)
+ self.actionN1.triggered.connect(self.newN1)
+
+
+ if hasattr(self,'actionOpenProcess'):return
+
+ self.actionOpenProcess = QAction(self)
+ self.actionOpenProcess.setText(tr("Open Process_Output File"))
+ self.menuN1.addAction(self.actionOpenProcess)
+ self.actionOpenProcess.triggered.connect(self.openProcess)
+
+ def ajoutExecution(self):
+ self.menuExecution = self.menubar.addMenu(tr("&Run"))
+ self.actionExecution = QAction(self)
+ if sys.platform[0:5]=="linux":
+ icon6 = QIcon(self.repIcon+"/roue.png")
+ self.actionExecution.setIcon(icon6)
+ else :
+ self.actionExecution.setText(tr("Run"))
+ self.actionExecution.setObjectName("actionExecution")
+ self.menuExecution.addAction(self.actionExecution)
+ if not(self.actionExecution in self.toolBar.actions()):
+ self.toolBar.addAction(self.actionExecution)
+ self.actionExecution.setText(tr("Run"))
+ self.actionExecution.triggered.connect(self.run)
+
+ def ajoutSauveExecution(self):
+ self.actionSaveRun = QAction(self)
+ icon7 = QIcon(self.repIcon+"/export_MAP.png")
+ self.actionSaveRun.setIcon(icon7)
+ self.actionSaveRun.setObjectName("actionSaveRun")
+ self.menuExecution.addAction(self.actionSaveRun)
+ if not(self.actionSaveRun in self.toolBar.actions()):
+ self.toolBar.addAction(self.actionSaveRun)
+ self.actionSaveRun.setText(tr("Save Run"))
+ self.actionSaveRun.triggered.connect(self.saveRun)
+
+ def griserActionsStructures(self):
+ self.actionCouper.setEnabled(False)
+ self.actionColler.setEnabled(False)
+ self.actionCopier.setEnabled(False)
+ self.actionSupprimer.setEnabled(False)
+
+ def enleverActionsStructures(self):
+ self.toolBar.removeAction(self.actionCopier)
+ self.toolBar.removeAction(self.actionColler)
+ self.toolBar.removeAction(self.actionCouper)
+ self.menuEdition.removeAction(self.actionCouper)
+ self.menuEdition.removeAction(self.actionCopier)
+ self.menuEdition.removeAction(self.actionColler)
+
+
+ def enleverParametres(self):
+ self.toolBar.removeAction(self.actionParametres)
+ self.menuJdC.removeAction(self.actionParametres)
+
+ def enleverSupprimer(self):
+ self.toolBar.removeAction(self.actionSupprimer)
+
+ def enleverNewInclude(self):
+ self.actionNouvel_Include.setVisible(False)
+
+ def enleverRechercherDsCatalogue(self):
+ self.actionRechercherDsCatalogue.setVisible(False)
+
+ def connectRechercherDsCatalogue(self):
+ self.actionRechercherDsCatalogue.triggered.connect(self.handleRechercherDsCatalogue)
+
+ def ajoutSortieLegere(self):
+ if hasattr(self,'actionSortieLegere') : return
+ self.actionSortieLegere = QAction(self)
+ self.actionSortieLegere.setText(tr("Sortie Legere"))
+ self.menuFichier.insertAction(self.actionEnregistrer_sous,self.actionSortieLegere)
+ self.actionSortieLegere.triggered.connect(self.handleSortieLegere)
+
+
+ def ZCRACKS(self):
+ self.enleverNewInclude()
+ self.toolBar.addSeparator()
+ self.ajoutExecution()
+
+ self.menuOptions = self.menubar.addMenu("menuOptions")
+ self.menuOptions.addAction(self.actionParametres_Eficas)
+ self.menuOptions.setTitle(tr("Options"))
+
+ def ADAO(self):
+ self.enleverActionsStructures()
+ self.enleverNewInclude()
+
+ def ASTER(self) :
+ self.menuTraduction = self.menubar.addMenu("menuTraduction")
+ self.menuTraduction.addAction(self.actionTraduitV11V12)
+ self.menuTraduction.addAction(self.actionTraduitV10V11)
+ self.menuTraduction.addAction(self.actionTraduitV9V10)
+ self.menuTraduction.setTitle(tr("Traduction"))
+
+ self.menuFichier.addAction(self.actionSauveLigne)
+
+ self.menuOptions = self.menubar.addMenu("menuOptions")
+ self.menuOptions.addAction(self.actionParametres_Eficas)
+ self.menuOptions.addAction(self.actionLecteur_Pdf)
+ self.menuOptions.setTitle(tr("Options"))
+
+ def CARMEL3D(self):
+ #if self.salome == 0 : return
+ self.enleverNewInclude()
+ self.menuMesh = self.menubar.addMenu(tr("Gestion Maillage"))
+ self.menuMesh.setObjectName("Mesh")
+ self.menuMesh.addAction(self.actionChercheGrpMaille)
+ #self.griserActionsStructures()
+
+ def CARMELCND(self):
+ self.enleverNewInclude()
+ self.enleverRechercherDsCatalogue()
+ self.ajoutExecution()
+ self.ajoutSauveExecution()
+ self.griserActionsStructures()
+
+ def MAP(self):
+ self.enleverNewInclude()
+ self.toolBar.addSeparator()
+ self.ajoutExecution()
+ self.ajoutSauveExecution()
+ self.menuOptions = self.menubar.addMenu("menuOptions")
+ self.menuOptions.addAction(self.actionParametres_Eficas)
+ self.menuOptions.setTitle(tr("Options"))
+
+ def PSEN(self):
+ if self.first: self.first=0
+ self.action_Nouveau.triggered.disconnect(self.fileNew)
+ self.action_Nouveau.triggered.connect(self.newPSEN)
+ self.enleverActionsStructures()
+ self.enleverParametres()
+ self.enleverRechercherDsCatalogue()
+ self.enleverNewInclude()
+ self.ajoutExecution()
+ self.ajoutN1()
+ self.ajoutHelpPSEN()
+ self.ajoutIcones()