src/daEficas/prefs_ADAO.py
src/daSalome/Makefile
src/daSalome/daGUI/Makefile
+ src/daSalome/daGUI/daUtils/Makefile
src/daSalome/daGUI/daGuiImpl/Makefile
src/daSalome/daGUI/daEficasWrapper/Makefile
src/daSalome/daGUI/daGuiComponent/Makefile
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-SUBDIRS = daGuiImpl daEficasWrapper daGuiComponent
+SUBDIRS = daUtils daGuiImpl daEficasWrapper daGuiComponent
include $(top_srcdir)/adm_local/make_common_starter.am
mypkgpythondir =$(salomepythondir)/daEficasWrapper
mypkgpython_PYTHON = \
- eficasWrapper.py \
__init__.py \
- adaoEficasWrapper.py \
- adaoWrapperUtils.py
-
+ adaoEficasWrapper.py
import sys
import os
-from PyQt4 import QtGui,QtCore
-# Import from EFICAS_SRC
-import eficasSalome
-# Import from Eficas
-from InterfaceQT4 import qtEficas
+import eficasSalome # Import from EFICAS_SRC
+from InterfaceQT4 import qtEficas # Import from Eficas
+from PyQt4 import QtGui,QtCore # Import from PyQT
-from adaoWrapperUtils import *
+from daUtils.adaoEficasEvent import *
#
# ============================================
+++ /dev/null
-# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2010 EDF R&D
-#
-# 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.
-#
-# 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 - EDF R&D"
-
-class DevelException(Exception):
- def __init__(self, message):
- """Canonical constructor"""
- Exception.__init__(self,message)
-
-#
-# ==============================================================================
-# Interface of an eficas observer (for implementing the subject/observer pattern)
-# ==============================================================================
-#
-from daGuiImpl.enumerate import Enumerate
-
-class EficasObserver:
- """
- This class specifies the interface of an eficas observer. See example at the
- bottom of this file.
- """
- def processEficasEvent(self, eficasWrapper, eficasEvent):
- """
- This function should be implemented in the concrete Observer.
- @param eficasWrapper the instance of the source EficasWrapper
- @param eficasEvent the emitted event (instance of EficasEvent)
- """
- raise DevelException("processEficasEvent not implemented yet")
-
-class EficasEvent:
- EVENT_TYPES=Enumerate([
- 'CLOSE',
- 'SAVE',
- 'DESTROY',
- 'OPEN',
- 'REOPEN',
- 'NEW'
- ])
-
- def __init__(self,eventType,callbackId=None):
- """
- Creates an eficas event to be used by an EficasWrapper to notify an
- EficasObserver.
-
- The eventType depends of the context of creation. It specify the nature
- of the event inside EficasWrapper that triggers the creation of this instance.
-
- The callbackId is an object used by the EficasObserver to map the
- notification (this received event) with the initial event (callback)
- This object can be anything and has to be defined through a convention
- that both the EficasWrapper and the EficasObserver can understand.
- Typically, the eficas observer set the callback id to the eficas wrapper
- before running the asynchronous show. Then, when an event is raised by
- the eficas wrapper toward its observer, it embeds the callback id so that
- the observer can match the received event to the initial trigger context.
-
- @param the eventType to be choosen in the EVENT_TYPES
- @param callbackId an arbitrary data object
- """
- if not self.EVENT_TYPES.isValid(eventType):
- raise DevelException("The event type "+str(eventType)+" is not defined")
-
- self.eventType = eventType
- self.callbackId = callbackId
+++ /dev/null
-# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2010 EDF R&D
-#
-# 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.
-#
-# 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__="aribes/gboulant"
-
-from daGuiImpl import adaoLogger
-
-class DevelException(Exception):
- def __init__(self, message):
- """Canonical constructor"""
- Exception.__init__(self,message)
-
-#
-# ==============================================================================
-# Interface of an eficas observer (for implementing the subject/observer pattern)
-# ==============================================================================
-#
-from daGuiImpl.enumerate import Enumerate
-class EficasObserver:
- """
- This class specifies the interface of an eficas observer. See example at the
- bottom of this file.
- """
- def processEficasEvent(self, eficasWrapper, eficasEvent):
- """
- This function should be implemented in the concrete Observer.
- @param eficasWrapper the instance of the source EficasWrapper
- @param eficasEvent the emitted event (instance of EficasEvent)
- """
- raise DevelException("processEficasEvent not implemented yet")
-
-class EficasEvent:
- EVENT_TYPES=Enumerate([
- 'CLOSE',
- 'SAVE',
- 'DESTROY',
- 'OPEN',
- 'REOPEN',
- 'NEW'
- ])
-
- def __init__(self,eventType,callbackId=None):
- """
- Creates an eficas event to be used by an EficasWrapper to notify an
- EficasObserver.
-
- The eventType depends of the context of creation. It specify the nature
- of the event inside EficasWrapper that triggers the creation of this instance.
-
- The callbackId is an object used by the EficasObserver to map the
- notification (this received event) with the initial event (callback)
- This object can be anything and has to be defined through a convention
- that both the EficasWrapper and the EficasObserver can understand.
- Typically, the eficas observer set the callback id to the eficas wrapper
- before running the asynchronous show. Then, when an event is raised by
- the eficas wrapper toward its observer, it embeds the callback id so that
- the observer can match the received event to the initial trigger context.
-
- @param the eventType to be choosen in the EVENT_TYPES
- @param callbackId an arbitrary data object
- """
- if not self.EVENT_TYPES.isValid(eventType):
- raise DevelException("The event type "+str(eventType)+" is not defined")
-
- self.eventType = eventType
- self.callbackId = callbackId
from daGuiImpl.enumerate import Enumerate
from daGuiImpl.adaoCase import AdaoCase
from daEficasWrapper.adaoEficasWrapper import AdaoEficasWrapper
-from daEficasWrapper.eficasWrapper import EficasObserver
-from daEficasWrapper.eficasWrapper import EficasEvent
+
+from daUtils.adaoEficasEvent import *
import adaoGuiHelper
import adaoStudyEditor
import adaoLogger
--- /dev/null
+# Copyright (C) 2010 EDF R&D
+#
+# 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.
+#
+# 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
+#
+
+include $(top_srcdir)/adm_local/make_common_starter.am
+
+mypkgpythondir =$(salomepythondir)/daUtils
+
+mypkgpython_PYTHON = \
+ __init__.py \
+ adaoEficasEvent.py
+
--- /dev/null
+# -*- coding: iso-8859-1 -*-
+# Copyright (C) 2010 EDF R&D
+#
+# 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.
+#
+# 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 - EDF R&D"
+
+class DevelException(Exception):
+ def __init__(self, message):
+ """Canonical constructor"""
+ Exception.__init__(self,message)
+
+#
+# ==============================================================================
+# Interface of an eficas observer (for implementing the subject/observer pattern)
+# ==============================================================================
+#
+from daGuiImpl.enumerate import Enumerate
+
+class EficasObserver:
+ """
+ This class specifies the interface of an eficas observer. See example at the
+ bottom of this file.
+ """
+ def processEficasEvent(self, eficasWrapper, eficasEvent):
+ """
+ This function should be implemented in the concrete Observer.
+ @param eficasWrapper the instance of the source EficasWrapper
+ @param eficasEvent the emitted event (instance of EficasEvent)
+ """
+ raise DevelException("processEficasEvent not implemented yet")
+
+class EficasEvent:
+ EVENT_TYPES=Enumerate([
+ 'CLOSE',
+ 'SAVE',
+ 'DESTROY',
+ 'OPEN',
+ 'REOPEN',
+ 'NEW'
+ ])
+
+ def __init__(self,eventType,callbackId=None):
+ """
+ Creates an eficas event to be used by an EficasWrapper to notify an
+ EficasObserver.
+
+ The eventType depends of the context of creation. It specify the nature
+ of the event inside EficasWrapper that triggers the creation of this instance.
+
+ The callbackId is an object used by the EficasObserver to map the
+ notification (this received event) with the initial event (callback)
+ This object can be anything and has to be defined through a convention
+ that both the EficasWrapper and the EficasObserver can understand.
+ Typically, the eficas observer set the callback id to the eficas wrapper
+ before running the asynchronous show. Then, when an event is raised by
+ the eficas wrapper toward its observer, it embeds the callback id so that
+ the observer can match the received event to the initial trigger context.
+
+ @param the eventType to be choosen in the EVENT_TYPES
+ @param callbackId an arbitrary data object
+ """
+ if not self.EVENT_TYPES.isValid(eventType):
+ raise DevelException("The event type "+str(eventType)+" is not defined")
+
+ self.eventType = eventType
+ self.callbackId = callbackId