#
class DatassimEficasWrapper(EficasWrapper):
- __myCallbackId = {}
- __close_editor = None
- __file_open_name = ""
-
def __init__(self, parent, code="DATASSIM"):
EficasWrapper.__init__(self, parent, code)
+ self.__myCallbackId = {}
+ self.__close_editor = None
+ self.__file_open_name = ""
def init_gui(self):
EficasWrapper.init_gui(self)
from daGuiImpl import datassimGuiHelper
from daGuiImpl.datassimGuiManager import DatassimGuiUiComponentBuilder
+from daGuiImpl.datassimGuiManager import DatassimGuiActionImpl
class GUIcontext:
uiComponentBuilder = None
+ actionImpl = None
def __init__(self):
self.uiComponentBuilder = DatassimGuiUiComponentBuilder()
+ self.actionImpl = DatassimGuiActionImpl()
__study2context__ = {}
def _setContext( studyID ):
global __study2context__, __current_context__
if not __study2context__.has_key(studyID):
+ print "create new context"
__study2context__[studyID] = GUIcontext()
pass
__current_context__ = __study2context__[studyID]
return __current_context__
-from daGuiImpl.datassimGuiManager import DatassimGuiActionImpl
-actionImpl = DatassimGuiActionImpl()
# This object does not need to be embedded in a GUI context object. A single
# instance for all studies is a priori sufficient.
# called when module is activated
# returns True if activating is successfull and False otherwise
def activate():
+ print "activate study", sgPyQt.getStudyId()
ctx = _setContext( sgPyQt.getStudyId() )
+ ctx.actionImpl.activate()
return True
# called when module is deactivated
toolbar button). The actionId value is the ID associated to the item.
"""
pass
- actionImpl.processAction(actionId)
+ ctx = _setContext( sgPyQt.getStudyId() )
+ ctx.actionImpl.processAction(actionId)
# called when module's preferences are changed
This class implements the ui actions concerning the management of oma study
cases.
"""
- __dlgEficasWrapper = None
- __Eficas_viewId = -1
def __init__(self):
pass
#self.__dlgNewStudyCase = DlgNewStudyCase()
self.__dlgEficasWrapper = DatassimEficasWrapper(parent=SalomePyQt.SalomePyQt().getDesktop())
self.__dlgEficasWrapper.addObserver(self)
+ self.__Eficas_viewId = -1
# ==========================================================================
# Processing of ui actions
self.__dlgEficasWrapper.init_gui()
self.__Eficas_viewId = SalomePyQt.SalomePyQt().createViewWithMain(self.__dlgEficasWrapper)
+ def activate(self):
+ self.showEficas()
def newDatassimCase(self):
self.showEficas()