adaoLogger.debug("preferenceChanged")
GuiImpl.preferenceChanged( section, setting )
-def activeViewChanged(toto, myView):
+def activeViewChanged(myView):
adaoLogger.debug("activeViewChanged")
+ GuiImpl.activeViewChanged(myView)
qtEficas.Appli.fileNew(self)
index = self.viewmanager.myQtab.currentIndex()
adao_case.name = str(self.viewmanager.myQtab.tabText(index))
- adao_case.eficas_editor = self.viewmanager.dict_editors[index]
+ adao_case.setEditor(self.viewmanager.dict_editors[index])
self.notifyObserver(EficasEvent.EVENT_TYPES.NEW, callbackId=adao_case)
def adaoFileSave(self, adao_case):
index = self.viewmanager.myQtab.currentIndex()
adao_case.name = str(self.viewmanager.myQtab.tabText(index))
adao_case.filename = str(self.viewmanager.dict_editors[index].fichier)
- adao_case.eficas_editor = self.viewmanager.dict_editors[index]
+ adao_case.setEditor(self.viewmanager.dict_editors[index])
self.notifyObserver(EficasEvent.EVENT_TYPES.SAVE, callbackId=adao_case)
def adaoFileSaveAs(self, adao_case):
index = self.viewmanager.myQtab.currentIndex()
adao_case.name = str(self.viewmanager.myQtab.tabText(index))
adao_case.filename = str(self.viewmanager.dict_editors[index].fichier)
- adao_case.eficas_editor = self.viewmanager.dict_editors[index]
+ adao_case.setEditor(self.viewmanager.dict_editors[index])
self.notifyObserver(EficasEvent.EVENT_TYPES.SAVE, callbackId=adao_case)
def adaoFileOpen(self, adao_case):
index = self.viewmanager.myQtab.currentIndex()
adao_case.name = str(self.viewmanager.myQtab.tabText(index))
adao_case.filename = str(self.viewmanager.dict_editors[index].fichier)
- adao_case.eficas_editor = self.viewmanager.dict_editors[index]
+ adao_case.setEditor(self.viewmanager.dict_editors[index])
self.notifyObserver(EficasEvent.EVENT_TYPES.OPEN, callbackId=adao_case)
def adaoFileClose(self, adao_case):
import traceback
import SalomePyQt
+import eficasSalome
+from Ihm import CONNECTOR
+import adaoGuiHelper
+import adaoStudyEditor
+
class AdaoCase:
def __init__(self):
self.eficas_editor = None # Editor object from Eficas
+ def setEditor(self, editor):
+ if editor is not self.eficas_editor:
+ self.eficas_editor = editor
+ # Connect to the jdc
+ print self.eficas_editor.jdc
+ CONNECTOR.Connect(self.eficas_editor.jdc, "valid", self.editorValidEvent, ())
+
+ # Rq on notera que l'on utilise isvalid dans isOk
+ # et que isOk appelle editorValidEvent
+ # il n'y a pas de boucle infini car isvalid n'émet
+ # son signal que si l'état a changé
+ def editorValidEvent(self):
+ adaoStudyEditor.updateItem(self.salome_study_id, self.salome_study_item, self)
+ adaoGuiHelper.refreshObjectBrowser()
+
def isOk(self):
if self.eficas_editor.jdc:
return self.eficas_editor.jdc.isvalid()