ADD_SUBDIRECTORY(resources)
ADD_SUBDIRECTORY(src)
ADD_SUBDIRECTORY(idl)
+ADD_SUBDIRECTORY(tests)
IF(SALOME_BUILD_DOC)
ADD_SUBDIRECTORY(doc)
ENDIF()
ADD_SUBDIRECTORY(HYDRO)
ADD_SUBDIRECTORY(HYDROGUI)
+ADD_SUBDIRECTORY(HYDROTools)
ADD_SUBDIRECTORY(salome_hydro)
#ADD_SUBDIRECTORY(mascaret_wrapper)
import os
import sys
-from PyQt4 import QtCore, QtGui
+from PyQt4 import QtCore, QtGui, uic
from MEDLoader import MEDFileMesh
# TODO: get rid of sys.path.append() ?
-sys.path.append(os.path.join(os.environ['HYDROSOLVER_ROOT_DIR'], 'src', 'HYDROTools'))
-import boundaryConditions
+hydro_solver_root = os.path.join(os.environ['HYDROSOLVER_ROOT_DIR'], 'lib', 'python2.7', 'site-packages', 'salome')
+sys.path.append(os.path.join(hydro_solver_root, 'salome', 'hydrotools'))
-from Ui_BndConditionsDialog import Ui_BoundaryConditionsDialog
+import boundaryConditions
ROW_PROPERTY_NAME = "row"
editor.setGeometry(option.rect)
"""Boundary conditions definition dialog"""
-class BoundaryConditionsDialog(Ui_BoundaryConditionsDialog, QtGui.QDialog):
+class BoundaryConditionsDialog(QtGui.QDialog):
def __init__(self, parent = None, modal = 0):
QtGui.QDialog.__init__(self, parent)
- Ui_BoundaryConditionsDialog.__init__(self)
- self.setupUi(self)
-
+ uic.loadUi(os.path.join(hydro_solver_root,'BndConditionsDialog.ui'), self)
+
# Connections
self.medFileButton.clicked.connect(self.on_med_file_browse)
self.bndConditionsFileButton.clicked.connect(self.on_bnd_file_browse)
"""Initialize presets"""
def init_presets(self):
# TODO: determine another presets path
- file_path = os.path.join(os.environ['HYDROSOLVER_ROOT_DIR'], 'tests', 'data', 'bnd_conditions_presets.txt')
+ presets_data_root = os.path.join(os.environ['HYDROSOLVER_ROOT_DIR'], 'lib', 'python2.7', 'site-packages', 'salome', 'tests', 'data')
+ file_path = os.path.join(presets_data_root, 'bnd_conditions_presets.txt')
reader = boundaryConditions.PresetReader(file_path)
self.presets = reader.read()
SET(PYFILES
HYDROSOLVERGUI.py
+ BndConditionsDialog.py
+)
+
+SET(UIFILES
+ BndConditionsDialog.ui
)
# --- rules ---
SALOME_INSTALL_SCRIPTS("${PYFILES}" ${SALOME_INSTALL_PYTHON})
+INSTALL( FILES ${UIFILES} DESTINATION ${SALOME_INSTALL_PYTHON})
# The file TextDisplayDialog.ui is not compiled here because it is not used anymore.
--- /dev/null
+# Copyright (C) 2012-2013 EDF
+#
+# This file is part of SALOME HYDRO module.
+#
+# SALOME HYDRO module is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# SALOME HYDRO module 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with SALOME HYDRO module. If not, see <http://www.gnu.org/licenses/>.
+
+# --- Python files ---
+
+SET(DATAFILES
+ data/bnd_conditions_presets.txt
+ data/bnd_conditions1.cli
+)
+
+SET(PYFILES
+ boundaryConditionsTest.py
+ boundaryConditionsDlgTest.py
+)
+
+# --- rules ---
+
+SALOME_INSTALL_SCRIPTS( "${PYFILES}" ${SALOME_INSTALL_PYTHON}/tests)
+INSTALL( FILES ${DATAFILES} DESTINATION ${SALOME_INSTALL_PYTHON}/tests/data)
\ No newline at end of file
cur_dir = os.path.dirname(os.path.realpath(__file__))
data_dir = os.path.join(cur_dir, "data")
-sys.path.append(os.path.join(cur_dir, "..", "src", "HYDROGUI"))
+hydro_solver_root = os.path.join(os.environ['HYDROSOLVER_ROOT_DIR'], 'lib', 'python2.7', 'site-packages', 'salome')
+sys.path.append(hydro_solver_root)
from BndConditionsDialog import BoundaryConditionsDialog
# Show the dialog
cur_dir = os.path.dirname(os.path.realpath(__file__))
data_dir = os.path.join(cur_dir, "data")
-sys.path.append(os.path.join(cur_dir, "..", "src", "HYDROTools"))
+hydro_solver_root = os.path.join(os.environ['HYDROSOLVER_ROOT_DIR'], 'lib', 'python2.7', 'site-packages', 'salome')
+sys.path.append(hydro_solver_root)
import boundaryConditions