From c0d6fc2ce5cbbc9f7689bf98a5fff9f4775a4817 Mon Sep 17 00:00:00 2001 From: "pascale.noyret" Date: Fri, 16 Sep 2016 16:44:30 +0200 Subject: [PATCH] closeEntete et autre --- InterfaceQT4/browser.py | 2 +- InterfaceQT4/configuration.py | 1 + InterfaceQT4/monRechercheCatalogue.py | 5 ----- InterfaceQT4/qtEficas.py | 14 +++++++++++++- UiQT4/CMakeLists.txt | 1 + UiQT4/desRechercheCatalogue.ui | 19 ------------------- 6 files changed, 16 insertions(+), 26 deletions(-) diff --git a/InterfaceQT4/browser.py b/InterfaceQT4/browser.py index 0bd9a26d..3631c829 100644 --- a/InterfaceQT4/browser.py +++ b/InterfaceQT4/browser.py @@ -316,7 +316,7 @@ class JDCNode(QTreeWidgetItem,GereRegles): nouvelItem=item.itemNode(self,item,itemExpand,ancien) self.children.append(nouvelItem) - #print "fin *********** build_children ",self,self.item, self.item.nom + #print "fin *********** build_children ",self,self.item, self.item.nom, self.children def chercheNoeudCorrespondant(self,objSimp): diff --git a/InterfaceQT4/configuration.py b/InterfaceQT4/configuration.py index 4f92bf84..af63f5d0 100644 --- a/InterfaceQT4/configuration.py +++ b/InterfaceQT4/configuration.py @@ -98,6 +98,7 @@ class CONFIG_BASE: self.affiche="alpha" self.closeAutreCommande = False self.closeFrameRechercheCommande = False + self.closeEntete = False #-------------------------------------- diff --git a/InterfaceQT4/monRechercheCatalogue.py b/InterfaceQT4/monRechercheCatalogue.py index ac115eb3..e0c22c64 100644 --- a/InterfaceQT4/monRechercheCatalogue.py +++ b/InterfaceQT4/monRechercheCatalogue.py @@ -46,11 +46,9 @@ class DRechercheCatalogue (Ui_desRechercheCatalogue ,QDialog): self.editor=editor self.CBRecherche.setEditable(True) if monEnvQT5 : - self.LERecherche.returnPressed.connect(self.rechercheLE) self.CBRecherche.lineEdit().returnPressed.connect(self.rechercheCB) self.CBRecherche.currentIndexChanged.connect(self.rechercheCB) else : - self.connect(self.LERecherche,SIGNAL("returnPressed()"),self.rechercheLE) self.connect(self.CBRecherche.lineEdit(),SIGNAL("returnPressed()"),self.rechercheCB) self.connect(self.CBRecherche,SIGNAL("currentIndexChanged(int)"),self.rechercheCB) @@ -70,9 +68,6 @@ class DRechercheCatalogue (Ui_desRechercheCatalogue ,QDialog): motAChercher=self.CBRecherche.lineEdit().text() self.recherche(motAChercher) - def rechercheLE(self): - motAChercher=self.LERecherche.text() - self.recherche(motAChercher) def recherche(self,motAChercher): if str(motAChercher)=="" or str(motAChercher) == None : return diff --git a/InterfaceQT4/qtEficas.py b/InterfaceQT4/qtEficas.py index e3cf63b5..27eafbd1 100755 --- a/InterfaceQT4/qtEficas.py +++ b/InterfaceQT4/qtEficas.py @@ -74,6 +74,7 @@ class Appli(Ui_Eficas,QMainWindow): import eficasSalome Accas.SalomeEntry = eficasSalome.SalomeEntry + #self.salome=1 self.multi=multi self.demande=multi # specifique PSEN if self.multi == False : @@ -101,6 +102,7 @@ class Appli(Ui_Eficas,QMainWindow): self.blEntete.insertWidget(0,self.toolBar) self.blEntete.insertWidget(0,self.menubar) + if self.CONFIGURATION.closeEntete==True : self.closeEntete() eficas_root_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) @@ -279,6 +281,12 @@ class Appli(Ui_Eficas,QMainWindow): def enleverRechercherDsCatalogue(self): self.actionRechercherDsCatalogue.setVisible(False) + def connectRechercherDsCatalogue(self): + if monEnvQT5: + self.actionRechercherDsCatalogue.triggered.connect(self.handleRechercherDsCatalogue) + else : + self.connect(self.actionRechercherDsCatalogue,SIGNAL("triggered()"),self.handleRechercherDsCatalogue) + def ZCRACKS(self): self.enleverNewInclude() self.toolBar.addSeparator() @@ -291,7 +299,6 @@ class Appli(Ui_Eficas,QMainWindow): def ADAO(self): self.enleverActionsStructures() self.enleverNewInclude() - self.enleverRechercherDsCatalogue() def ASTER(self) : self.menuTraduction = self.menubar.addMenu("menuTraduction") @@ -356,6 +363,7 @@ class Appli(Ui_Eficas,QMainWindow): def TELEMAC(self): self.enleverActionsStructures() self.enleverNewInclude() + self.connectRechercherDsCatalogue() def ajoutHelpPSEN(self): self.actionParametres_Eficas.setText('Help PSEN') @@ -760,6 +768,10 @@ class Appli(Ui_Eficas,QMainWindow): self.recent = QStringList() self.sauveRecents() + def handleRechercherDsCatalogue(self): + if not self.viewmanager : return + self.viewmanager.handleRechercherDsCatalogue() + def fileNew(self): try: self.viewmanager.newEditor() diff --git a/UiQT4/CMakeLists.txt b/UiQT4/CMakeLists.txt index 48ed0f90..a9a7e414 100644 --- a/UiQT4/CMakeLists.txt +++ b/UiQT4/CMakeLists.txt @@ -37,6 +37,7 @@ eficas_compile_ui ( desChoixCata.ui ) eficas_compile_ui ( desChoixCode.ui ) eficas_compile_ui ( desChoixCommandes.ui ) eficas_compile_ui ( desRecherche.ui ) +eficas_compile_ui ( desRechercheCatalogue.ui ) eficas_compile_ui ( desSelectVal.ui ) eficas_compile_ui ( desViewTexte.ui ) eficas_compile_ui ( desViewRegles.ui ) diff --git a/UiQT4/desRechercheCatalogue.ui b/UiQT4/desRechercheCatalogue.ui index 89513834..ef529e25 100644 --- a/UiQT4/desRechercheCatalogue.ui +++ b/UiQT4/desRechercheCatalogue.ui @@ -38,25 +38,6 @@ - - - - - 0 - 0 - - - - - 411 - 41 - - - - background:rgb(240,240,240) - - - -- 2.39.2