Salome HOME
Updating version and copyright date information
[modules/adao.git] / src / daSalome / daGUI / ADAOGUI.py
index 39d5a7b9d3ca2d74abf1e2f3c7d738b95afd4930..bc619becb62ff5f2e23c4b7aa1abd557372061d2 100644 (file)
@@ -1,22 +1,26 @@
-# -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2010  EDF R&D
+# -*- coding: utf-8 -*-
 #
-#  This library is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU Lesser General Public
-#  License as published by the Free Software Foundation; either
-#  version 2.1 of the License.
+# Copyright (C) 2008-2020 EDF R&D
 #
-#  This library is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-#  Lesser General Public License for more details.
+# This file is part of SALOME ADAO module
 #
-#  You should have received a copy of the GNU Lesser General Public
-#  License along with this library; if not, write to the Free Software
-#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
 #
-#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
 #
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# Author: AndrĂ© Ribes, andre.ribes@edf.fr, EDF R&D
 
 """
 This python file provides the implementation of the interface of the GUI part of
@@ -29,49 +33,69 @@ reasons:
    modules, for example for test purposes.
 """
 
+import adao
 from daGuiImpl import ADAOGUI_impl as GuiImpl
+from daUtils import adaoLogger
 
+adaoLogger.debug("Import ADAOGUI")
 
 # called when module is initialized
 # perform initialization actions
 def initialize():
-    GuiImpl.initialize()
+  adaoLogger.debug("initialize")
+  GuiImpl.initialize()
 
 # called when module is initialized
 # return map of popup windows to be used by the module
 def windows():
-    return GuiImpl.windows()
+  adaoLogger.debug("windows")
+  return GuiImpl.windows()
+
+def views():
+  adaoLogger.debug("views")
+  return GuiImpl.views()
 
 # called when module is initialized
 # export module's preferences
 def createPreferences():
-    GuiImpl.createPreferences()
+  adaoLogger.debug("createPreferences")
+  GuiImpl.createPreferences()
 
 # called when module is activated
 # returns True if activating is successfull and False otherwise
 def activate():
-    return GuiImpl.activate()
+  adaoLogger.debug("activate")
+  return GuiImpl.activate()
 
 # called when module is deactivated
 def deactivate():
-    GuiImpl.deactivate()
+  adaoLogger.debug("deactivate")
+  GuiImpl.deactivate()
 
 # called when active study is changed
 # active study ID is passed as parameter
-def activeStudyChanged( studyID ):
-    GuiImpl.activeStudyChanged( studyID )
+#~ def activeStudyChanged( studyID ):
+  #~ adaoLogger.debug("activeStudyChanged")
+  #~ GuiImpl.activeStudyChanged( studyID )
 
 # called when popup menu is invoked
 # popup menu and menu context are passed as parameters
 def createPopupMenu( popup, context ):
-    GuiImpl.createPopupMenu(popup, context )
+  adaoLogger.debug("createPopupMenu")
+  GuiImpl.createPopupMenu(popup, context )
 
 # called when GUI action is activated
 # action ID is passed as parameter
 def OnGUIEvent(commandID) :
-    GuiImpl.OnGUIEvent(commandID)
+  adaoLogger.debug("OnGUIEvent")
+  GuiImpl.OnGUIEvent(commandID)
 
 # called when module's preferences are changed
 # preference's resources section and setting name are passed as parameters
 def preferenceChanged( section, setting ):
-    GuiImpl.preferenceChanged( section, setting )
+  adaoLogger.debug("preferenceChanged")
+  GuiImpl.preferenceChanged( section, setting )
+
+def activeViewChanged(myView):
+  adaoLogger.debug("activeViewChanged")
+  GuiImpl.activeViewChanged(myView)