self.ficRecents={}
self.listeAEnlever=[]
self.ListeCode=['Aster','Carmel3D','Cuve2dg','Openturns_Study','Openturns_Wrapper','MAP','ZCracks', 'CarmelCND','MT']
- self.repIcon=os.path.join( os.path.dirname(os.path.abspath(__file__)),'../Editeur/icons')
+ #self.repIcon=os.path.join( os.path.dirname(os.path.abspath(__file__)),'../Editeur/icons')
+ self.repIcon=os.path.join( os.path.dirname(os.path.abspath(__file__)),'..','Editeur','icons')
if self.salome:
import Accas
eficas_root_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
self.viewmanager = MyTabview(self)
- self.recentMenu=self.menuFichier.addMenu(tr('&Recents'))
+ #self.recentMenu=self.menuFichier.addMenu(tr('&Recents'))
+ self.recentMenu=QMenu(tr('&Recents'))
+ #self.menuFichier.insertMenu(self.actionOuvrir,self.recentMenu)
+ # actionARemplacer ne sert que pour l insert Menu
+ self.menuFichier.insertMenu(self.actionARemplacer ,self.recentMenu)
+ self.menuFichier.removeAction(self.actionARemplacer)
self.connecterSignaux()
self.toolBar.addSeparator()
if self.code != None : self.construitMenu()
def ajoutExecution(self):
self.menuExecution = self.menubar.addMenu(QApplication.translate("Eficas", "Execution", None, QApplication.UnicodeUTF8))
self.actionExecution = QAction(self)
- icon6 = QIcon(self.repIcon+"/roue.png")
- self.actionExecution.setIcon(icon6)
+ if sys.platform[0:5]=="linux":
+ icon6 = QIcon(self.repIcon+"/roue.png")
+ self.actionExecution.setIcon(icon6)
+ else :
+ self.actionExecution.setText(QApplication.translate("Eficas", "Run", None))
self.actionExecution.setObjectName("actionExecution")
self.menuExecution.addAction(self.actionExecution)
if not(self.actionExecution in self.toolBar.actions()):
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 enleverNewInclude(self):
self.actionNouvel_Include.setVisible(False)
self.menuOptions.setTitle(tr("Options"))
def ADAO(self):
- self.griserActionsStructures()
+ self.enleverActionsStructures()
self.enleverNewInclude()
self.enleverRechercherDsCatalogue()
self.menuOptions.setTitle(tr("Options"))
def PSEN(self):
+ self.enleverActionsStructures()
+ self.enleverParametres()
+ self.enleverRechercherDsCatalogue()
+ self.enleverNewInclude()
self.ajoutExecution()
- self.ajoutSauveExecution()
+
+ def TELEMAC(self):
+ self.enleverActionsStructures()
+ self.enleverNewInclude()
def ChercheGrpMesh(self):
Msg,listeGroup=self.ChercheGrpMeshInSalome()
icon = QIcon(self.repIcon+"/New24.png")
self.action_Nouveau.setIcon(icon)
icon1 = QIcon(self.repIcon+"/Open24.png")
- self.action_Ouvrir.setIcon(icon1)
+ self.actionOuvrir.setIcon(icon1)
icon2 = QIcon(self.repIcon+"/Save24.png")
self.actionEnregistrer.setIcon(icon2)
icon3 = QIcon(self.repIcon+"/Cut24.png")
self.connect(self.action_Nouveau,SIGNAL("triggered()"),self.fileNew)
self.connect(self.actionNouvel_Include,SIGNAL("triggered()"),self.NewInclude)
- self.connect(self.action_Ouvrir,SIGNAL("triggered()"),self.fileOpen)
+ self.connect(self.actionOuvrir,SIGNAL("triggered()"),self.fileOpen)
self.connect(self.actionEnregistrer,SIGNAL("triggered()"),self.fileSave)
self.connect(self.actionEnregistrer_sous,SIGNAL("triggered()"),self.fileSaveAs)
self.connect(self.actionFermer,SIGNAL("triggered()"),self.fileClose)
self.connect(self.actionDeplier_replier,SIGNAL("triggered()"),self.Deplier)
self.connect(self.actionRapport_de_Validation,SIGNAL("triggered()"),self.jdcRapport)
+ self.connect(self.actionRegles_du_JdC,SIGNAL("triggered()"),self.jdcRegles)
self.connect(self.actionFichier_Source,SIGNAL("triggered()"),self.jdcFichierSource)
self.connect(self.actionFichier_Resultat,SIGNAL("triggered()"),self.visuJdcPy)
self.recent.prepend(fn)
if len(self.recent) > 9:
self.recent = self.recent[:9]
+ index=0
+ self.sauveRecents()
def sauveRecents(self) :
try :
maD=repAide+"/../Aide"
try :
indexAide=maD+"/fichiers_EFICAS/index.html"
- cmd="xdg-open "+indexAide
+ if sys.platform[0:5]=="linux" : cmd="xdg-open "+indexAide
+ else : cmd="start "+indexAide
os.system(cmd)
except:
QMessageBox.warning( self,tr( "Aide Indisponible"),tr( "l'aide n est pas installee "))
if self.code==None : return
try :
#if 1 :
- cmd="xdg-open "+self.fileDoc
+ if sys.platform[0:5]=="linux" : cmd="xdg-open "+self.fileDoc
+ else : cmd="start "+self.fileDoc
os.system(cmd)
except:
#else:
def jdcRapport(self):
self.viewmanager.handleViewJdcRapport()
+ def jdcRegles(self):
+ self.viewmanager.handleViewJdcRegles()
+
def gestionParam(self):
self.viewmanager.handlegestionParam()