From 7b6e9cfef36c163a0d3eef22624e5195add2b260 Mon Sep 17 00:00:00 2001 From: Pascale Noyret Date: Fri, 5 Sep 2008 09:56:15 +0000 Subject: [PATCH] *** empty log message *** --- InterfaceQT4/compojdc.py | 2 +- InterfaceQT4/editor.py | 4 ++-- InterfaceQT4/monCommandePanel.py | 11 +++++++++++ InterfaceQT4/monCommentairePanel.py | 12 +++++++++++- InterfaceQT4/monFormulePanel.py | 12 +++++++++++- InterfaceQT4/monListeParamPanel.py | 12 +++++++++++- InterfaceQT4/monMCFactPanel.py | 12 +++++++++++- InterfaceQT4/monMCListAjoutPanel.py | 12 +++++++++++- InterfaceQT4/monMacroPanel.py | 12 +++++++++++- InterfaceQT4/monParamPanel.py | 12 +++++++++++- InterfaceQT4/monPlusieursBasePanel.py | 12 +++++++++++- InterfaceQT4/monPlusieursIntoPanel.py | 11 ++++++++++- InterfaceQT4/monRacinePanel.py | 22 +++++++++++++--------- InterfaceQT4/monSelectVal.py | 12 +++++++++++- InterfaceQT4/monUniqueASSDPanel.py | 12 +++++++++++- InterfaceQT4/monUniqueBasePanel.py | 12 +++++++++++- InterfaceQT4/monUniqueCompPanel.py | 12 +++++++++++- InterfaceQT4/monUniqueIntoPanel.py | 12 +++++++++++- InterfaceQT4/monUniqueSDCOPanel.py | 12 +++++++++++- InterfaceQT4/viewManager.py | 2 +- 20 files changed, 192 insertions(+), 28 deletions(-) diff --git a/InterfaceQT4/compojdc.py b/InterfaceQT4/compojdc.py index 58265149..2c2bd931 100644 --- a/InterfaceQT4/compojdc.py +++ b/InterfaceQT4/compojdc.py @@ -11,7 +11,7 @@ class Node(browser.JDCNode): from monRacinePanel import MonRacinePanel #return MonRacinePanel(self,parent=self.appliEficas.centralWidget()) #print self.treeParent.editor - print dir(self) + #print dir(self) return MonRacinePanel(self,parent=self.editor) diff --git a/InterfaceQT4/editor.py b/InterfaceQT4/editor.py index 73ccf78d..83f6cefc 100644 --- a/InterfaceQT4/editor.py +++ b/InterfaceQT4/editor.py @@ -40,7 +40,7 @@ import prefs VERSION_EFICAS = "EFICAS v1.14" -class JDCEditor(QWidget): +class JDCEditor(QSplitter): # -------------------------- # """ Editeur de jdc @@ -50,7 +50,7 @@ class JDCEditor(QWidget): #----------------------------------------------------------------------------------------------# print "debut JDCEditor __init__" - QWidget.__init__(self, QWParent) + QSplitter.__init__(self, QWParent) self.appliEficas = appli self.fichier = fichier self.jdc = jdc diff --git a/InterfaceQT4/monCommandePanel.py b/InterfaceQT4/monCommandePanel.py index 2ca34e65..e93392f2 100644 --- a/InterfaceQT4/monCommandePanel.py +++ b/InterfaceQT4/monCommandePanel.py @@ -33,6 +33,17 @@ from PyQt4.QtCore import * class DComm(Ui_DComm,QDialog): def __init__(self,parent ,modal ) : QDialog.__init__(self,parent) + if hasattr(parent,"leLayout"): + parent.leLayout.removeWidget(parent.leLayout.widgetActive) + parent.leLayout.widgetActive.close() + parent.leLayout.addWidget(self) + parent.leLayout.widgetActive=self + else: + parent.partieDroite=QWidget() + parent.leLayout=QGridLayout(parent.partieDroite) + parent.leLayout.addWidget(self) + parent.addWidget(parent.partieDroite) + parent.leLayout.widgetActive=self self.setupUi(self) self.setModal(modal) diff --git a/InterfaceQT4/monCommentairePanel.py b/InterfaceQT4/monCommentairePanel.py index b10e14db..b270ac22 100644 --- a/InterfaceQT4/monCommentairePanel.py +++ b/InterfaceQT4/monCommentairePanel.py @@ -34,8 +34,18 @@ from qtCommun import QTPanelTBW2 class DComment(Ui_DComment,QDialog): def __init__(self,parent ,modal ) : QDialog.__init__(self,parent) + if hasattr(parent,"leLayout"): + parent.leLayout.removeWidget(parent.leLayout.widgetActive) + parent.leLayout.widgetActive.close() + parent.leLayout.addWidget(self) + parent.leLayout.widgetActive=self + else: + parent.partieDroite=QWidget() + parent.leLayout=QGridLayout(parent.partieDroite) + parent.leLayout.addWidget(self) + parent.addWidget(parent.partieDroite) + parent.leLayout.widgetActive=self self.setupUi(self) - self.setModal(modal) # Import des panels diff --git a/InterfaceQT4/monFormulePanel.py b/InterfaceQT4/monFormulePanel.py index 4d86c187..bc1463b8 100644 --- a/InterfaceQT4/monFormulePanel.py +++ b/InterfaceQT4/monFormulePanel.py @@ -32,8 +32,18 @@ from PyQt4.QtCore import * class DFormule(Ui_DFormule,QDialog): def __init__(self,parent ,modal ) : QDialog.__init__(self,parent) + if hasattr(parent,"leLayout"): + parent.leLayout.removeWidget(parent.leLayout.widgetActive) + parent.leLayout.widgetActive.close() + parent.leLayout.addWidget(self) + parent.leLayout.widgetActive=self + else: + parent.partieDroite=QWidget() + parent.leLayout=QGridLayout(parent.partieDroite) + parent.leLayout.addWidget(self) + parent.addWidget(parent.partieDroite) + parent.leLayout.widgetActive=self self.setupUi(self) - self.setModal(modal) # Import des panels diff --git a/InterfaceQT4/monListeParamPanel.py b/InterfaceQT4/monListeParamPanel.py index a3a581d8..dedea6bf 100644 --- a/InterfaceQT4/monListeParamPanel.py +++ b/InterfaceQT4/monListeParamPanel.py @@ -29,8 +29,18 @@ from PyQt4.QtCore import * class DLisParam(Ui_DLisParam,QDialog): def __init__(self,parent ,modal ) : QDialog.__init__(self,parent) + if hasattr(parent,"leLayout"): + parent.leLayout.removeWidget(parent.leLayout.widgetActive) + parent.leLayout.widgetActive.close() + parent.leLayout.addWidget(self) + parent.leLayout.widgetActive=self + else: + parent.partieDroite=QWidget() + parent.leLayout=QGridLayout(parent.partieDroite) + parent.leLayout.addWidget(self) + parent.addWidget(parent.partieDroite) + parent.leLayout.widgetActive=self self.setupUi(self) - self.setModal(modal) class MonListeParamPanel(DLisParam): """ diff --git a/InterfaceQT4/monMCFactPanel.py b/InterfaceQT4/monMCFactPanel.py index c5b61ea3..2b357dd7 100644 --- a/InterfaceQT4/monMCFactPanel.py +++ b/InterfaceQT4/monMCFactPanel.py @@ -30,8 +30,18 @@ from PyQt4.QtCore import * class DMCFact(Ui_DMCFact,QDialog): def __init__(self,parent ,modal ) : QDialog.__init__(self,parent) + if hasattr(parent,"leLayout"): + parent.leLayout.removeWidget(parent.leLayout.widgetActive) + parent.leLayout.widgetActive.close() + parent.leLayout.addWidget(self) + parent.leLayout.widgetActive=self + else: + parent.partieDroite=QWidget() + parent.leLayout=QGridLayout(parent.partieDroite) + parent.leLayout.addWidget(self) + parent.addWidget(parent.partieDroite) + parent.leLayout.widgetActive=self self.setupUi(self) - self.setModal(modal) # Import des panels diff --git a/InterfaceQT4/monMCListAjoutPanel.py b/InterfaceQT4/monMCListAjoutPanel.py index 5e0868b2..10411c87 100644 --- a/InterfaceQT4/monMCListAjoutPanel.py +++ b/InterfaceQT4/monMCListAjoutPanel.py @@ -30,8 +30,18 @@ from qtCommun import QTPanel class DMCListAjout(Ui_DMCListAjout,QDialog): def __init__(self,parent ,modal ) : QDialog.__init__(self,parent) + if hasattr(parent,"leLayout"): + parent.leLayout.removeWidget(parent.leLayout.widgetActive) + parent.leLayout.widgetActive.close() + parent.leLayout.addWidget(self) + parent.leLayout.widgetActive=self + else: + parent.partieDroite=QWidget() + parent.leLayout=QGridLayout(parent.partieDroite) + parent.leLayout.addWidget(self) + parent.addWidget(parent.partieDroite) + parent.leLayout.widgetActive=self self.setupUi(self) - self.setModal(modal) # Import des panels diff --git a/InterfaceQT4/monMacroPanel.py b/InterfaceQT4/monMacroPanel.py index 4897377b..b395ba88 100644 --- a/InterfaceQT4/monMacroPanel.py +++ b/InterfaceQT4/monMacroPanel.py @@ -33,8 +33,18 @@ from PyQt4.QtCore import * class DMacro(Ui_DComm,QDialog): def __init__(self,parent ,modal ) : QDialog.__init__(self,parent) + if hasattr(parent,"leLayout"): + parent.leLayout.removeWidget(parent.leLayout.widgetActive) + parent.leLayout.widgetActive.close() + parent.leLayout.addWidget(self) + parent.leLayout.widgetActive=self + else: + parent.partieDroite=QWidget() + parent.leLayout=QGridLayout(parent.partieDroite) + parent.leLayout.addWidget(self) + parent.addWidget(parent.partieDroite) + parent.leLayout.widgetActive=self self.setupUi(self) - self.setModal(modal) # Import des panels diff --git a/InterfaceQT4/monParamPanel.py b/InterfaceQT4/monParamPanel.py index a15e7e1b..2b4e0b13 100644 --- a/InterfaceQT4/monParamPanel.py +++ b/InterfaceQT4/monParamPanel.py @@ -35,8 +35,18 @@ from qtCommun import QTPanelTBW2 class DParam(Ui_DParam,QDialog): def __init__(self,parent ,modal ) : QDialog.__init__(self,parent) + if hasattr(parent,"leLayout"): + parent.leLayout.removeWidget(parent.leLayout.widgetActive) + parent.leLayout.widgetActive.close() + parent.leLayout.addWidget(self) + parent.leLayout.widgetActive=self + else: + parent.partieDroite=QWidget() + parent.leLayout=QGridLayout(parent.partieDroite) + parent.leLayout.addWidget(self) + parent.addWidget(parent.partieDroite) + parent.leLayout.widgetActive=self self.setupUi(self) - self.setModal(modal) # Import des panels diff --git a/InterfaceQT4/monPlusieursBasePanel.py b/InterfaceQT4/monPlusieursBasePanel.py index ebb3c778..90ae990e 100644 --- a/InterfaceQT4/monPlusieursBasePanel.py +++ b/InterfaceQT4/monPlusieursBasePanel.py @@ -33,8 +33,18 @@ from politiquesValidation import PolitiquePlusieurs class DPlusBase (Ui_DPlusBase,QDialog): def __init__(self,parent ,modal ) : QDialog.__init__(self,parent) + if hasattr(parent,"leLayout"): + parent.leLayout.removeWidget(parent.leLayout.widgetActive) + parent.leLayout.widgetActive.close() + parent.leLayout.addWidget(self) + parent.leLayout.widgetActive=self + else: + parent.partieDroite=QWidget() + parent.leLayout=QGridLayout(parent.partieDroite) + parent.leLayout.addWidget(self) + parent.addWidget(parent.partieDroite) + parent.leLayout.widgetActive=self self.setupUi(self) - self.setModal(modal) # Import des panels diff --git a/InterfaceQT4/monPlusieursIntoPanel.py b/InterfaceQT4/monPlusieursIntoPanel.py index 3d0210a2..014295aa 100644 --- a/InterfaceQT4/monPlusieursIntoPanel.py +++ b/InterfaceQT4/monPlusieursIntoPanel.py @@ -33,8 +33,17 @@ from politiquesValidation import PolitiquePlusieurs class DPlusInto(Ui_DPlusInto,QDialog): def __init__(self,parent ,modal ) : QDialog.__init__(self,parent) + if hasattr(parent,"leLayout"): + parent.leLayout.removeWidget(parent.leLayout.widgetActive) + parent.leLayout.addWidget(self) + parent.leLayout.widgetActive=self + else: + parent.partieDroite=QWidget() + parent.leLayout=QGridLayout(parent.partieDroite) + parent.leLayout.addWidget(self) + parent.addWidget(parent.partieDroite) + parent.leLayout.widgetActive=self self.setupUi(self) - self.setModal(modal) class MonPlusieursIntoPanel(DPlusInto,QTPanel,SaisieValeur): """ diff --git a/InterfaceQT4/monRacinePanel.py b/InterfaceQT4/monRacinePanel.py index 2f6e6e36..99c6de4f 100644 --- a/InterfaceQT4/monRacinePanel.py +++ b/InterfaceQT4/monRacinePanel.py @@ -24,18 +24,25 @@ from desRacine import Ui_DRac from qtCommun import QTPanel from qtCommun import QTPanelTBW2 -#from qtCommun import itemColore + from PyQt4 import * from PyQt4.QtGui import * from PyQt4.QtCore import * class DRac(Ui_DRac,QWidget): def __init__(self,parent ,modal = 0 ) : - print parent - print parent.__class__ - print parent.QWParent - print dir(parent.QWParent) - QWidget.__init__(self,parent.QWParent) + QWidget.__init__(self,parent) + if hasattr(parent,"leLayout"): + parent.leLayout.removeWidget(parent.leLayout.widgetActive) + parent.leLayout.widgetActive.close() + parent.leLayout.addWidget(self) + parent.leLayout.widgetActive=self + else: + parent.partieDroite=QWidget() + parent.leLayout=QGridLayout(parent.partieDroite) + parent.leLayout.addWidget(self) + parent.addWidget(parent.partieDroite) + parent.leLayout.widgetActive=self self.setupUi(self) @@ -48,9 +55,6 @@ class MonRacinePanel(DRac,QTPanelTBW2): discrètes """ def __init__(self,node, parent = None,name = None,fl = 0): - print "hhhhhhhhhhhhhhhhhhhhhhhhhhhhh" - print parent - print "hhhhhhhhhhhhhhhhhhhhhhhhhhhhh" DRac.__init__(self,parent,0) self.connecterSignaux() QTPanel.__init__(self,node,parent) diff --git a/InterfaceQT4/monSelectVal.py b/InterfaceQT4/monSelectVal.py index b42e7669..f4028851 100644 --- a/InterfaceQT4/monSelectVal.py +++ b/InterfaceQT4/monSelectVal.py @@ -28,8 +28,18 @@ from PyQt4.QtCore import * class DSelVal(Ui_DSelVal,QDialog): def __init__(self,parent ,modal ) : QDialog.__init__(self,parent) + if hasattr(parent,"leLayout"): + parent.leLayout.removeWidget(parent.leLayout.widgetActive) + parent.leLayout.widgetActive.close() + parent.leLayout.addWidget(self) + parent.leLayout.widgetActive=self + else: + parent.partieDroite=QWidget() + parent.leLayout=QGridLayout(parent.partieDroite) + parent.leLayout.addWidget(self) + parent.addWidget(parent.partieDroite) + parent.leLayout.widgetActive=self self.setupUi(self) - self.setModal(modal) class MonSelectVal(DSelVal): """ diff --git a/InterfaceQT4/monUniqueASSDPanel.py b/InterfaceQT4/monUniqueASSDPanel.py index 79245bb3..5c85b49d 100644 --- a/InterfaceQT4/monUniqueASSDPanel.py +++ b/InterfaceQT4/monUniqueASSDPanel.py @@ -34,8 +34,18 @@ from politiquesValidation import PolitiqueUnique class DUnASSD(Ui_DUnASSD,QDialog): def __init__(self,parent ,modal ) : QDialog.__init__(self,parent) + if hasattr(parent,"leLayout"): + parent.leLayout.removeWidget(parent.leLayout.widgetActive) + parent.leLayout.widgetActive.close() + parent.leLayout.addWidget(self) + parent.leLayout.widgetActive=self + else: + parent.partieDroite=QWidget() + parent.leLayout=QGridLayout(parent.partieDroite) + parent.leLayout.addWidget(self) + parent.addWidget(parent.partieDroite) + parent.leLayout.widgetActive=self self.setupUi(self) - self.setModal(modal) # Import des panels diff --git a/InterfaceQT4/monUniqueBasePanel.py b/InterfaceQT4/monUniqueBasePanel.py index ecf9b57f..e7503d0e 100644 --- a/InterfaceQT4/monUniqueBasePanel.py +++ b/InterfaceQT4/monUniqueBasePanel.py @@ -33,8 +33,18 @@ from politiquesValidation import PolitiqueUnique class DUnBase(Ui_DUnBase,QDialog): def __init__(self,parent ,modal ) : QDialog.__init__(self,parent) + if hasattr(parent,"leLayout"): + parent.leLayout.removeWidget(parent.leLayout.widgetActive) + parent.leLayout.widgetActive.close() + parent.leLayout.addWidget(self) + parent.leLayout.widgetActive=self + else: + parent.partieDroite=QWidget() + parent.leLayout=QGridLayout(parent.partieDroite) + parent.leLayout.addWidget(self) + parent.addWidget(parent.partieDroite) + parent.leLayout.widgetActive=self self.setupUi(self) - self.setModal(modal) # Import des panels diff --git a/InterfaceQT4/monUniqueCompPanel.py b/InterfaceQT4/monUniqueCompPanel.py index 62e7d39b..5550cb93 100644 --- a/InterfaceQT4/monUniqueCompPanel.py +++ b/InterfaceQT4/monUniqueCompPanel.py @@ -32,8 +32,18 @@ from politiquesValidation import PolitiqueUnique class DUnComp(Ui_DUnComp,QDialog): def __init__(self,parent ,modal ) : QDialog.__init__(self,parent) + if hasattr(parent,"leLayout"): + parent.leLayout.removeWidget(parent.leLayout.widgetActive) + parent.leLayout.widgetActive.close() + parent.leLayout.addWidget(self) + parent.leLayout.widgetActive=self + else: + parent.partieDroite=QWidget() + parent.leLayout=QGridLayout(parent.partieDroite) + parent.leLayout.addWidget(self) + parent.addWidget(parent.partieDroite) + parent.leLayout.widgetActive=self self.setupUi(self) - self.setModal(modal) # Import des panels diff --git a/InterfaceQT4/monUniqueIntoPanel.py b/InterfaceQT4/monUniqueIntoPanel.py index ce24e4ba..e0b28432 100644 --- a/InterfaceQT4/monUniqueIntoPanel.py +++ b/InterfaceQT4/monUniqueIntoPanel.py @@ -33,8 +33,18 @@ from politiquesValidation import PolitiqueUnique class DUnIn(Ui_DUnIn,QDialog): def __init__(self,parent ,modal ) : QDialog.__init__(self,parent) + if hasattr(parent,"leLayout"): + parent.leLayout.removeWidget(parent.leLayout.widgetActive) + parent.leLayout.widgetActive.close() + parent.leLayout.addWidget(self) + parent.leLayout.widgetActive=self + else: + parent.partieDroite=QWidget() + parent.leLayout=QGridLayout(parent.partieDroite) + parent.leLayout.addWidget(self) + parent.addWidget(parent.partieDroite) + parent.leLayout.widgetActive=self self.setupUi(self) - self.setModal(modal) class MonUniqueIntoPanel(DUnIn,QTPanel,SaisieValeur): diff --git a/InterfaceQT4/monUniqueSDCOPanel.py b/InterfaceQT4/monUniqueSDCOPanel.py index 9f82da16..b03d24cb 100644 --- a/InterfaceQT4/monUniqueSDCOPanel.py +++ b/InterfaceQT4/monUniqueSDCOPanel.py @@ -32,8 +32,18 @@ from qtSaisie import SaisieSDCO class DUnSDCO(Ui_DUnSDCO,QDialog): def __init__(self,parent ,modal ) : QDialog.__init__(self,parent) + if hasattr(parent,"leLayout"): + parent.leLayout.removeWidget(parent.leLayout.widgetActive) + parent.leLayout.widgetActive.close() + parent.leLayout.addWidget(self) + parent.leLayout.widgetActive=self + else: + parent.partieDroite=QWidget() + parent.leLayout=QGridLayout(parent.partieDroite) + parent.leLayout.addWidget(self) + parent.addWidget(parent.partieDroite) + parent.leLayout.widgetActive=self self.setupUi(self) - self.setModal(modal) # Import des panels diff --git a/InterfaceQT4/viewManager.py b/InterfaceQT4/viewManager.py index b8be765c..86d3d3f7 100644 --- a/InterfaceQT4/viewManager.py +++ b/InterfaceQT4/viewManager.py @@ -155,7 +155,7 @@ class MyTabview: txt = '%s (ro)' % txt self.myQtab.addTab(win, txt) self.myQtab.setCurrentWidget(win) - self.cuurentEditor=win + self.currentEditor=win win.setFocus() def getOpenStartDir(self) : -- 2.39.2