__current_context__ = __study2context__[studyID]
return __current_context__
-#from oma.salome.omaGuiManager import OmaGuiActionImpl
-#actionImpl = OmaGuiActionImpl()
+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.
toolbar button). The actionId value is the ID associated to the item.
"""
pass
-# actionImpl.processAction(actionId)
+ actionImpl.processAction(actionId)
# called when module's preferences are changed
#
UI_ELT_IDS = Enumerate([
'DATASSIM_MENU_ID',
+ 'NEW_DATASSIMCASE_ID',
],offset=950)
ACTIONS_MAP={
+ UI_ELT_IDS.NEW_DATASSIMCASE_ID:"newDatassimCase",
}
class DatassimGuiUiComponentBuilder:
# create toolbar
tid = sgPyQt.createTool( "DATASSIM" )
+ a = sgPyQt.createAction( UI_ELT_IDS.NEW_DATASSIMCASE_ID, "New case", "New case", "Create a new datassim case", "" )
+ sgPyQt.createMenu(a, mid)
+ sgPyQt.createTool(a, tid)
+
+class DatassimGuiActionImpl():
+ """
+ This class implements the ui actions concerning the management of oma study
+ cases.
+ """
+ __dlgNewStudyCase = None
+ __dlgEficasWrapper = None
+
+ def __init__(self):
+ pass
+ # This dialog is created once so that it can be recycled for each call
+ # to newOmaCase().
+ #self.__dlgNewStudyCase = DlgNewStudyCase()
+ #self.__dlgEficasWrapper = OmaEficasWrapper(parent=SalomePyQt.SalomePyQt().getDesktop())
+
+ # ==========================================================================
+ # Processing of ui actions
+ #
+ def processAction(self,actionId):
+ """
+ Main switch function for ui actions processing
+ """
+ if ACTIONS_MAP.has_key(actionId):
+ try:
+ functionName = ACTIONS_MAP[actionId]
+ getattr(self,functionName)()
+ except:
+ traceback.print_exc()
+ else:
+ msg = "The requested action is not implemented: " + str(actionId)
+ print msg
+
+ def newDatassimCase(self):
+ print "newDatassimCase"