mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
Compare commits
40
Commits
adists_new
...
setup.py
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
815716da07 | ||
|
|
c288a390b5 | ||
|
|
f1377f6336 | ||
|
|
6ac808d842 | ||
|
|
b6aa0afdc7 | ||
|
|
03da38eeb0 | ||
|
|
e970b2c07a | ||
|
|
8d336b888a | ||
|
|
f4b7131b98 | ||
|
|
07cdf72528 | ||
|
|
7d235fdcc2 | ||
|
|
45d6f228cf | ||
|
|
31974bc7b6 | ||
|
|
e87db62dce | ||
|
|
1eec6ffc85 | ||
|
|
35dd851e08 | ||
|
|
50686e1b65 | ||
|
|
e45eb3fd69 | ||
|
|
dd86b8b461 | ||
|
|
57d43cd5d3 | ||
|
|
14b5b5e3df | ||
|
|
a7e43ca6a7 | ||
|
|
8ca21c413f | ||
|
|
61fd54c496 | ||
|
|
b017127b3a | ||
|
|
52f2d15280 | ||
|
|
5c86e46c72 | ||
|
|
a5648851f2 | ||
|
|
cb41520a20 | ||
|
|
537612e5e3 | ||
|
|
4e0c671f68 | ||
|
|
507cfb9d53 | ||
|
|
2013009e8a | ||
|
|
f1a1d08458 | ||
|
|
7de6cc4468 | ||
|
|
783d83e4cc | ||
|
|
c366a1a4e7 | ||
|
|
b784cab94b | ||
|
|
78e361d486 | ||
|
|
f745dce04e |
No files matched your search
+58
-2
@@ -29,7 +29,8 @@ stages:
|
||||
#############
|
||||
|
||||
variables:
|
||||
MAGE_8_VERSION: "v8.3.5"
|
||||
MAGE_8_VERSION: "v8.3.6"
|
||||
CUSTOM_PYTHON_VERSION: "3.10.14-build2"
|
||||
|
||||
dl-mage8-doc:
|
||||
stage: downloads
|
||||
@@ -83,6 +84,21 @@ dl-mage8-windows:
|
||||
- mage8-windows/mailleurTT.exe
|
||||
- mage8-windows/libbief.dll
|
||||
|
||||
dl-python-linux:
|
||||
stage: downloads
|
||||
tags:
|
||||
- linux
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == 'setup.py' || $CI_COMMIT_TAG
|
||||
script:
|
||||
- curl -L -o python.tar.xz https://gitlab.irstea.fr/parouby/custom-python-build/-/releases/$CUSTOM_PYTHON_VERSION/downloads/python.tar.xz
|
||||
- mkdir -p linux-python/
|
||||
- cd linux-python
|
||||
- tar xvf ../python.tar.xz
|
||||
artifacts:
|
||||
paths:
|
||||
- linux-python
|
||||
|
||||
#############
|
||||
# CONFIGURE #
|
||||
#############
|
||||
@@ -262,6 +278,11 @@ build-linux:
|
||||
- cp -v ../mage8-linux/* pamhyr/mage8/
|
||||
# Copy Pamhyr
|
||||
- cp -r dist/pamhyr/* pamhyr/
|
||||
# Pamhyr script to force x11
|
||||
- echo '#!/usr/bin/env bash' > pamhyr/pamhyr-x11
|
||||
- echo "" >> pamhyr/pamhyr-x11
|
||||
- echo "GDK_BACKEND=x11 ./pamhyr $@" >> pamhyr/pamhyr-x11
|
||||
- chmod +x pamhyr/pamhyr-x11
|
||||
# Copy Pamhyr resources
|
||||
- mkdir -p pamhyr/_internal/View
|
||||
- mkdir -p pamhyr/_internal/View/ui
|
||||
@@ -333,7 +354,7 @@ build-windows:
|
||||
- python -m pip install -U -r ..\requirements.txt
|
||||
# Run Pyinstaller
|
||||
# - pyinstaller --noconsole -y ..\src\pamhyr.py
|
||||
- pyinstaller --hide-console hide-early -y ..\src\pamhyr.py
|
||||
- pyinstaller -i ../src/View/ui/ressources/icon.ico --hide-console hide-early -y ..\src\pamhyr.py
|
||||
# Create directory
|
||||
- mkdir pamhyr
|
||||
- dir
|
||||
@@ -403,6 +424,41 @@ windows-package-exe:
|
||||
- copy ..\packages\pamhyr.nsi pamhyr.nsi
|
||||
- .\make-windows-exe.bat
|
||||
|
||||
linux-python-with-sources:
|
||||
stage: package
|
||||
tags:
|
||||
- release
|
||||
- linux
|
||||
needs:
|
||||
- job: dl-python-linux
|
||||
artifacts: true
|
||||
- job: set-version
|
||||
artifacts: true
|
||||
- job: build-lang
|
||||
artifacts: true
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == 'setup.py' || $CI_COMMIT_TAG
|
||||
artifacts:
|
||||
paths:
|
||||
- linux-sources-with-python.tar.xz
|
||||
script:
|
||||
- git archive --format=tar.gz --output=src.tar.gz origin/$CI_COMMIT_BRANCH
|
||||
- cd linux-python
|
||||
- mkdir -p pamhyr
|
||||
- cd pamhyr
|
||||
- tar xvf ../../src.tar.gz
|
||||
- cp -v ../../VERSION ./
|
||||
- cp -v ../../src/lang/*.qm ./src/lang/
|
||||
- cd ..
|
||||
- cp ../packages/setup.sh ./setup.sh
|
||||
- sed -i 's|python3|$(dirname $0)/python/python|' setup.sh
|
||||
- sed -i 's|.pamhyr-env|$(dirname $0)/.pamhyr-env|' setup.sh
|
||||
- sed -i 's|./pamhyr|$(dirname $0)/pamhyr|' setup.sh
|
||||
- cd ..
|
||||
- mv linux-python pamhyr
|
||||
- tar cf linux-sources-with-python.tar.xz pamhyr
|
||||
- mv pamhyr linux-python # Keep 'pamhyr' path avalaible
|
||||
|
||||
########
|
||||
# HASH #
|
||||
########
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
guix shell --manifest=manifest.scm -- python3 ./src/pamhyr.py $@
|
||||
@@ -0,0 +1,22 @@
|
||||
;; manifest.scm -- Pamhyr
|
||||
;; Copyright (C) 2024 INRAE
|
||||
;;
|
||||
;; This program 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.
|
||||
;;
|
||||
;; This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
(specifications->manifest
|
||||
(list "python" "zlib" "python-platformdirs" "python-lxml"
|
||||
"python-pyqt@5" "python-pyqt5-sip"
|
||||
"python-pyqtgraph" "python-qscintilla"
|
||||
"python-numpy" "python-shapely" "python-pyshp"
|
||||
"python-matplotlib"))
|
||||
@@ -3,6 +3,7 @@
|
||||
!define LIC_NAME "LICENSE"
|
||||
!define APP_NAME "PAMHYR"
|
||||
|
||||
Icon "pamhyr\_internal\View\ui\ressources\icon.ico"
|
||||
Name "Pamhyr2"
|
||||
OutFile "pamhyr-windows.exe"
|
||||
LicenseData "pamhyr\_internal\LICENSE"
|
||||
|
||||
Executable
+54
@@ -0,0 +1,54 @@
|
||||
#! /usr/bin/env bash
|
||||
# setup.sh -- Pamhyr
|
||||
# Copyright (C) 2024 INRAE
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
function perr() {
|
||||
>&2 echo $1
|
||||
}
|
||||
|
||||
function try() {
|
||||
echo "$1"
|
||||
res=$($1)
|
||||
if [ $? -ne 0 ];
|
||||
then
|
||||
perr " !!! Command failed with exit value $?: '$1'"
|
||||
perr " - $res"
|
||||
exit 2
|
||||
fi
|
||||
}
|
||||
|
||||
if [ $# -ne 0 ];
|
||||
then
|
||||
perr "usage: $0"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
OLD_PWD=$PWD
|
||||
|
||||
try "python3 -m venv .pamhyr-env"
|
||||
try "source .pamhyr-env/bin/activate"
|
||||
try "python3 -m pip install -r ./pamhyr/requirements.txt"
|
||||
|
||||
echo '#! /usr/bin/env bash' > run-pamhyr
|
||||
echo 'source .pamhyr-env/bin/activate' >> run-pamhyr
|
||||
echo 'if [ $XDG_SESSION_TYPE == wayland ]; then' >> run-pamhyr
|
||||
echo ' export QT_QPA_PLATFORM=wayland' >> run-pamhyr
|
||||
echo 'fi' >> run-pamhyr
|
||||
echo 'python3 ./pamhyr/src/pamhyr.py $@' >> run-pamhyr
|
||||
|
||||
try "chmod +x run-pamhyr"
|
||||
|
||||
cd $OLD_PWD
|
||||
@@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
|
||||
from setuptools import find_packages, setup
|
||||
|
||||
def read_requirements():
|
||||
req = []
|
||||
|
||||
with open("requirements.txt", "r") as f:
|
||||
for line in f:
|
||||
if line[0] == "#":
|
||||
continue
|
||||
|
||||
req.append(line)
|
||||
|
||||
return req
|
||||
|
||||
setup(
|
||||
name="Pamhyr2",
|
||||
version="0.0.8",
|
||||
description='River 1D modelling interface',
|
||||
maintainer='INRAE',
|
||||
maintainer_email='pierre-antoine.rouby@inrae.fr',
|
||||
url='https://gitlab.irstea.fr/theophile.terraz/pamhyr',
|
||||
packages=find_packages("."),
|
||||
package_dir={"Pamhyr2": "Pamhyr2"},
|
||||
scripts=[os.path.join("src", "pamhyr.py")],
|
||||
install_requires=read_requirements(),
|
||||
)
|
||||
+4
-4
@@ -206,11 +206,11 @@ class MageGeometryGuideLineChecker(StudyGeometryChecker):
|
||||
def __init__(self, version="mage8"):
|
||||
super(MageGeometryGuideLineChecker, self).__init__()
|
||||
|
||||
self._name = _translate("Checker", "Mage geometry guide line checker")
|
||||
self._name = _translate("Checker", "Mage geometry guideline checker")
|
||||
self._description = _translate(
|
||||
"Checker",
|
||||
"Check if exists geometry guide line is correctly defined \
|
||||
for each reaches of the study"
|
||||
"Check if exists geometry guidelines are correctly defined \
|
||||
for each reach"
|
||||
)
|
||||
self._solver = version
|
||||
self._modules = Modules.GEOMETRY
|
||||
@@ -241,7 +241,7 @@ for each reaches of the study"
|
||||
for profile in profiles:
|
||||
if not profile.has_standard_named_points():
|
||||
self._status = STATUS.WARNING
|
||||
self._summary = "no_standard_guileline_defined"
|
||||
self._summary = "no_standard_guideline_defined"
|
||||
return False
|
||||
|
||||
for gl in gls[1:]:
|
||||
|
||||
@@ -34,9 +34,9 @@ class StudyNetworkReachChecker(AbstractModelChecker):
|
||||
def __init__(self):
|
||||
super(StudyNetworkReachChecker, self).__init__()
|
||||
|
||||
self._name = _translate("Checker", "Study network reach checker")
|
||||
self._name = _translate("Checker", "Study reach network checker")
|
||||
self._description = _translate(
|
||||
"Checker", "Check if exists at least one reach for study"
|
||||
"Checker", "Check if exists at least one reach exists"
|
||||
)
|
||||
self._modules = Modules.NETWORK
|
||||
|
||||
@@ -63,7 +63,7 @@ class StudyGeometryChecker(AbstractModelChecker):
|
||||
|
||||
self._name = _translate("Checker", "Study geometry checker")
|
||||
self._description = _translate(
|
||||
"Checker", "Check if exists geometry for each reach of study"
|
||||
"Checker", "Check if the geometry of each reach exists"
|
||||
)
|
||||
self._modules = Modules.GEOMETRY
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
# __init__.py -- Pamhyr
|
||||
# Copyright (C) 2023-2024 INRAE
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
@@ -0,0 +1,17 @@
|
||||
# __init__.py -- Pamhyr
|
||||
# Copyright (C) 2023-2024 INRAE
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
@@ -0,0 +1,17 @@
|
||||
# __init__.py -- Pamhyr
|
||||
# Copyright (C) 2023-2024 INRAE
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
@@ -0,0 +1,17 @@
|
||||
# __init__.py -- Pamhyr
|
||||
# Copyright (C) 2023-2024 INRAE
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
@@ -0,0 +1,17 @@
|
||||
# __init__.py -- Pamhyr
|
||||
# Copyright (C) 2023-2024 INRAE
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
@@ -0,0 +1,17 @@
|
||||
# __init__.py -- Pamhyr
|
||||
# Copyright (C) 2023-2024 INRAE
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
@@ -0,0 +1,17 @@
|
||||
# __init__.py -- Pamhyr
|
||||
# Copyright (C) 2023-2024 INRAE
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
@@ -0,0 +1,17 @@
|
||||
# __init__.py -- Pamhyr
|
||||
# Copyright (C) 2023-2024 INRAE
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
@@ -0,0 +1,17 @@
|
||||
# __init__.py -- Pamhyr
|
||||
# Copyright (C) 2023-2024 INRAE
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
@@ -0,0 +1,17 @@
|
||||
# __init__.py -- Pamhyr
|
||||
# Copyright (C) 2023-2024 INRAE
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
@@ -0,0 +1,17 @@
|
||||
# __init__.py -- Pamhyr
|
||||
# Copyright (C) 2023-2024 INRAE
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
@@ -0,0 +1,17 @@
|
||||
# __init__.py -- Pamhyr
|
||||
# Copyright (C) 2023-2024 INRAE
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
@@ -0,0 +1,17 @@
|
||||
# __init__.py -- Pamhyr
|
||||
# Copyright (C) 2023-2024 INRAE
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
@@ -0,0 +1,17 @@
|
||||
# __init__.py -- Pamhyr
|
||||
# Copyright (C) 2023-2024 INRAE
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
@@ -0,0 +1,17 @@
|
||||
# __init__.py -- Pamhyr
|
||||
# Copyright (C) 2023-2024 INRAE
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
@@ -0,0 +1,17 @@
|
||||
# __init__.py -- Pamhyr
|
||||
# Copyright (C) 2023-2024 INRAE
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
@@ -0,0 +1,17 @@
|
||||
# __init__.py -- Pamhyr
|
||||
# Copyright (C) 2023-2024 INRAE
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
@@ -0,0 +1,17 @@
|
||||
# __init__.py -- Pamhyr
|
||||
# Copyright (C) 2023-2024 INRAE
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
@@ -31,7 +31,7 @@ solver_long_name = {
|
||||
# "mage7": "Mage v7",
|
||||
"mage8": "Mage v8",
|
||||
# "mage_fake7": "Mage fake v7",
|
||||
"rubarbe": "RubarBE",
|
||||
# "rubarbe": "RubarBE",
|
||||
}
|
||||
|
||||
solver_type_list = {
|
||||
@@ -39,5 +39,5 @@ solver_type_list = {
|
||||
# "mage7": Mage7,
|
||||
"mage8": Mage8,
|
||||
# "mage_fake7": MageFake7,
|
||||
"rubarbe": RubarBE,
|
||||
# "rubarbe": RubarBE,
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
# __init__.py -- Pamhyr
|
||||
# Copyright (C) 2023-2024 INRAE
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
@@ -0,0 +1,17 @@
|
||||
# __init__.py -- Pamhyr
|
||||
# Copyright (C) 2023-2024 INRAE
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
@@ -0,0 +1,17 @@
|
||||
# __init__.py -- Pamhyr
|
||||
# Copyright (C) 2023-2024 INRAE
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
@@ -0,0 +1,17 @@
|
||||
# __init__.py -- Pamhyr
|
||||
# Copyright (C) 2023-2024 INRAE
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
@@ -0,0 +1,17 @@
|
||||
# __init__.py -- Pamhyr
|
||||
# Copyright (C) 2023-2024 INRAE
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
@@ -0,0 +1,17 @@
|
||||
# __init__.py -- Pamhyr
|
||||
# Copyright (C) 2023-2024 INRAE
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
@@ -48,7 +48,7 @@ class BCTranslate(MainTranslate):
|
||||
|
||||
self._sub_dict["long_types"] = {
|
||||
"ND": self._dict["not_defined"],
|
||||
"PC": _translate("BoundaryCondition", "Ponctual contribution"),
|
||||
"PC": _translate("BoundaryCondition", "Point sources"),
|
||||
"TZ": _translate("BoundaryCondition", "Z(t)"),
|
||||
"TD": _translate("BoundaryCondition", "Q(t)"),
|
||||
"ZD": _translate("BoundaryCondition", "Q(Z)"),
|
||||
|
||||
@@ -46,7 +46,7 @@ class Worker(QObject):
|
||||
self.signalStatus.emit(checker.name)
|
||||
|
||||
# Run checker
|
||||
checker._run(self._study)
|
||||
checker.run(self._study)
|
||||
|
||||
self.signalStatus.emit("progress")
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
# __init__.py -- Pamhyr
|
||||
# Copyright (C) 2023-2024 INRAE
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
@@ -0,0 +1,17 @@
|
||||
# __init__.py -- Pamhyr
|
||||
# Copyright (C) 2023-2024 INRAE
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
@@ -0,0 +1,17 @@
|
||||
# __init__.py -- Pamhyr
|
||||
# Copyright (C) 2023-2024 INRAE
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
@@ -0,0 +1,17 @@
|
||||
# __init__.py -- Pamhyr
|
||||
# Copyright (C) 2023-2024 INRAE
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
@@ -0,0 +1,17 @@
|
||||
# __init__.py -- Pamhyr
|
||||
# Copyright (C) 2023-2024 INRAE
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
@@ -42,7 +42,7 @@ class PlotStricklers(PamhyrPlot):
|
||||
)
|
||||
|
||||
self.label_x = self._trad["kp"]
|
||||
self.label_y = self._trad["stricklers"]
|
||||
self.label_y = self._trad["strickler_plot"]
|
||||
|
||||
self.line_kp_elevation = [None, None]
|
||||
|
||||
|
||||
@@ -136,6 +136,7 @@ class FrictionsWindow(PamhyrWindow):
|
||||
self.plot = PlotKPZ(
|
||||
canvas=self.canvas,
|
||||
data=self._reach.reach,
|
||||
study=self._study,
|
||||
trad=self._trad,
|
||||
toolbar=None,
|
||||
)
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
# __init__.py -- Pamhyr
|
||||
# Copyright (C) 2023-2024 INRAE
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
@@ -28,6 +28,9 @@ class FrictionsTranslate(MainTranslate):
|
||||
super(FrictionsTranslate, self).__init__()
|
||||
|
||||
self._dict["kp"] = self._dict["unit_kp"]
|
||||
self._dict["strickler_plot"] = _translate(
|
||||
"Frictions", "Strickler ($m^{1/3}/s$)"
|
||||
)
|
||||
self._dict["stricklers"] = _translate(
|
||||
"Frictions", "Stricklers"
|
||||
)
|
||||
@@ -39,8 +42,8 @@ class FrictionsTranslate(MainTranslate):
|
||||
self._sub_dict["table_headers"] = {
|
||||
# "name": self._dict["name"],
|
||||
# "edge": self._dict["reach"],
|
||||
"begin_kp": _translate("Frictions", "Begin kp (m)"),
|
||||
"end_kp": _translate("Frictions", "End kp (m)"),
|
||||
"begin_strickler": _translate("Frictions", "Begin strickler"),
|
||||
"end_strickler": _translate("Frictions", "End strickler"),
|
||||
"begin_kp": _translate("Frictions", "Start (m)"),
|
||||
"end_kp": _translate("Frictions", "End (m)"),
|
||||
"begin_strickler": _translate("Frictions", "Start coefficient"),
|
||||
"end_strickler": _translate("Frictions", "End coefficient"),
|
||||
}
|
||||
@@ -125,14 +125,6 @@ class MeshingDialog(PamhyrDialog):
|
||||
def lplan(self):
|
||||
return self._lplan
|
||||
|
||||
@property
|
||||
def origin(self):
|
||||
return self._origin
|
||||
|
||||
@property
|
||||
def lm(self):
|
||||
return int(self._lm)
|
||||
|
||||
@property
|
||||
def linear(self):
|
||||
return self._linear
|
||||
@@ -165,15 +157,9 @@ class MeshingDialog(PamhyrDialog):
|
||||
self._begin_cs = self.profiles.index(p1)
|
||||
self._end_cs = self.profiles.index(p2)
|
||||
|
||||
origin = self.get_combobox_text("comboBox_origin")
|
||||
self._origin = self.profiles.index(origin)
|
||||
|
||||
self._begin_dir = self.get_combobox_text("comboBox_begin_gl")
|
||||
self._end_dir = self.get_combobox_text("comboBox_end_gl")
|
||||
|
||||
r_lm_dict = self._trad.get_dict("r_lm_dict")
|
||||
self._lm = r_lm_dict[self.get_combobox_text("comboBox_lm")]
|
||||
|
||||
super().accept()
|
||||
|
||||
def reject(self):
|
||||
|
||||
@@ -98,6 +98,7 @@ class PlotAC(PamhyrPlot):
|
||||
label=self.label_next_plot_selected,
|
||||
color=self.color_plot_next, lw=1.6, linestyle='--'
|
||||
)
|
||||
self.canvas.axes.set_visible(False)
|
||||
|
||||
def draw_gl(self):
|
||||
if self._current_data_update:
|
||||
@@ -106,12 +107,16 @@ class PlotAC(PamhyrPlot):
|
||||
profile_id = 0
|
||||
|
||||
profile = self.data.profile(profile_id)
|
||||
if profile is None:
|
||||
return
|
||||
|
||||
station = profile.get_station()
|
||||
elevation = profile.z()
|
||||
gl = profile.names()
|
||||
|
||||
self.annotation = []
|
||||
self.complete_gl, self.incomplete_gl = self.data.compute_guidelines()
|
||||
|
||||
lcomplete = list(self.complete_gl)
|
||||
lincomplete = list(self.incomplete_gl)
|
||||
|
||||
@@ -160,6 +165,9 @@ class PlotAC(PamhyrPlot):
|
||||
self.draw()
|
||||
return
|
||||
|
||||
if self.data is None:
|
||||
return
|
||||
|
||||
self.update_current()
|
||||
self.update_gl()
|
||||
|
||||
@@ -171,6 +179,10 @@ class PlotAC(PamhyrPlot):
|
||||
previous_id = profile_id - 1
|
||||
next_id = profile_id + 1
|
||||
|
||||
self.previous_plot_selected.set_visible(False)
|
||||
self.plot_selected.set_visible(False)
|
||||
self.next_plot_selected.set_visible(False)
|
||||
|
||||
self.previous_plot_selected.set_data([], [])
|
||||
self.plot_selected.set_data([], [])
|
||||
self.next_plot_selected.set_data([], [])
|
||||
@@ -180,18 +192,23 @@ class PlotAC(PamhyrPlot):
|
||||
self.data.profile(previous_id).get_station(),
|
||||
self.data.profile(previous_id).z()
|
||||
)
|
||||
self.previous_plot_selected.set_visible(True)
|
||||
|
||||
if 0 <= profile_id < self.data.number_profiles:
|
||||
self.plot_selected.set_data(
|
||||
self.data.profile(profile_id).get_station(),
|
||||
self.data.profile(profile_id).z()
|
||||
)
|
||||
self.plot_selected.set_visible(True)
|
||||
|
||||
if 0 <= next_id < self.data.number_profiles:
|
||||
self.next_plot_selected.set_data(
|
||||
self.data.profile(next_id).get_station(),
|
||||
self.data.profile(next_id).z()
|
||||
)
|
||||
self.next_plot_selected.set_visible(True)
|
||||
|
||||
self.canvas.axes.set_visible(True)
|
||||
|
||||
def update_full(self):
|
||||
self.draw()
|
||||
|
||||
@@ -191,7 +191,10 @@ class PlotKPZ(PamhyrPlot):
|
||||
def draw_profiles_hs(self, reach):
|
||||
lhs = filter(
|
||||
lambda hs: hs._input_reach.reach is reach,
|
||||
self._study.river.hydraulic_structures.lst
|
||||
filter(
|
||||
lambda hs: hs._input_reach is not None,
|
||||
self._study.river.hydraulic_structures.lst
|
||||
)
|
||||
)
|
||||
|
||||
for hs in lhs:
|
||||
|
||||
@@ -82,16 +82,6 @@ class GeometryProfileTableModel(PamhyrTableModel):
|
||||
elif value == self._data.z_max():
|
||||
return QColor("blue")
|
||||
|
||||
if role == Qt.ToolTipRole:
|
||||
if value == self._data.z_min():
|
||||
return _translate("MainWindowProfile",
|
||||
"La cote du fond",
|
||||
"Z minimale")
|
||||
elif value == self._data.z_max():
|
||||
return _translate("MainWindowProfile",
|
||||
"La cote maximale",
|
||||
"Z maximale")
|
||||
|
||||
if index.column() == 3:
|
||||
value = self._data.point(index.row()).name
|
||||
|
||||
@@ -104,16 +94,6 @@ class GeometryProfileTableModel(PamhyrTableModel):
|
||||
if role == Qt.ForegroundRole:
|
||||
return QColor("darkRed")
|
||||
|
||||
if role == Qt.ToolTipRole:
|
||||
if value.strip().upper() == "RG":
|
||||
return _translate(
|
||||
"MainWindowProfile", "Rive gauche"
|
||||
)
|
||||
else:
|
||||
return _translate(
|
||||
"MainWindowProfile", "Rive droite"
|
||||
)
|
||||
|
||||
return QVariant()
|
||||
|
||||
def setData(self, index, value, role=Qt.EditRole):
|
||||
@@ -250,11 +230,11 @@ class GeometryProfileTableModel(PamhyrTableModel):
|
||||
self.endMoveRows()
|
||||
self.layoutChanged.emit()
|
||||
|
||||
def purge(self):
|
||||
def purge(self, np_purge):
|
||||
|
||||
self._undo.push(
|
||||
PurgeCommand(
|
||||
self._data, 24
|
||||
self._data, np_purge
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -20,8 +20,9 @@ import copy
|
||||
import sys
|
||||
import csv
|
||||
from time import time
|
||||
import logging
|
||||
|
||||
from tools import trace, timer
|
||||
from tools import trace, timer, logger_exception
|
||||
from Modules import Modules
|
||||
|
||||
from PyQt5.QtGui import (
|
||||
@@ -46,9 +47,12 @@ from View.Tools.Plot.PamhyrCanvas import MplCanvas
|
||||
from View.Geometry.Profile.Plot import Plot
|
||||
from View.Geometry.Profile.Table import GeometryProfileTableModel
|
||||
from View.Geometry.Profile.Translate import GeometryProfileTranslate
|
||||
from View.Geometry.PurgeDialog import PurgeDialog
|
||||
|
||||
_translate = QCoreApplication.translate
|
||||
|
||||
logger = logging.getLogger()
|
||||
|
||||
|
||||
class ProfileWindow(PamhyrWindow):
|
||||
_pamhyr_ui = "GeometryCrossSection"
|
||||
@@ -165,7 +169,6 @@ class ProfileWindow(PamhyrWindow):
|
||||
if Modules.GEOMETRY not in key:
|
||||
return
|
||||
|
||||
logger.debug("TOTO")
|
||||
self._tablemodel.layoutChanged.emit()
|
||||
self._update(redraw=True, propagate=False)
|
||||
|
||||
@@ -258,6 +261,19 @@ class ProfileWindow(PamhyrWindow):
|
||||
self._tablemodel.purge()
|
||||
self.update()
|
||||
|
||||
def purge(self):
|
||||
try:
|
||||
dlg = PurgeDialog(
|
||||
trad=self._trad,
|
||||
parent=self
|
||||
)
|
||||
if dlg.exec():
|
||||
self._tablemodel.purge(dlg.np_purge)
|
||||
self._plot.draw()
|
||||
except Exception as e:
|
||||
logger_exception(e)
|
||||
return
|
||||
|
||||
def reverse(self):
|
||||
self._tablemodel.reverse()
|
||||
self.update()
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
# __init__.py -- Pamhyr
|
||||
# Copyright (C) 2023-2024 INRAE
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
@@ -0,0 +1,60 @@
|
||||
# PurgeDialog.py -- Pamhyr
|
||||
# Copyright (C) 2023-2024 INRAE
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from View.Tools.PamhyrWindow import PamhyrDialog
|
||||
|
||||
from PyQt5.QtGui import (
|
||||
QKeySequence,
|
||||
)
|
||||
|
||||
from PyQt5.QtCore import (
|
||||
Qt, QVariant, QAbstractTableModel,
|
||||
)
|
||||
|
||||
from PyQt5.QtWidgets import (
|
||||
QUndoStack, QShortcut, QSpinBox,
|
||||
)
|
||||
|
||||
|
||||
class PurgeDialog(PamhyrDialog):
|
||||
_pamhyr_ui = "PurgeOptions"
|
||||
_pamhyr_name = "Purge"
|
||||
|
||||
def __init__(self, trad=None, parent=None):
|
||||
super(PurgeDialog, self).__init__(
|
||||
title=trad[self._pamhyr_name],
|
||||
trad=trad,
|
||||
options=[],
|
||||
parent=parent
|
||||
)
|
||||
|
||||
self._init_default_values()
|
||||
|
||||
def _init_default_values(self):
|
||||
self._np_purge = 24
|
||||
|
||||
@property
|
||||
def np_purge(self):
|
||||
return self._np_purge
|
||||
|
||||
def accept(self):
|
||||
self._np_purge = self.get_spin_box("spinBox_np_purge")
|
||||
super().accept()
|
||||
|
||||
def reject(self):
|
||||
self.close()
|
||||
@@ -259,11 +259,11 @@ class GeometryReachTableModel(PamhyrTableModel):
|
||||
self.layoutAboutToBeChanged.emit()
|
||||
self.layoutChanged.emit()
|
||||
|
||||
def purge(self):
|
||||
def purge(self, np_purge):
|
||||
|
||||
self._undo.push(
|
||||
PurgeCommand(
|
||||
self._data, 24
|
||||
self._data, np_purge
|
||||
)
|
||||
)
|
||||
self.layoutChanged.emit()
|
||||
@@ -33,12 +33,12 @@ class GeometryTranslate(MainTranslate):
|
||||
|
||||
self._dict["open_file"] = _translate("Geometry", "Open a file")
|
||||
self._dict["file_st"] = _translate(
|
||||
"Geometry", "File mage geometry (*.ST *.st)")
|
||||
"Geometry", "Mage geometry file (*.ST *.st)")
|
||||
self._dict["file_m"] = _translate(
|
||||
"Geometry", "File mage meshed geometry (*.M *.m)")
|
||||
"Geometry", "Mage meshed geometry file (*.M *.m)")
|
||||
self._dict["file_shp"] = _translate(
|
||||
"Geometry", "Shapefile (*.SHP *.shp)")
|
||||
self._dict["file_all"] = _translate("Geometry", "All file (*)")
|
||||
self._dict["file_all"] = _translate("Geometry", "All files (*)")
|
||||
|
||||
self._dict["cross_section"] = _translate("Geometry", "cross-section")
|
||||
self._dict["cross_sections"] = _translate("Geometry", "cross-sections")
|
||||
@@ -70,7 +70,7 @@ class GeometryTranslate(MainTranslate):
|
||||
"2": _translate("Geometry", "the second guide-line"),
|
||||
"3": _translate(
|
||||
"Geometry",
|
||||
"the means between the two guide-lines"
|
||||
"the mean over the two guide-lines"
|
||||
),
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# MeshingDialog.py -- Pamhyr
|
||||
# UpdateKPDialog.py -- Pamhyr
|
||||
# Copyright (C) 2023-2024 INRAE
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
|
||||
+32
-10
@@ -57,6 +57,7 @@ from View.Geometry.PlotAC import PlotAC
|
||||
from View.Geometry.PlotKPZ import PlotKPZ
|
||||
from View.Geometry.MeshingDialog import MeshingDialog
|
||||
from View.Geometry.UpdateKPDialog import UpdateKPDialog
|
||||
from View.Geometry.PurgeDialog import PurgeDialog
|
||||
from View.Geometry.Translate import GeometryTranslate
|
||||
from View.Geometry.Profile.Window import ProfileWindow
|
||||
|
||||
@@ -157,6 +158,9 @@ class GeometryWindow(PamhyrWindow):
|
||||
|
||||
def _compute_status_label(self):
|
||||
row = self.index_selected_row()
|
||||
if row is None:
|
||||
return
|
||||
|
||||
profile = self._reach.profile(row)
|
||||
|
||||
name = profile.name + " " + str(profile.kp)
|
||||
@@ -298,10 +302,8 @@ class GeometryWindow(PamhyrWindow):
|
||||
data = {
|
||||
"step": dlg.space_step,
|
||||
"limites": [dlg.begin_cs, dlg.end_cs],
|
||||
"origin": dlg.origin,
|
||||
"directrices": [dlg.begin_dir, dlg.end_dir],
|
||||
"lplan": dlg.lplan,
|
||||
"lm": dlg.lm,
|
||||
"linear": dlg.linear,
|
||||
}
|
||||
self._edit_meshing(data)
|
||||
@@ -405,7 +407,6 @@ class GeometryWindow(PamhyrWindow):
|
||||
|
||||
def update_plot_ac(self, ind: int):
|
||||
self.tableView.model().blockSignals(True)
|
||||
self._plot_ac.current = ind
|
||||
self._plot_ac.update()
|
||||
self.tableView.model().blockSignals(False)
|
||||
|
||||
@@ -449,10 +450,9 @@ class GeometryWindow(PamhyrWindow):
|
||||
|
||||
def select_current_profile(self):
|
||||
self.tableView.model().blockSignals(True)
|
||||
row = self.index_selected_row()
|
||||
|
||||
if len(self.tableView.selectedIndexes()) > 0:
|
||||
row = self.index_selected_row()
|
||||
|
||||
if row is not None:
|
||||
self.find(QSlider, "verticalSlider").setValue(row)
|
||||
self.select_plot_xy(row)
|
||||
self.select_plot_kpc(row)
|
||||
@@ -511,10 +511,14 @@ class GeometryWindow(PamhyrWindow):
|
||||
self._table.delete(rows)
|
||||
|
||||
def index_selected_row(self):
|
||||
return self.tableView\
|
||||
.selectionModel()\
|
||||
.selectedRows()[0]\
|
||||
.row()
|
||||
r = self.tableView\
|
||||
.selectionModel()\
|
||||
.selectedRows()
|
||||
|
||||
if len(r) > 0:
|
||||
return r[0].row()
|
||||
else:
|
||||
return None
|
||||
|
||||
def sort_ascending(self):
|
||||
self._table.sort_profiles(False)
|
||||
@@ -529,11 +533,17 @@ class GeometryWindow(PamhyrWindow):
|
||||
|
||||
def move_up(self):
|
||||
row = self.index_selected_row()
|
||||
if row is None:
|
||||
return
|
||||
|
||||
self._table.move_up(row)
|
||||
self.select_current_profile()
|
||||
|
||||
def move_down(self):
|
||||
row = self.index_selected_row()
|
||||
if row is None:
|
||||
return
|
||||
|
||||
self._table.move_down(row)
|
||||
self.select_current_profile()
|
||||
|
||||
@@ -541,6 +551,18 @@ class GeometryWindow(PamhyrWindow):
|
||||
self._table.purge()
|
||||
self.update_redraw()
|
||||
|
||||
def purge(self):
|
||||
try:
|
||||
dlg = PurgeDialog(
|
||||
trad=self._trad,
|
||||
parent=self
|
||||
)
|
||||
if dlg.exec():
|
||||
self._table.purge(dlg.np_purge)
|
||||
except Exception as e:
|
||||
logger_exception(e)
|
||||
return
|
||||
|
||||
def duplicate(self):
|
||||
rows = [
|
||||
row.row() for row in
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
# __init__.py -- Pamhyr
|
||||
# Copyright (C) 2023-2024 INRAE
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
@@ -28,7 +28,7 @@ class BasicHydraulicStructuresTranslate(MainTranslate):
|
||||
super(BasicHydraulicStructuresTranslate, self).__init__()
|
||||
|
||||
self._dict["Basic Hydraulic Structures"] = _translate(
|
||||
"BasicHydraulicStructures", "Basic Hydraulic Structures"
|
||||
"BasicHydraulicStructures", "Basic Hydraulic Structure"
|
||||
)
|
||||
|
||||
self._dict['msg_type_change_title'] = _translate(
|
||||
@@ -138,7 +138,7 @@ hydraulic structure values?"
|
||||
"BasicHydraulicStructures", "Check valve"
|
||||
),
|
||||
"UD": _translate(
|
||||
"BasicHydraulicStructures", "User defined"
|
||||
"BasicHydraulicStructures", "User-defined"
|
||||
),
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
# __init__.py -- Pamhyr
|
||||
# Copyright (C) 2023-2024 INRAE
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
@@ -0,0 +1,17 @@
|
||||
# __init__.py -- Pamhyr
|
||||
# Copyright (C) 2023-2024 INRAE
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
@@ -52,18 +52,41 @@ class PlotDischarge(PamhyrPlot):
|
||||
self._init = True
|
||||
|
||||
def draw_data(self):
|
||||
kp = self.data.reach.reach.get_kp()
|
||||
self.line_discharge = []
|
||||
|
||||
if len(self.data) != 0:
|
||||
kp = self.data.get_kp()
|
||||
discharge = self.data.get_discharge()
|
||||
|
||||
self.line_kp_zmin = self.canvas.axes.plot(
|
||||
line, = self.canvas.axes.plot(
|
||||
kp, discharge,
|
||||
color=self.color_plot,
|
||||
**self.plot_default_kargs
|
||||
)
|
||||
self.line_discharge.append(line)
|
||||
|
||||
@timer
|
||||
def update(self, ind=None):
|
||||
self.draw()
|
||||
if not self._init:
|
||||
self.draw()
|
||||
|
||||
self.update_data()
|
||||
|
||||
self.update_idle()
|
||||
|
||||
def update_data(self):
|
||||
if len(self.data) == len(self.line_discharge):
|
||||
kp = self.data.get_kp()
|
||||
discharge = self.data.get_discharge()
|
||||
|
||||
line, = self.canvas.axes.plot(
|
||||
kp, discharge,
|
||||
color=self.color_plot,
|
||||
**self.plot_default_kargs
|
||||
)
|
||||
self.line_discharge.append(line)
|
||||
else:
|
||||
for line in self.line_discharge:
|
||||
line.remove()
|
||||
|
||||
self._draw_data()
|
||||
@@ -194,8 +194,13 @@ class InitialConditionsWindow(PamhyrWindow):
|
||||
return rows[0].row()
|
||||
|
||||
def update(self):
|
||||
self.update(propagate=False)
|
||||
|
||||
def _update(self, propagate=True):
|
||||
self._update_plot()
|
||||
self._propagate_update(key=Modules.INITIAL_CONDITION)
|
||||
|
||||
if propagate:
|
||||
self._propagate_update(key=Modules.INITIAL_CONDITION)
|
||||
|
||||
def _update_plot(self):
|
||||
self.plot_1.draw()
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
# __init__.py -- Pamhyr
|
||||
# Copyright (C) 2023-2024 INRAE
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
@@ -0,0 +1,17 @@
|
||||
# __init__.py -- Pamhyr
|
||||
# Copyright (C) 2023-2024 INRAE
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
@@ -28,7 +28,7 @@ class LCETranslate(LCTranslate):
|
||||
def __init__(self):
|
||||
super(LCETranslate, self).__init__()
|
||||
self._dict["Edit lateral contribution"] = _translate(
|
||||
"LateralContribution", "Edit lateral contribution"
|
||||
"LateralContribution", "Edit lateral sources"
|
||||
)
|
||||
|
||||
self._sub_dict["table_headers"] = {
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
# __init__.py -- Pamhyr
|
||||
# Copyright (C) 2023-2024 INRAE
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
@@ -39,12 +39,12 @@ class LCTranslate(MainTranslate):
|
||||
super(LCTranslate, self).__init__()
|
||||
|
||||
self._dict["Lateral contribution"] = _translate(
|
||||
"LateralContribution", "Lateral contribution"
|
||||
"LateralContribution", "Lateral sources"
|
||||
)
|
||||
|
||||
self._sub_dict["long_types"] = {
|
||||
"ND": self._dict["not_defined"],
|
||||
"LC": _translate("LateralContribution", "Lateral contribution"),
|
||||
"LC": _translate("LateralContribution", "Lateral sources"),
|
||||
"RA": _translate("LateralContribution", "Rain"),
|
||||
"EV": _translate("LateralContribution", "Evaporation"),
|
||||
}
|
||||
@@ -57,6 +57,6 @@ class LCTranslate(MainTranslate):
|
||||
"name": self._dict["name"],
|
||||
"type": self._dict["type"],
|
||||
"edge": self._dict["reach"],
|
||||
"begin_kp": _translate("LateralContribution", "Begin kp (m)"),
|
||||
"end_kp": _translate("LateralContribution", "End kp (m)")
|
||||
"begin_kp": _translate("LateralContribution", "Start (m)"),
|
||||
"end_kp": _translate("LateralContribution", "End (m)")
|
||||
}
|
||||
+22
-4
@@ -448,8 +448,7 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
||||
if Modules.CONFIG in keys:
|
||||
self._do_update_config()
|
||||
|
||||
if Modules.STUDY in keys:
|
||||
self._tab_widget_info.update()
|
||||
self._do_propagate_update_info_tab(keys)
|
||||
|
||||
logger.debug(f"Propagation of {keys}")
|
||||
for _, window in self.sub_win_list:
|
||||
@@ -458,6 +457,18 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
||||
|
||||
self._tab_widget_checker.update(modules=keys)
|
||||
|
||||
def _do_propagate_update_info_tab(self, keys):
|
||||
modules = Modules.modelling_list()
|
||||
modules.append(Modules.STUDY)
|
||||
|
||||
has_info_mod = reduce(
|
||||
lambda acc, m: acc or (m in keys),
|
||||
modules, False
|
||||
)
|
||||
|
||||
if has_info_mod:
|
||||
self._tab_widget_info.update()
|
||||
|
||||
def _do_propagate_update_rec(self, window, keys):
|
||||
for _, win in window.sub_win_list:
|
||||
win._propagated_update(key=keys)
|
||||
@@ -901,7 +912,10 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
||||
Nothing
|
||||
"""
|
||||
if self._study is None:
|
||||
dialog = QFileDialog(self)
|
||||
options = QFileDialog.Options()
|
||||
options |= QFileDialog.DontUseNativeDialog
|
||||
|
||||
dialog = QFileDialog(self, options=options)
|
||||
dialog.setFileMode(QFileDialog.FileMode.ExistingFile)
|
||||
dialog.setDefaultSuffix(".pamhyr")
|
||||
# dialog.setFilter(dialog.filter() | QtCore.QDir.Hidden)
|
||||
@@ -1293,7 +1307,11 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
||||
if self._study.filename == "":
|
||||
return
|
||||
|
||||
dialog = QFileDialog(self)
|
||||
options = QFileDialog.Options()
|
||||
options |= QFileDialog.DontUseNativeDialog
|
||||
|
||||
dialog = QFileDialog(self, options=options)
|
||||
|
||||
dialog.setFileMode(QFileDialog.FileMode.ExistingFile)
|
||||
dialog.setDefaultSuffix(".BIN")
|
||||
# dialog.setFilter(dialog.filter() | QtCore.QDir.Hidden)
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
# __init__.py -- Pamhyr
|
||||
# Copyright (C) 2023-2024 INRAE
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
@@ -0,0 +1,17 @@
|
||||
# __init__.py -- Pamhyr
|
||||
# Copyright (C) 2023-2024 INRAE
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
@@ -0,0 +1,17 @@
|
||||
# __init__.py -- Pamhyr
|
||||
# Copyright (C) 2023-2024 INRAE
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
@@ -0,0 +1,17 @@
|
||||
# __init__.py -- Pamhyr
|
||||
# Copyright (C) 2023-2024 INRAE
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
@@ -0,0 +1,17 @@
|
||||
# __init__.py -- Pamhyr
|
||||
# Copyright (C) 2023-2024 INRAE
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
@@ -28,7 +28,7 @@ class CustomPlotTranslate(ResultsTranslate):
|
||||
super(CustomPlotTranslate, self).__init__()
|
||||
|
||||
self._dict["Custom Plot Selection"] = _translate(
|
||||
"CustomPlot", "Custom Plot Selection"
|
||||
"CustomPlot", "Custom plot selection"
|
||||
)
|
||||
|
||||
# Value type
|
||||
@@ -38,13 +38,13 @@ class CustomPlotTranslate(ResultsTranslate):
|
||||
self._dict['water_elevation'] = self._dict["unit_water_elevation"]
|
||||
self._dict['discharge'] = self._dict["unit_discharge"]
|
||||
self._dict['elevation'] = _translate(
|
||||
"CustomPlot", "Bed load elevation (m)"
|
||||
"CustomPlot", "Bed elevation (m)"
|
||||
)
|
||||
|
||||
# Unit corresponding long name (plot axes display)
|
||||
|
||||
self._dict['0-meter'] = _translate(
|
||||
"CustomPlot", "Bed load elevation (m)"
|
||||
"CustomPlot", "Bed elevation (m)"
|
||||
)
|
||||
self._dict['1-m3s'] = self._dict["unit_discharge"]
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
# __init__.py -- Pamhyr
|
||||
# Copyright (C) 2023-2024 INRAE
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
@@ -109,7 +109,10 @@ class PlotKPC(PamhyrPlot):
|
||||
def draw_profiles_hs(self, reach):
|
||||
lhs = filter(
|
||||
lambda hs: hs._input_reach.reach is reach.geometry,
|
||||
self.results.study.river.hydraulic_structures.lst
|
||||
filter(
|
||||
lambda hs: hs._input_reach is not None,
|
||||
self.results.study.river.hydraulic_structures.lst
|
||||
)
|
||||
)
|
||||
|
||||
for hs in lhs:
|
||||
|
||||
@@ -231,7 +231,7 @@ class PlotSedReach(PamhyrPlot):
|
||||
return
|
||||
|
||||
self.canvas.axes.set_xlabel(
|
||||
_translate("MainWindow_reach", "Kp (m)"),
|
||||
_translate("MainWindow_reach", "Position (m)"),
|
||||
color='black', fontsize=10
|
||||
)
|
||||
self.canvas.axes.set_ylabel(
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
# __init__.py -- Pamhyr
|
||||
# Copyright (C) 2023-2024 INRAE
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
@@ -0,0 +1,17 @@
|
||||
# __init__.py -- Pamhyr
|
||||
# Copyright (C) 2023-2024 INRAE
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
@@ -0,0 +1,17 @@
|
||||
# __init__.py -- Pamhyr
|
||||
# Copyright (C) 2023-2024 INRAE
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
@@ -0,0 +1,17 @@
|
||||
# __init__.py -- Pamhyr
|
||||
# Copyright (C) 2023-2024 INRAE
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
@@ -0,0 +1,17 @@
|
||||
# __init__.py -- Pamhyr
|
||||
# Copyright (C) 2023-2024 INRAE
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
@@ -0,0 +1,17 @@
|
||||
# __init__.py -- Pamhyr
|
||||
# Copyright (C) 2023-2024 INRAE
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
@@ -0,0 +1,17 @@
|
||||
# __init__.py -- Pamhyr
|
||||
# Copyright (C) 2023-2024 INRAE
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
@@ -0,0 +1,17 @@
|
||||
# __init__.py -- Pamhyr
|
||||
# Copyright (C) 2023-2024 INRAE
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
@@ -99,7 +99,7 @@ class ParamTranslate(MainTranslate):
|
||||
"Minimum water height (meter)"),
|
||||
"mage_max_niter":
|
||||
_translate("SolverParameters",
|
||||
"Maximun number of iterations (< 100)"),
|
||||
"Maximum number of iterations (< 100)"),
|
||||
"mage_timestep_reduction_factor":
|
||||
_translate("SolverParameters",
|
||||
"Timestep reduction factor"),
|
||||
@@ -114,10 +114,10 @@ class ParamTranslate(MainTranslate):
|
||||
"Reduction precision factor of residue"),
|
||||
"mage_niter_max_precision":
|
||||
_translate("SolverParameters",
|
||||
"Number of iteration at maximum precision"),
|
||||
"Number of iterations at maximum precision"),
|
||||
"mage_niter_before_switch":
|
||||
_translate("SolverParameters",
|
||||
"Number of iteration before switch"),
|
||||
"Number of iterations before switch"),
|
||||
"mage_max_froude":
|
||||
_translate("SolverParameters",
|
||||
"Maximum accepted Froude number"),
|
||||
@@ -152,7 +152,7 @@ class ParamTranslate(MainTranslate):
|
||||
"mage_methode_modification_geometrie":
|
||||
_translate("SolverParameters", "Geometry modification method"),
|
||||
"mage_shields_critique":
|
||||
_translate("SolverParameters", "Critic shields"),
|
||||
_translate("SolverParameters", "Critical Shields number"),
|
||||
"mage_shields_correction":
|
||||
_translate("SolverParameters", "Shields correction"),
|
||||
"mage_capacite_solide":
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
# __init__.py -- Pamhyr
|
||||
# Copyright (C) 2023-2024 INRAE
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
@@ -28,7 +28,7 @@ class StricklersTranslate(MainTranslate):
|
||||
super(StricklersTranslate, self).__init__()
|
||||
|
||||
self._dict["Stricklers"] = _translate(
|
||||
"Stricklers", "Stricklers"
|
||||
"Stricklers", "Strickler coefficients"
|
||||
)
|
||||
|
||||
self._sub_dict["table_headers"] = {
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
# __init__.py -- Pamhyr
|
||||
# Copyright (C) 2023-2024 INRAE
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
@@ -102,7 +102,10 @@ class WindowToolKit(object):
|
||||
Returns:
|
||||
The returns of callback
|
||||
"""
|
||||
dialog = QFileDialog(self)
|
||||
options = QFileDialog.Options()
|
||||
options |= QFileDialog.DontUseNativeDialog
|
||||
|
||||
dialog = QFileDialog(self, options=options)
|
||||
|
||||
if select_file:
|
||||
mode = QFileDialog.FileMode.ExistingFile
|
||||
|
||||
@@ -112,7 +112,7 @@ class PamhyrPlotToolbar(NavigationToolbar2QT):
|
||||
self.toolitems.append(
|
||||
(
|
||||
'Forward',
|
||||
_translate("Toolbar", 'Return to next view'),
|
||||
_translate("Toolbar", 'Back to next view'),
|
||||
'forward', 'forward'
|
||||
)
|
||||
)
|
||||
@@ -121,7 +121,7 @@ class PamhyrPlotToolbar(NavigationToolbar2QT):
|
||||
self.toolitems.append(
|
||||
(
|
||||
'Pan',
|
||||
_translate("Toolbar", 'Axes panoramic'),
|
||||
_translate("Toolbar", 'Panoramic axes'),
|
||||
'move', 'pan'
|
||||
)
|
||||
)
|
||||
@@ -184,7 +184,7 @@ class PamhyrPlotToolbar(NavigationToolbar2QT):
|
||||
self.toolitems.append(
|
||||
(
|
||||
'Save',
|
||||
_translate("Toolbar", 'Save the figure'),
|
||||
_translate("Toolbar", 'Save figure'),
|
||||
'filesave', 'save_figure'
|
||||
)
|
||||
)
|
||||
@@ -253,12 +253,12 @@ class PamhyrPlotToolbar(NavigationToolbar2QT):
|
||||
self._actions['back'].setToolTip(
|
||||
_translate("Toolbar", "Back to previous view"))
|
||||
self._actions['forward'].setToolTip(
|
||||
_translate("Toolbar", "Return to next view"))
|
||||
_translate("Toolbar", "Back to next view"))
|
||||
self._actions['pan'].setToolTip(
|
||||
_translate("Toolbar", "Axes panoramic"))
|
||||
_translate("Toolbar", "Panoramic axes"))
|
||||
self._actions['zoom'].setToolTip(_translate("Toolbar", "Zoom"))
|
||||
self._actions['save_figure'].setToolTip(
|
||||
_translate("Toolbar", "Save the figure"))
|
||||
_translate("Toolbar", "Save figure"))
|
||||
self.action_isometric_view.setToolTip(
|
||||
_translate("Toolbar", "Isometric view (Shift+W)"))
|
||||
self.action_auto_global_view.setToolTip(
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
# __init__.py -- Pamhyr
|
||||
# Copyright (C) 2023-2024 INRAE
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
@@ -0,0 +1,17 @@
|
||||
# __init__.py -- Pamhyr
|
||||
# Copyright (C) 2023-2024 INRAE
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
@@ -52,7 +52,7 @@ class UnitTranslate(CommonWordTranslate):
|
||||
def __init__(self):
|
||||
super(UnitTranslate, self).__init__()
|
||||
|
||||
self._dict["unit_kp"] = _translate("Unit", "KP (m)")
|
||||
self._dict["unit_kp"] = _translate("Unit", "Position (m)")
|
||||
self._dict["unit_width"] = _translate("Unit", "Width (m)")
|
||||
self._dict["unit_height"] = _translate("Unit", "Height (m)")
|
||||
self._dict["unit_diameter"] = _translate("Unit", "Diameter (m)")
|
||||
@@ -90,5 +90,5 @@ class MainTranslate(UnitTranslate):
|
||||
"MainWindow", "Open SQLite debuging tool ('sqlitebrowser')"
|
||||
)
|
||||
self._dict["active_window"] = _translate(
|
||||
"MainWindow", "Activate this window"
|
||||
"MainWindow", "Enable this window"
|
||||
)
|
||||
@@ -0,0 +1,17 @@
|
||||
# __init__.py -- Pamhyr
|
||||
# Copyright (C) 2023-2024 INRAE
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
@@ -37,7 +37,7 @@
|
||||
</size>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>2</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab_liquid">
|
||||
<attribute name="title">
|
||||
@@ -61,7 +61,7 @@
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_suspenssion">
|
||||
<attribute name="title">
|
||||
<string>Suspenssion</string>
|
||||
<string>Suspension</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_4">
|
||||
<item row="0" column="0">
|
||||
@@ -114,7 +114,7 @@
|
||||
<string>Add</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Add a new boundary condition or punctual contribution</string>
|
||||
<string>Add a new boundary condition or point source</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+N</string>
|
||||
@@ -144,7 +144,7 @@
|
||||
<string>Edit</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Edit boundary condition or punctual contribution</string>
|
||||
<string>Edit boundary condition or point source</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+E</string>
|
||||
@@ -159,7 +159,7 @@
|
||||
<string>Sort</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Sort boundary condition by name</string>
|
||||
<string>Sort by names</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
|
||||
@@ -164,7 +164,7 @@
|
||||
<item>
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="text">
|
||||
<string>Frequence</string>
|
||||
<string>Frequency</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -349,7 +349,7 @@
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>This value must be used for reading or editing files in speficic case.</string>
|
||||
<string>This value must be used for reading or editing files in speficic cases.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -374,7 +374,7 @@
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_12">
|
||||
<property name="text">
|
||||
<string> - The "@file" keyworkd is replace by the path of file to open.</string>
|
||||
<string> - The "@file" keyword is replaced by the path of file to open.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -382,7 +382,7 @@
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_language">
|
||||
<attribute name="title">
|
||||
<string>Language</string>
|
||||
<string>Langue</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_6">
|
||||
<item row="0" column="0">
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton">
|
||||
<property name="text">
|
||||
<string>Eval</string>
|
||||
<string>Evaluate</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
<string>Add</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Add a new point in boundary condition or punctual contribution</string>
|
||||
<string>Add a new point</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+N</string>
|
||||
@@ -116,7 +116,7 @@
|
||||
<string>Sort</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Sort boundary condition points</string>
|
||||
<string>Sort points</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
<string>Add</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Add a new point in boundary condition or lateral contribution</string>
|
||||
<string>Add a new point in boundary condition or lateral source</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+N</string>
|
||||
@@ -109,7 +109,7 @@
|
||||
<string>Sort</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Sort boundary condition point</string>
|
||||
<string>Sort points</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
|
||||
@@ -98,7 +98,10 @@
|
||||
<normaloff>ressources/edit.png</normaloff>ressources/edit.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Edit stricklers</string>
|
||||
<string>Edit Strickler coefficients</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Edit Strickler coefficients</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+E</string>
|
||||
|
||||
Loaded 100 of 122 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user