mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5fc4e3903a | ||
|
|
c07a863018 | ||
|
|
243941db51 | ||
|
|
d6c1316178 | ||
|
|
f35048b89f | ||
|
|
24d92b2ac0 | ||
|
|
c702862bc4 | ||
|
|
400f6be9e3 | ||
|
|
5fc6951060 | ||
|
|
5ba38d5cd6 | ||
|
|
3e8132646d | ||
|
|
5aef0bbf3c | ||
|
|
bb3dadc0c7 | ||
|
|
7bb176e7c7 | ||
|
|
8c16e4ed58 | ||
|
|
e9315d9be7 | ||
|
|
46738cec6b | ||
|
|
e576bb15f1 | ||
|
|
26d18d26e9 | ||
|
|
8bac416ab5 | ||
|
|
e6aa840633 | ||
|
|
4b976d3b5f | ||
|
|
e3315c8f81 | ||
|
|
6bcbd006f1 |
No files matched your search
+7
-7
@@ -29,8 +29,8 @@ stages:
|
|||||||
#############
|
#############
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
MAGE_8_VERSION: "v8.3.6"
|
MAGE_8_VERSION: "permalink/latest"
|
||||||
ADISTS_VERSION: "v1.0.2"
|
ADISTS_VERSION: "permalink/latest"
|
||||||
|
|
||||||
dl-mage8-doc:
|
dl-mage8-doc:
|
||||||
stage: downloads
|
stage: downloads
|
||||||
@@ -41,7 +41,7 @@ dl-mage8-doc:
|
|||||||
script:
|
script:
|
||||||
- mkdir -p doc
|
- mkdir -p doc
|
||||||
- cd doc
|
- cd doc
|
||||||
- curl -L -o mage8.pdf https://gitlab.irstea.fr/jean-baptiste.faure/mage/-/releases/$MAGE_8_VERSION/downloads/documents/Mage-8_Documentation.pdf
|
- curl -L -o mage8.pdf https://forge.inrae.fr/river-hydraulics/mage/-/releases/$MAGE_8_VERSION/downloads/documents/Mage-8_Documentation.pdf
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- doc/mage8.pdf
|
- doc/mage8.pdf
|
||||||
@@ -53,7 +53,7 @@ dl-mage8-linux:
|
|||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_BRANCH == 'ci-test' || $CI_COMMIT_BRANCH == 'master' || $CI_COMMIT_TAG
|
- if: $CI_COMMIT_BRANCH == 'ci-test' || $CI_COMMIT_BRANCH == 'master' || $CI_COMMIT_TAG
|
||||||
script:
|
script:
|
||||||
- curl -L -o mage8.tgz https://gitlab.irstea.fr/jean-baptiste.faure/mage/-/releases/$MAGE_8_VERSION/downloads/packages/mage_linux.tgz
|
- curl -L -o mage8.tgz https://forge.inrae.fr/river-hydraulics/mage/-/releases/$MAGE_8_VERSION/downloads/packages/mage_linux.tgz
|
||||||
- mkdir -p mage8-linux
|
- mkdir -p mage8-linux
|
||||||
- cd mage8-linux
|
- cd mage8-linux
|
||||||
- tar xvf ../mage8.tgz
|
- tar xvf ../mage8.tgz
|
||||||
@@ -72,7 +72,7 @@ dl-mage8-windows:
|
|||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_BRANCH == 'ci-test' || $CI_COMMIT_BRANCH == 'master' || $CI_COMMIT_TAG
|
- if: $CI_COMMIT_BRANCH == 'ci-test' || $CI_COMMIT_BRANCH == 'master' || $CI_COMMIT_TAG
|
||||||
script:
|
script:
|
||||||
- curl -L -o mage8.tgz https://gitlab.irstea.fr/jean-baptiste.faure/mage/-/releases/$MAGE_8_VERSION/downloads/packages/mage_windows.tgz
|
- curl -L -o mage8.tgz https://forge.inrae.fr/river-hydraulics/mage/-/releases/$MAGE_8_VERSION/downloads/packages/mage_windows.tgz
|
||||||
- mkdir -p mage8-windows
|
- mkdir -p mage8-windows
|
||||||
- cd mage8-windows
|
- cd mage8-windows
|
||||||
- tar xvf ../mage8.tgz
|
- tar xvf ../mage8.tgz
|
||||||
@@ -93,7 +93,7 @@ dl-adists-linux:
|
|||||||
script:
|
script:
|
||||||
- mkdir -p adists-linux
|
- mkdir -p adists-linux
|
||||||
- cd adists-linux
|
- cd adists-linux
|
||||||
- curl -L -o adists https://gitlab.irstea.fr/jean-baptiste.faure/adists/-/releases/$ADISTS_VERSION/downloads/executables/adists
|
- curl -L -o adists https://forge.inrae.fr/river-hydraulics/adists/-/releases/$ADISTS_VERSION/downloads/executables/adists
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- adists-linux/adists
|
- adists-linux/adists
|
||||||
@@ -107,7 +107,7 @@ dl-adists-windows:
|
|||||||
script:
|
script:
|
||||||
- mkdir -p adists-windows
|
- mkdir -p adists-windows
|
||||||
- cd adists-windows
|
- cd adists-windows
|
||||||
- curl -L -o adists.exe https://gitlab.irstea.fr/jean-baptiste.faure/adists/-/releases/$ADISTS_VERSION/downloads/executables/adists_win64.exe
|
- curl -L -o adists.exe https://forge.inrae.fr/river-hydraulics/adists/-/releases/$ADISTS_VERSION/downloads/executables/adists_win64.exe
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- adists-windows/adists.exe
|
- adists-windows/adists.exe
|
||||||
|
|||||||
Binary file not shown.
@@ -12,3 +12,5 @@ shapely>=2.0.1
|
|||||||
lxml>=4.9.3
|
lxml>=4.9.3
|
||||||
platformdirs>=4.2.0
|
platformdirs>=4.2.0
|
||||||
pyshp>=2.3.1
|
pyshp>=2.3.1
|
||||||
|
rasterio==1.3.11
|
||||||
|
#fortranformat==2.0.3
|
||||||
@@ -12,3 +12,5 @@ shapely>=2.0.1
|
|||||||
lxml>=4.9.3
|
lxml>=4.9.3
|
||||||
platformdirs>=4.2.0
|
platformdirs>=4.2.0
|
||||||
pyshp>=2.3.1
|
pyshp>=2.3.1
|
||||||
|
rasterio==1.3.11
|
||||||
|
#fortranformat==2.0.3
|
||||||
@@ -222,3 +222,82 @@ class BoundaryConditionAdisTS(SQLSubModel):
|
|||||||
@property
|
@property
|
||||||
def data(self):
|
def data(self):
|
||||||
return self._data.copy()
|
return self._data.copy()
|
||||||
|
|
||||||
|
@property
|
||||||
|
def _default_0(self):
|
||||||
|
return self._types[0](0)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def _default_1(self):
|
||||||
|
return self._types[1](0.0)
|
||||||
|
|
||||||
|
def new_from_data(self, header, data):
|
||||||
|
new_0 = self._default_0
|
||||||
|
new_1 = self._default_1
|
||||||
|
|
||||||
|
if len(header) != 0:
|
||||||
|
for i in [0, 1]:
|
||||||
|
for j in range(len(header)):
|
||||||
|
if self._header[i] == header[j]:
|
||||||
|
if i == 0:
|
||||||
|
new_0 = self._types[i](data[j].replace(",", "."))
|
||||||
|
else:
|
||||||
|
new_1 = self._types[i](data[j].replace(",", "."))
|
||||||
|
else:
|
||||||
|
new_0 = self._types[0](data[0].replace(",", "."))
|
||||||
|
new_1 = self._types[1](data[1].replace(",", "."))
|
||||||
|
|
||||||
|
return (new_0, new_1)
|
||||||
|
|
||||||
|
def add(self, index: int):
|
||||||
|
value = (self._default_0, self._default_1)
|
||||||
|
self._data.insert(index, value)
|
||||||
|
self._status.modified()
|
||||||
|
return value
|
||||||
|
|
||||||
|
def insert(self, index: int, value):
|
||||||
|
self._data.insert(index, value)
|
||||||
|
self._status.modified()
|
||||||
|
|
||||||
|
def delete_i(self, indexes):
|
||||||
|
self._data = list(
|
||||||
|
map(
|
||||||
|
lambda e: e[1],
|
||||||
|
filter(
|
||||||
|
lambda e: e[0] not in indexes,
|
||||||
|
enumerate(self.data)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
self._status.modified()
|
||||||
|
|
||||||
|
def sort(self, _reverse=False, key=None):
|
||||||
|
if key is None:
|
||||||
|
self._data.sort(reverse=_reverse)
|
||||||
|
else:
|
||||||
|
self._data.sort(reverse=_reverse, key=key)
|
||||||
|
self._status.modified()
|
||||||
|
|
||||||
|
def index(self, bc):
|
||||||
|
self._data.index(bc)
|
||||||
|
|
||||||
|
def get_i(self, index):
|
||||||
|
return self.data[index]
|
||||||
|
|
||||||
|
def get_range(self, _range):
|
||||||
|
lst = []
|
||||||
|
for r in _range:
|
||||||
|
lst.append(r)
|
||||||
|
return lst
|
||||||
|
|
||||||
|
def _set_i_c_v(self, index, column, value):
|
||||||
|
v = list(self._data[index])
|
||||||
|
v[column] = self._types[column](value)
|
||||||
|
self._data[index] = tuple(v)
|
||||||
|
self._status.modified()
|
||||||
|
|
||||||
|
def set_i_0(self, index: int, value):
|
||||||
|
self._set_i_c_v(index, 0, value)
|
||||||
|
|
||||||
|
def set_i_1(self, index: int, value):
|
||||||
|
self._set_i_c_v(index, 1, value)
|
||||||
@@ -83,8 +83,8 @@ class TriangularWeir(BasicHS):
|
|||||||
self._data = [
|
self._data = [
|
||||||
BHSValue("elevation", float, 1.0, status=status),
|
BHSValue("elevation", float, 1.0, status=status),
|
||||||
BHSValue("loading_elevation", float, 9999.999, status=status),
|
BHSValue("loading_elevation", float, 9999.999, status=status),
|
||||||
BHSValue("discharge_coefficient", float, 0.4, status=status),
|
BHSValue("discharge_coefficient", float, 0.31, status=status),
|
||||||
BHSValue("half-angle_tangent", float, 0.0, status=status),
|
BHSValue("half-angle_tangent", float, 1.0, status=status),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -155,7 +155,6 @@ class HydraulicStructure(SQLSubModel):
|
|||||||
return new
|
return new
|
||||||
|
|
||||||
def _db_save(self, execute, data=None):
|
def _db_save(self, execute, data=None):
|
||||||
print("save hs unit")
|
|
||||||
execute(f"DELETE FROM hydraulic_structures WHERE id = {self.id}")
|
execute(f"DELETE FROM hydraulic_structures WHERE id = {self.id}")
|
||||||
|
|
||||||
input_reach_id = -1
|
input_reach_id = -1
|
||||||
|
|||||||
@@ -382,6 +382,8 @@ class InitialConditions(SQLSubModel):
|
|||||||
self._data = []
|
self._data = []
|
||||||
for profile in profiles:
|
for profile in profiles:
|
||||||
width = profile.wet_width(profile.z_min() + height)
|
width = profile.wet_width(profile.z_min() + height)
|
||||||
|
area = profile.wet_area(profile.z_min() + height)
|
||||||
|
radius = profile.wet_radius(profile.z_min() + height)
|
||||||
frictions = self._reach.frictions.frictions
|
frictions = self._reach.frictions.frictions
|
||||||
strickler = None
|
strickler = None
|
||||||
if frictions is not None:
|
if frictions is not None:
|
||||||
@@ -396,9 +398,12 @@ class InitialConditions(SQLSubModel):
|
|||||||
discharge = data_discharge[profile.rk]
|
discharge = data_discharge[profile.rk]
|
||||||
else:
|
else:
|
||||||
discharge = (
|
discharge = (
|
||||||
((width * 0.8)
|
# ((width * 0.8)
|
||||||
* strickler
|
# * strickler
|
||||||
* (height ** (5/3))
|
# * (height ** (5/3))
|
||||||
|
# * (abs(incline) ** (0.5)))
|
||||||
|
(area * strickler
|
||||||
|
* (radius ** (2/3))
|
||||||
* (abs(incline) ** (0.5)))
|
* (abs(incline) ** (0.5)))
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -458,11 +463,14 @@ class InitialConditions(SQLSubModel):
|
|||||||
if not compute_height:
|
if not compute_height:
|
||||||
height = data_height[profile.rk]
|
height = data_height[profile.rk]
|
||||||
else:
|
else:
|
||||||
height = (
|
if abs(incline) <= 0:
|
||||||
discharge
|
height = 0.0
|
||||||
/
|
else:
|
||||||
((width * 0.8) * strickler * (abs(incline) ** (0.5)))
|
height = (
|
||||||
) ** (0.6)
|
discharge
|
||||||
|
/
|
||||||
|
((width * 0.8) * strickler * (abs(incline) ** (0.5)))
|
||||||
|
) ** (0.6)
|
||||||
|
|
||||||
elevation = max(
|
elevation = max(
|
||||||
profile.z_min() + height,
|
profile.z_min() + height,
|
||||||
|
|||||||
@@ -45,7 +45,10 @@ class Pollutants(SQLSubModel):
|
|||||||
else:
|
else:
|
||||||
self.id = id
|
self.id = id
|
||||||
|
|
||||||
self._name = str(name)
|
if name is None or name == "":
|
||||||
|
self.name = f"pol{self.id}"
|
||||||
|
else:
|
||||||
|
self._name = str(name)
|
||||||
self._enabled = True
|
self._enabled = True
|
||||||
|
|
||||||
self._data = []
|
self._data = []
|
||||||
@@ -179,7 +182,6 @@ class Pollutants(SQLSubModel):
|
|||||||
|
|
||||||
def new_from_data(self, data):
|
def new_from_data(self, data):
|
||||||
|
|
||||||
print("from_data before : ", data)
|
|
||||||
try:
|
try:
|
||||||
new = [int(data[0])]
|
new = [int(data[0])]
|
||||||
new += [float(d) for d in data[1:]]
|
new += [float(d) for d in data[1:]]
|
||||||
@@ -187,8 +189,6 @@ class Pollutants(SQLSubModel):
|
|||||||
logger.error(e)
|
logger.error(e)
|
||||||
new = None
|
new = None
|
||||||
|
|
||||||
print("from_data after : ", new)
|
|
||||||
|
|
||||||
return new
|
return new
|
||||||
|
|
||||||
def __len__(self):
|
def __len__(self):
|
||||||
|
|||||||
+2
-1
@@ -276,7 +276,8 @@ class Study(SQLModel):
|
|||||||
version = new.execute(
|
version = new.execute(
|
||||||
"SELECT value FROM info WHERE key='study_release'"
|
"SELECT value FROM info WHERE key='study_release'"
|
||||||
)
|
)
|
||||||
new.status.version = int(version[0])
|
if version is not None:
|
||||||
|
new.status.version = int(version[0])
|
||||||
|
|
||||||
# TODO: Load metadata
|
# TODO: Load metadata
|
||||||
new.name = new.execute("SELECT value FROM info WHERE key='name'")[0]
|
new.name = new.execute("SELECT value FROM info WHERE key='name'")[0]
|
||||||
|
|||||||
+1
-1
@@ -135,7 +135,7 @@ class Mage(CommandLineSolver):
|
|||||||
)
|
)
|
||||||
|
|
||||||
for line in lines:
|
for line in lines:
|
||||||
rep_file.write(line.line)
|
rep_file.write(line.line+"\n")
|
||||||
|
|
||||||
def _export_ST(self, study, repertory, qlog, name="0"):
|
def _export_ST(self, study, repertory, qlog, name="0"):
|
||||||
files = []
|
files = []
|
||||||
|
|||||||
@@ -372,8 +372,12 @@ class EditBoundaryConditionWindow(PamhyrWindow):
|
|||||||
if strickler is None:
|
if strickler is None:
|
||||||
strickler = 25.0
|
strickler = 25.0
|
||||||
height = [(i)*(z_max-z_min)/50 for i in range(51)]
|
height = [(i)*(z_max-z_min)/50 for i in range(51)]
|
||||||
q = [((profile.wet_width(z_min + h) * 0.8) * strickler
|
# q = [((profile.wet_width(z_min + h) * 0.8) * strickler
|
||||||
* (h ** (5/3)) * (abs(self.slope_value) ** (0.5)))
|
# * (h ** (5/3)) * (abs(self.slope_value) ** (0.5)))
|
||||||
|
# for h in height]
|
||||||
|
q = [profile.wet_area(z_min + h) * strickler
|
||||||
|
* (profile.wet_radius(z_min + h) ** (2/3))
|
||||||
|
* (abs(self.slope_value) ** (0.5))
|
||||||
for h in height]
|
for h in height]
|
||||||
for i in range(len(height)):
|
for i in range(len(height)):
|
||||||
height[i] += z_min
|
height[i] += z_min
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ from PyQt5.QtWidgets import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
from View.BoundaryConditionsAdisTS.Edit.UndoCommand import (
|
from View.BoundaryConditionsAdisTS.Edit.UndoCommand import (
|
||||||
AddCommand, DelCommand, SetDataCommand,
|
AddCommand, DelCommand, SetDataCommand, PasteCommand, SortCommand,
|
||||||
)
|
)
|
||||||
|
|
||||||
_translate = QCoreApplication.translate
|
_translate = QCoreApplication.translate
|
||||||
@@ -118,3 +118,40 @@ class TableModel(PamhyrTableModel):
|
|||||||
)
|
)
|
||||||
|
|
||||||
self.endRemoveRows()
|
self.endRemoveRows()
|
||||||
|
|
||||||
|
def sort(self, _reverse, parent=QModelIndex()):
|
||||||
|
self.layoutAboutToBeChanged.emit()
|
||||||
|
|
||||||
|
self._undo.push(
|
||||||
|
SortCommand(
|
||||||
|
self._data, _reverse
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
self.layoutAboutToBeChanged.emit()
|
||||||
|
self.update()
|
||||||
|
|
||||||
|
def paste(self, row, header, data):
|
||||||
|
if len(data) == 0:
|
||||||
|
return
|
||||||
|
|
||||||
|
self.layoutAboutToBeChanged.emit()
|
||||||
|
|
||||||
|
self._undo.push(
|
||||||
|
PasteCommand(
|
||||||
|
self._data, row,
|
||||||
|
list(
|
||||||
|
map(
|
||||||
|
lambda d: self._data.new_from_data(header, d),
|
||||||
|
data
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
self.layoutAboutToBeChanged.emit()
|
||||||
|
self.update()
|
||||||
|
|
||||||
|
def update(self):
|
||||||
|
# self.auto_sort()
|
||||||
|
self.layoutChanged.emit()
|
||||||
@@ -38,29 +38,14 @@ class SetDataCommand(QUndoCommand):
|
|||||||
self._data = data
|
self._data = data
|
||||||
self._index = index
|
self._index = index
|
||||||
self._column = column
|
self._column = column
|
||||||
self._old = self._data._data[self._index][self._column]
|
self._old = self._data.get_i(self._index)[self._column]
|
||||||
_type = self._data._types[self._column]
|
self._new = new_value
|
||||||
self._new = _type(new_value)
|
|
||||||
|
|
||||||
def undo(self):
|
def undo(self):
|
||||||
if self._column == 0:
|
self._data._set_i_c_v(self._index, self._column, self._old)
|
||||||
self._data._data[self._index] = (
|
|
||||||
self._old, self._data._data[self._index][1]
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
self._data._data[self._index] = (
|
|
||||||
self._data._data[self._index][0], self._old
|
|
||||||
)
|
|
||||||
|
|
||||||
def redo(self):
|
def redo(self):
|
||||||
if self._column == 0:
|
self._data._set_i_c_v(self._index, self._column, self._new)
|
||||||
self._data._data[self._index] = (
|
|
||||||
self._new, self._data._data[self._index][1]
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
self._data._data[self._index] = (
|
|
||||||
self._data._data[self._index][0], self._new
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class AddCommand(QUndoCommand):
|
class AddCommand(QUndoCommand):
|
||||||
@@ -76,11 +61,11 @@ class AddCommand(QUndoCommand):
|
|||||||
|
|
||||||
def redo(self):
|
def redo(self):
|
||||||
if self._new is None:
|
if self._new is None:
|
||||||
self._new = self._data._data.insert(self._index, (
|
self._new = self._data.insert(self._index, (
|
||||||
self._data._types[0](0), self._data._types[1](0.0)
|
self._data._types[0](0), self._data._types[1](0.0)
|
||||||
))
|
))
|
||||||
else:
|
else:
|
||||||
self._data._data.insert(self._index, self._new)
|
self._data.insert(self._index, self._new)
|
||||||
|
|
||||||
|
|
||||||
class DelCommand(QUndoCommand):
|
class DelCommand(QUndoCommand):
|
||||||
@@ -97,8 +82,57 @@ class DelCommand(QUndoCommand):
|
|||||||
|
|
||||||
def undo(self):
|
def undo(self):
|
||||||
for row, el in self._bc:
|
for row, el in self._bc:
|
||||||
self._data._data.insert(row, el)
|
self._data.insert(row, el)
|
||||||
|
|
||||||
def redo(self):
|
def redo(self):
|
||||||
for row in self._rows:
|
self._data.delete_i(self._rows)
|
||||||
del self._data._data[row]
|
|
||||||
|
|
||||||
|
class PasteCommand(QUndoCommand):
|
||||||
|
def __init__(self, data, row, bcs):
|
||||||
|
QUndoCommand.__init__(self)
|
||||||
|
|
||||||
|
self._data = data
|
||||||
|
self._row = row
|
||||||
|
self._bcs = bcs
|
||||||
|
self._bcs.reverse()
|
||||||
|
|
||||||
|
def undo(self):
|
||||||
|
self._data.delete_i(
|
||||||
|
range(self._row, self._row + len(self._bcs))
|
||||||
|
)
|
||||||
|
|
||||||
|
def redo(self):
|
||||||
|
for bc in self._bcs:
|
||||||
|
self._data.insert(self._row, bc)
|
||||||
|
|
||||||
|
|
||||||
|
class SortCommand(QUndoCommand):
|
||||||
|
def __init__(self, data, _reverse):
|
||||||
|
QUndoCommand.__init__(self)
|
||||||
|
|
||||||
|
self._data = data
|
||||||
|
self._reverse = _reverse
|
||||||
|
|
||||||
|
self._old = self._data.data
|
||||||
|
self._indexes = None
|
||||||
|
|
||||||
|
def undo(self):
|
||||||
|
ll = self._data.data
|
||||||
|
self._data.sort(
|
||||||
|
key=lambda x: self._indexes[ll.index(x)]
|
||||||
|
)
|
||||||
|
|
||||||
|
def redo(self):
|
||||||
|
self._data.sort(
|
||||||
|
_reverse=self._reverse,
|
||||||
|
key=lambda x: x[0]
|
||||||
|
)
|
||||||
|
if self._indexes is None:
|
||||||
|
self._indexes = list(
|
||||||
|
map(
|
||||||
|
lambda p: self._old.index(p),
|
||||||
|
self._data.data
|
||||||
|
)
|
||||||
|
)
|
||||||
|
self._old = None
|
||||||
@@ -143,7 +143,7 @@ class EditBoundaryConditionWindow(PamhyrWindow):
|
|||||||
def setup_connections(self):
|
def setup_connections(self):
|
||||||
self.find(QAction, "action_add").triggered.connect(self.add)
|
self.find(QAction, "action_add").triggered.connect(self.add)
|
||||||
self.find(QAction, "action_del").triggered.connect(self.delete)
|
self.find(QAction, "action_del").triggered.connect(self.delete)
|
||||||
|
self.find(QAction, "action_sort").triggered.connect(self.sort)
|
||||||
self._table.dataChanged.connect(self.update)
|
self._table.dataChanged.connect(self.update)
|
||||||
|
|
||||||
def update(self):
|
def update(self):
|
||||||
@@ -200,6 +200,22 @@ class EditBoundaryConditionWindow(PamhyrWindow):
|
|||||||
|
|
||||||
self.copyTableIntoClipboard(table)
|
self.copyTableIntoClipboard(table)
|
||||||
|
|
||||||
|
def _paste(self):
|
||||||
|
header, data = self.parseClipboardTable()
|
||||||
|
|
||||||
|
logger.debug(f"paste: h:{header}, d:{data}")
|
||||||
|
|
||||||
|
if len(data) == 0:
|
||||||
|
return
|
||||||
|
|
||||||
|
row = 0
|
||||||
|
rows = self.index_selected_rows()
|
||||||
|
if len(rows) != 0:
|
||||||
|
row = rows[0]
|
||||||
|
|
||||||
|
self._table.paste(row, header, data)
|
||||||
|
self.plot.update()
|
||||||
|
|
||||||
def _undo(self):
|
def _undo(self):
|
||||||
self._table.undo()
|
self._table.undo()
|
||||||
self.plot.update()
|
self.plot.update()
|
||||||
|
|||||||
@@ -119,17 +119,10 @@ class TableModel(PamhyrTableModel):
|
|||||||
|
|
||||||
super(TableModel, self).__init__(trad=trad, **kwargs)
|
super(TableModel, self).__init__(trad=trad, **kwargs)
|
||||||
|
|
||||||
def _setup_lst(self):
|
|
||||||
self._lst = self._bc_list.lst
|
|
||||||
|
|
||||||
def rowCount(self, parent):
|
def rowCount(self, parent):
|
||||||
return len(self._lst)
|
return len(self._bc_list)
|
||||||
|
|
||||||
def data(self, index, role):
|
def data(self, index, role):
|
||||||
if len(self._lst) != 0:
|
|
||||||
data = self._lst
|
|
||||||
else:
|
|
||||||
data = []
|
|
||||||
|
|
||||||
if role != Qt.ItemDataRole.DisplayRole:
|
if role != Qt.ItemDataRole.DisplayRole:
|
||||||
return QVariant()
|
return QVariant()
|
||||||
@@ -138,12 +131,12 @@ class TableModel(PamhyrTableModel):
|
|||||||
column = index.column()
|
column = index.column()
|
||||||
|
|
||||||
if self._headers[column] == "type":
|
if self._headers[column] == "type":
|
||||||
n = data[row].type
|
n = self._bc_list.get(row).type
|
||||||
if n is None or n == "":
|
if n is None or n == "":
|
||||||
return self._trad["not_associated"]
|
return self._trad["not_associated"]
|
||||||
return n
|
return n
|
||||||
elif self._headers[column] == "node":
|
elif self._headers[column] == "node":
|
||||||
n = data[row].node
|
n = self._bc_list.get(row).node
|
||||||
if n is None:
|
if n is None:
|
||||||
return self._trad["not_associated"]
|
return self._trad["not_associated"]
|
||||||
tmp = next(filter(lambda x: x.id == n, self._data._nodes), None)
|
tmp = next(filter(lambda x: x.id == n, self._data._nodes), None)
|
||||||
@@ -152,7 +145,7 @@ class TableModel(PamhyrTableModel):
|
|||||||
else:
|
else:
|
||||||
return self._trad["not_associated"]
|
return self._trad["not_associated"]
|
||||||
elif self._headers[column] == "pol":
|
elif self._headers[column] == "pol":
|
||||||
n = data[row].pollutant
|
n = self._bc_list.get(row).pollutant
|
||||||
if n is None or n == "not_associated" or n == "":
|
if n is None or n == "not_associated" or n == "":
|
||||||
return self._trad["not_associated"]
|
return self._trad["not_associated"]
|
||||||
tmp = next(filter(lambda x: x.id == n,
|
tmp = next(filter(lambda x: x.id == n,
|
||||||
@@ -177,20 +170,20 @@ class TableModel(PamhyrTableModel):
|
|||||||
if self._headers[column] == "type":
|
if self._headers[column] == "type":
|
||||||
self._undo.push(
|
self._undo.push(
|
||||||
SetTypeCommand(
|
SetTypeCommand(
|
||||||
self._lst, row, value
|
self._bc_list, row, value
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
elif self._headers[column] == "node":
|
elif self._headers[column] == "node":
|
||||||
self._undo.push(
|
self._undo.push(
|
||||||
SetNodeCommand(
|
SetNodeCommand(
|
||||||
self._lst, row, self._data.node(value)
|
self._bc_list, row, self._data.node(value)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
elif self._headers[column] == "pol":
|
elif self._headers[column] == "pol":
|
||||||
if value == self._trad["not_associated"]:
|
if value == self._trad["not_associated"]:
|
||||||
self._undo.push(
|
self._undo.push(
|
||||||
SetPolCommand(
|
SetPolCommand(
|
||||||
self._lst, row, None
|
self._bc_list, row, None
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
@@ -199,7 +192,7 @@ class TableModel(PamhyrTableModel):
|
|||||||
)
|
)
|
||||||
self._undo.push(
|
self._undo.push(
|
||||||
SetPolCommand(
|
SetPolCommand(
|
||||||
self._lst, row, pol.id
|
self._bc_list, row, pol.id
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
@@ -214,7 +207,7 @@ class TableModel(PamhyrTableModel):
|
|||||||
|
|
||||||
self._undo.push(
|
self._undo.push(
|
||||||
AddCommand(
|
AddCommand(
|
||||||
self._pollutant, self._bc_list, self._lst, row
|
self._pollutant, self._bc_list, row
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -226,7 +219,7 @@ class TableModel(PamhyrTableModel):
|
|||||||
|
|
||||||
self._undo.push(
|
self._undo.push(
|
||||||
DelCommand(
|
DelCommand(
|
||||||
self._lst, rows
|
self._bc_list, rows
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -35,14 +35,14 @@ class SetNodeCommand(QUndoCommand):
|
|||||||
|
|
||||||
self._bcs = bcs
|
self._bcs = bcs
|
||||||
self._index = index
|
self._index = index
|
||||||
self._old = self._bcs[self._index].node
|
self._old = self._bcs.get(self._index).node
|
||||||
self._new = node.id
|
self._new = node.id
|
||||||
|
|
||||||
def undo(self):
|
def undo(self):
|
||||||
self._bcs[self._index].node = self._old
|
self._bcs.get(self._index).node = self._old
|
||||||
|
|
||||||
def redo(self):
|
def redo(self):
|
||||||
self._bcs[self._index].node = self._new
|
self._bcs.get(self._index).node = self._new
|
||||||
|
|
||||||
|
|
||||||
class SetTypeCommand(QUndoCommand):
|
class SetTypeCommand(QUndoCommand):
|
||||||
@@ -52,14 +52,14 @@ class SetTypeCommand(QUndoCommand):
|
|||||||
self._bcs = bcs
|
self._bcs = bcs
|
||||||
self._index = index
|
self._index = index
|
||||||
self._type = _type
|
self._type = _type
|
||||||
self._old = self._bcs[self._index].type
|
self._old = self._bcs.get(self._index).type
|
||||||
self._new = self._type
|
self._new = self._type
|
||||||
|
|
||||||
def undo(self):
|
def undo(self):
|
||||||
self._bcs[self._index].type = self._old
|
self._bcs.get(self._index).type = self._old
|
||||||
|
|
||||||
def redo(self):
|
def redo(self):
|
||||||
self._bcs[self._index].type = self._new
|
self._bcs.get(self._index).type = self._new
|
||||||
|
|
||||||
|
|
||||||
class SetPolCommand(QUndoCommand):
|
class SetPolCommand(QUndoCommand):
|
||||||
@@ -68,32 +68,31 @@ class SetPolCommand(QUndoCommand):
|
|||||||
|
|
||||||
self._bcs = bcs
|
self._bcs = bcs
|
||||||
self._index = index
|
self._index = index
|
||||||
self._old = self._bcs[self._index].pollutant
|
self._old = self._bcs.get(self._index).pollutant
|
||||||
self._new = pollutant
|
self._new = pollutant
|
||||||
|
|
||||||
def undo(self):
|
def undo(self):
|
||||||
self._bcs[self._index].pollutant = self._old
|
self._bcs.get(self._index).pollutant = self._old
|
||||||
|
|
||||||
def redo(self):
|
def redo(self):
|
||||||
self._bcs[self._index].pollutant = self._new
|
self._bcs.get(self._index).pollutant = self._new
|
||||||
|
|
||||||
|
|
||||||
class AddCommand(QUndoCommand):
|
class AddCommand(QUndoCommand):
|
||||||
def __init__(self, pollutant, bcs_list, bcs, index):
|
def __init__(self, pollutant, bcs, index):
|
||||||
QUndoCommand.__init__(self)
|
QUndoCommand.__init__(self)
|
||||||
|
|
||||||
self._bcs = bcs
|
self._bcs = bcs
|
||||||
self._bc_list = bcs_list
|
|
||||||
self._pollutant = pollutant
|
self._pollutant = pollutant
|
||||||
self._index = index
|
self._index = index
|
||||||
self._new = None
|
self._new = None
|
||||||
|
|
||||||
def undo(self):
|
def undo(self):
|
||||||
del self._bcs[self._index]
|
self._bcs.delete_i([self._index])
|
||||||
|
|
||||||
def redo(self):
|
def redo(self):
|
||||||
if self._new is None:
|
if self._new is None:
|
||||||
self._new = self._bc_list.new(self._index, self._pollutant)
|
self._new = self._bcs.new(self._index, self._pollutant)
|
||||||
else:
|
else:
|
||||||
self._bcs.insert(self._index, self._new)
|
self._bcs.insert(self._index, self._new)
|
||||||
|
|
||||||
@@ -107,7 +106,7 @@ class DelCommand(QUndoCommand):
|
|||||||
|
|
||||||
self._bc = []
|
self._bc = []
|
||||||
for row in rows:
|
for row in rows:
|
||||||
self._bc.append((row, self._bcs[row]))
|
self._bc.append((row, self._bcs.get(row)))
|
||||||
self._bc.sort()
|
self._bc.sort()
|
||||||
|
|
||||||
def undo(self):
|
def undo(self):
|
||||||
@@ -115,5 +114,4 @@ class DelCommand(QUndoCommand):
|
|||||||
self._bcs.insert(row, el)
|
self._bcs.insert(row, el)
|
||||||
|
|
||||||
def redo(self):
|
def redo(self):
|
||||||
for row in self._rows:
|
self._bcs.delete_i(self._rows)
|
||||||
del self._bcs[row]
|
|
||||||
@@ -180,7 +180,10 @@ class BoundaryConditionAdisTSWindow(PamhyrWindow):
|
|||||||
def edit(self):
|
def edit(self):
|
||||||
rows = self.index_selected_rows()
|
rows = self.index_selected_rows()
|
||||||
for row in rows:
|
for row in rows:
|
||||||
data = self._bcs.lst[row]
|
data = self._bcs.get(row)
|
||||||
|
|
||||||
|
if data.node is None:
|
||||||
|
continue
|
||||||
|
|
||||||
if self.sub_window_exists(
|
if self.sub_window_exists(
|
||||||
EditBoundaryConditionWindow,
|
EditBoundaryConditionWindow,
|
||||||
|
|||||||
@@ -130,29 +130,29 @@ class D90TableModel(PamhyrTableModel):
|
|||||||
row = index.row()
|
row = index.row()
|
||||||
column = index.column()
|
column = index.column()
|
||||||
|
|
||||||
if self._headers[column] is "name":
|
if self._headers[column] == "name":
|
||||||
n = self._lst[row].name
|
n = self._lst[row].name
|
||||||
if n is None or n == "":
|
if n is None or n == "":
|
||||||
return self._trad['not_associated']
|
return self._trad['not_associated']
|
||||||
return n
|
return n
|
||||||
elif self._headers[column] is "reach":
|
elif self._headers[column] == "reach":
|
||||||
n = self._lst[row].reach
|
n = self._lst[row].reach
|
||||||
if n is None:
|
if n is None:
|
||||||
return self._trad['not_associated']
|
return self._trad['not_associated']
|
||||||
return next(filter(
|
return next(filter(
|
||||||
lambda edge: edge.id == n, self._river.edges()
|
lambda edge: edge.id == n, self._river.edges()
|
||||||
)).name
|
)).name
|
||||||
elif self._headers[column] is "start_rk":
|
elif self._headers[column] == "start_rk":
|
||||||
n = self._lst[row].start_rk
|
n = self._lst[row].start_rk
|
||||||
if n is None:
|
if n is None:
|
||||||
return self._trad['not_associated']
|
return self._trad['not_associated']
|
||||||
return n
|
return n
|
||||||
elif self._headers[column] is "end_rk":
|
elif self._headers[column] == "end_rk":
|
||||||
n = self._lst[row].end_rk
|
n = self._lst[row].end_rk
|
||||||
if n is None:
|
if n is None:
|
||||||
return self._trad['not_associated']
|
return self._trad['not_associated']
|
||||||
return n
|
return n
|
||||||
elif self._headers[column] is "d90":
|
elif self._headers[column] == "d90":
|
||||||
n = self._lst[row].d90
|
n = self._lst[row].d90
|
||||||
if n is None:
|
if n is None:
|
||||||
return self._trad['not_associated']
|
return self._trad['not_associated']
|
||||||
@@ -175,7 +175,6 @@ class D90TableModel(PamhyrTableModel):
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
elif self._headers[column] == "reach":
|
elif self._headers[column] == "reach":
|
||||||
print(self._river.edge(value).id)
|
|
||||||
self._undo.push(
|
self._undo.push(
|
||||||
SetCommandSpec(
|
SetCommandSpec(
|
||||||
self._lst, row, self._headers[column],
|
self._lst, row, self._headers[column],
|
||||||
|
|||||||
@@ -279,9 +279,7 @@ class D90AdisTSWindow(PamhyrWindow):
|
|||||||
self._table_spec.add(rows[0])
|
self._table_spec.add(rows[0])
|
||||||
|
|
||||||
def delete(self):
|
def delete(self):
|
||||||
print("del")
|
|
||||||
rows = self.index_selected_rows()
|
rows = self.index_selected_rows()
|
||||||
if len(rows) == 0:
|
if len(rows) == 0:
|
||||||
print("len 0")
|
|
||||||
return
|
return
|
||||||
self._table_spec.delete(rows)
|
self._table_spec.delete(rows)
|
||||||
@@ -132,39 +132,39 @@ class DIFTableModel(PamhyrTableModel):
|
|||||||
row = index.row()
|
row = index.row()
|
||||||
column = index.column()
|
column = index.column()
|
||||||
|
|
||||||
if self._headers[column] is "method":
|
if self._headers[column] == "method":
|
||||||
n = self._lst[row].method
|
n = self._lst[row].method
|
||||||
if n is None or n == "":
|
if n is None or n == "":
|
||||||
return self._trad['not_associated']
|
return self._trad['not_associated']
|
||||||
return n
|
return n
|
||||||
elif self._headers[column] is "reach":
|
elif self._headers[column] == "reach":
|
||||||
n = self._lst[row].reach
|
n = self._lst[row].reach
|
||||||
if n is None:
|
if n is None:
|
||||||
return self._trad['not_associated']
|
return self._trad['not_associated']
|
||||||
return next(filter(
|
return next(filter(
|
||||||
lambda edge: edge.id == n, self._river.edges()
|
lambda edge: edge.id == n, self._river.edges()
|
||||||
)).name
|
)).name
|
||||||
elif self._headers[column] is "start_rk":
|
elif self._headers[column] == "start_rk":
|
||||||
n = self._lst[row].start_rk
|
n = self._lst[row].start_rk
|
||||||
if n is None:
|
if n is None:
|
||||||
return self._trad['not_associated']
|
return self._trad['not_associated']
|
||||||
return n
|
return n
|
||||||
elif self._headers[column] is "end_rk":
|
elif self._headers[column] == "end_rk":
|
||||||
n = self._lst[row].end_rk
|
n = self._lst[row].end_rk
|
||||||
if n is None:
|
if n is None:
|
||||||
return self._trad['not_associated']
|
return self._trad['not_associated']
|
||||||
return n
|
return n
|
||||||
elif self._headers[column] is "dif":
|
elif self._headers[column] == "dif":
|
||||||
n = self._lst[row].dif
|
n = self._lst[row].dif
|
||||||
if n is None:
|
if n is None:
|
||||||
return self._trad['not_associated']
|
return self._trad['not_associated']
|
||||||
return n
|
return n
|
||||||
elif self._headers[column] is "b":
|
elif self._headers[column] == "b":
|
||||||
n = self._lst[row].b
|
n = self._lst[row].b
|
||||||
if n is None:
|
if n is None:
|
||||||
return self._trad['not_associated']
|
return self._trad['not_associated']
|
||||||
return n
|
return n
|
||||||
elif self._headers[column] is "c":
|
elif self._headers[column] == "c":
|
||||||
n = self._lst[row].c
|
n = self._lst[row].c
|
||||||
if n is None:
|
if n is None:
|
||||||
return self._trad['not_associated']
|
return self._trad['not_associated']
|
||||||
|
|||||||
@@ -55,22 +55,22 @@ class DIFTableDefaultModel(PamhyrTableModel):
|
|||||||
row = index.row()
|
row = index.row()
|
||||||
column = index.column()
|
column = index.column()
|
||||||
|
|
||||||
if self._headers[column] is "method":
|
if self._headers[column] == "method":
|
||||||
n = self._data[row].method
|
n = self._data[row].method
|
||||||
if n is None:
|
if n is None:
|
||||||
return self._trad['not_associated']
|
return self._trad['not_associated']
|
||||||
return n
|
return n
|
||||||
elif self._headers[column] is "dif":
|
elif self._headers[column] == "dif":
|
||||||
n = self._data[row].dif
|
n = self._data[row].dif
|
||||||
if n is None:
|
if n is None:
|
||||||
return self._trad['not_associated']
|
return self._trad['not_associated']
|
||||||
return n
|
return n
|
||||||
elif self._headers[column] is "b":
|
elif self._headers[column] == "b":
|
||||||
n = self._data[row].b
|
n = self._data[row].b
|
||||||
if n is None:
|
if n is None:
|
||||||
return self._trad['not_associated']
|
return self._trad['not_associated']
|
||||||
return n
|
return n
|
||||||
elif self._headers[column] is "c":
|
elif self._headers[column] == "c":
|
||||||
n = self._data[row].c
|
n = self._data[row].c
|
||||||
if n is None:
|
if n is None:
|
||||||
return self._trad['not_associated']
|
return self._trad['not_associated']
|
||||||
|
|||||||
@@ -51,6 +51,11 @@ class PlotAC(PamhyrPlot):
|
|||||||
self.plot_selected = None
|
self.plot_selected = None
|
||||||
self.next_plot_selected = None
|
self.next_plot_selected = None
|
||||||
|
|
||||||
|
@timer
|
||||||
|
def redraw(self, data):
|
||||||
|
self._data = data
|
||||||
|
self.draw()
|
||||||
|
|
||||||
@timer
|
@timer
|
||||||
def draw(self):
|
def draw(self):
|
||||||
self.init_axes()
|
self.init_axes()
|
||||||
|
|||||||
@@ -163,6 +163,11 @@ class PlotRKZ(PamhyrPlot):
|
|||||||
)
|
)
|
||||||
self._table.scrollTo(self._table.model().index(ind2, 0))
|
self._table.scrollTo(self._table.model().index(ind2, 0))
|
||||||
|
|
||||||
|
@timer
|
||||||
|
def redraw(self, data):
|
||||||
|
self._data = data
|
||||||
|
self.draw()
|
||||||
|
|
||||||
@timer
|
@timer
|
||||||
def draw(self):
|
def draw(self):
|
||||||
self.init_axes()
|
self.init_axes()
|
||||||
|
|||||||
@@ -162,6 +162,11 @@ class PlotXY(PamhyrPlot):
|
|||||||
)
|
)
|
||||||
self._table.scrollTo(self._table.model().index(ind2, 0))
|
self._table.scrollTo(self._table.model().index(ind2, 0))
|
||||||
|
|
||||||
|
@timer
|
||||||
|
def redraw(self, data):
|
||||||
|
self._data = data
|
||||||
|
self.draw()
|
||||||
|
|
||||||
@timer
|
@timer
|
||||||
def draw(self):
|
def draw(self):
|
||||||
self.init_axes()
|
self.init_axes()
|
||||||
|
|||||||
@@ -169,7 +169,7 @@ class GeometryReachTableModel(PamhyrTableModel):
|
|||||||
self.layoutChanged.emit()
|
self.layoutChanged.emit()
|
||||||
|
|
||||||
def move_down(self, row, parent=QModelIndex()):
|
def move_down(self, row, parent=QModelIndex()):
|
||||||
if row > self._data.number_profiles:
|
if row >= self._data.number_profiles-1:
|
||||||
return
|
return
|
||||||
|
|
||||||
target = row
|
target = row
|
||||||
@@ -276,3 +276,12 @@ class GeometryReachTableModel(PamhyrTableModel):
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
self.layoutChanged.emit()
|
self.layoutChanged.emit()
|
||||||
|
|
||||||
|
def change_reach(self, new_reach, parent):
|
||||||
|
|
||||||
|
self._undo.push(
|
||||||
|
ChangeReachCommand(
|
||||||
|
new_reach,
|
||||||
|
parent
|
||||||
|
)
|
||||||
|
)
|
||||||
@@ -22,7 +22,7 @@ from copy import deepcopy
|
|||||||
from tools import trace, timer, logger_exception
|
from tools import trace, timer, logger_exception
|
||||||
|
|
||||||
from PyQt5.QtWidgets import (
|
from PyQt5.QtWidgets import (
|
||||||
QMessageBox, QUndoCommand, QUndoStack,
|
QMessageBox, QUndoCommand, QUndoStack, QTableView
|
||||||
)
|
)
|
||||||
|
|
||||||
from Model.Geometry import Reach
|
from Model.Geometry import Reach
|
||||||
@@ -293,6 +293,35 @@ class PurgeCommand(QUndoCommand):
|
|||||||
profile.purge(self._np_purge)
|
profile.purge(self._np_purge)
|
||||||
|
|
||||||
|
|
||||||
|
class ChangeReachCommand(QUndoCommand):
|
||||||
|
def __init__(self, new_reach, parent):
|
||||||
|
QUndoCommand.__init__(self)
|
||||||
|
|
||||||
|
self._old_reach = parent._study.river.current_reach()
|
||||||
|
self._new_reach = new_reach
|
||||||
|
self._parent = parent
|
||||||
|
|
||||||
|
def undo(self):
|
||||||
|
p = self._parent
|
||||||
|
p._reach = self._old_reach.reach
|
||||||
|
p._study.river.set_current_reach(self._old_reach)
|
||||||
|
p.setup_table()
|
||||||
|
p.update_redraw()
|
||||||
|
p.find(QTableView, "tableView").selectionModel()\
|
||||||
|
.selectionChanged\
|
||||||
|
.connect(p.select_current_profile)
|
||||||
|
|
||||||
|
def redo(self):
|
||||||
|
p = self._parent
|
||||||
|
p._reach = self._new_reach.reach
|
||||||
|
p._study.river.set_current_reach(self._new_reach)
|
||||||
|
p.setup_table()
|
||||||
|
p.update_redraw()
|
||||||
|
p.find(QTableView, "tableView").selectionModel()\
|
||||||
|
.selectionChanged\
|
||||||
|
.connect(p.select_current_profile)
|
||||||
|
|
||||||
|
|
||||||
class ShiftCommand(QUndoCommand):
|
class ShiftCommand(QUndoCommand):
|
||||||
def __init__(self, reach, rows, dx, dy, dz):
|
def __init__(self, reach, rows, dx, dy, dz):
|
||||||
QUndoCommand.__init__(self)
|
QUndoCommand.__init__(self)
|
||||||
|
|||||||
@@ -47,6 +47,8 @@ from View.Tools.PamhyrWindow import PamhyrWindow
|
|||||||
from View.Tools.Plot.PamhyrToolbar import PamhyrPlotToolbar
|
from View.Tools.Plot.PamhyrToolbar import PamhyrPlotToolbar
|
||||||
from View.Tools.Plot.PamhyrCanvas import MplCanvas
|
from View.Tools.Plot.PamhyrCanvas import MplCanvas
|
||||||
|
|
||||||
|
from View.SelectReach.Window import SelectReachWindow
|
||||||
|
|
||||||
from Meshing.Mage import (
|
from Meshing.Mage import (
|
||||||
MeshingWithMage, MeshingWithMageMailleurTT
|
MeshingWithMage, MeshingWithMageMailleurTT
|
||||||
)
|
)
|
||||||
@@ -196,6 +198,7 @@ class GeometryWindow(PamhyrWindow):
|
|||||||
"action_update_rk": self.update_rk,
|
"action_update_rk": self.update_rk,
|
||||||
"action_purge": self.purge,
|
"action_purge": self.purge,
|
||||||
"action_shift": self.shift,
|
"action_shift": self.shift,
|
||||||
|
"action_select_reach": self.select_reach,
|
||||||
}
|
}
|
||||||
|
|
||||||
for action in actions:
|
for action in actions:
|
||||||
@@ -217,9 +220,9 @@ class GeometryWindow(PamhyrWindow):
|
|||||||
|
|
||||||
def _update(self, redraw=False, propagate=True):
|
def _update(self, redraw=False, propagate=True):
|
||||||
if redraw:
|
if redraw:
|
||||||
self._plot_xy.draw()
|
self._plot_xy.redraw(data=self._reach)
|
||||||
self._plot_rkc.draw()
|
self._plot_rkc.redraw(data=self._reach)
|
||||||
self._plot_ac.draw()
|
self._plot_ac.redraw(data=self._reach)
|
||||||
|
|
||||||
self.select_current_profile()
|
self.select_current_profile()
|
||||||
|
|
||||||
@@ -535,6 +538,20 @@ class GeometryWindow(PamhyrWindow):
|
|||||||
logger_exception(e)
|
logger_exception(e)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
def select_reach(self):
|
||||||
|
try:
|
||||||
|
dlg = SelectReachWindow(
|
||||||
|
study=self._study,
|
||||||
|
trad=self._trad,
|
||||||
|
parent=self
|
||||||
|
)
|
||||||
|
if dlg.exec():
|
||||||
|
self._table.change_reach(dlg.reach, self)
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
logger_exception(e)
|
||||||
|
return
|
||||||
|
|
||||||
def duplicate(self):
|
def duplicate(self):
|
||||||
rows = [
|
rows = [
|
||||||
row.row() for row in
|
row.row() for row in
|
||||||
|
|||||||
@@ -276,7 +276,6 @@ class InitialConditionsWindow(PamhyrWindow):
|
|||||||
if filename != "":
|
if filename != "":
|
||||||
size = os.stat(filename).st_size
|
size = os.stat(filename).st_size
|
||||||
# self._table.import_geometry(0, filename)
|
# self._table.import_geometry(0, filename)
|
||||||
print(f"filename: {filename}")
|
|
||||||
self._import_from_file(filename)
|
self._import_from_file(filename)
|
||||||
|
|
||||||
def _import_from_file(self, file_name):
|
def _import_from_file(self, file_name):
|
||||||
|
|||||||
@@ -129,49 +129,49 @@ class InitialConditionTableModel(PamhyrTableModel):
|
|||||||
row = index.row()
|
row = index.row()
|
||||||
column = index.column()
|
column = index.column()
|
||||||
|
|
||||||
if self._headers[column] is "name":
|
if self._headers[column] == "name":
|
||||||
n = self._lst[row].name
|
n = self._lst[row].name
|
||||||
if n is None or n == "":
|
if n is None or n == "":
|
||||||
return self._trad['not_associated']
|
return self._trad['not_associated']
|
||||||
return n
|
return n
|
||||||
elif self._headers[column] is "reach":
|
elif self._headers[column] == "reach":
|
||||||
n = self._lst[row].reach
|
n = self._lst[row].reach
|
||||||
if n is None:
|
if n is None:
|
||||||
return self._trad['not_associated']
|
return self._trad['not_associated']
|
||||||
return next(filter(
|
return next(filter(
|
||||||
lambda edge: edge.id == n, self._river.edges()
|
lambda edge: edge.id == n, self._river.edges()
|
||||||
)).name
|
)).name
|
||||||
elif self._headers[column] is "start_rk":
|
elif self._headers[column] == "start_rk":
|
||||||
n = self._lst[row].start_rk
|
n = self._lst[row].start_rk
|
||||||
if n is None:
|
if n is None:
|
||||||
return self._trad['not_associated']
|
return self._trad['not_associated']
|
||||||
return n
|
return n
|
||||||
elif self._headers[column] is "end_rk":
|
elif self._headers[column] == "end_rk":
|
||||||
n = self._lst[row].end_rk
|
n = self._lst[row].end_rk
|
||||||
if n is None:
|
if n is None:
|
||||||
return self._trad['not_associated']
|
return self._trad['not_associated']
|
||||||
return n
|
return n
|
||||||
elif self._headers[column] is "concentration":
|
elif self._headers[column] == "concentration":
|
||||||
n = self._lst[row].concentration
|
n = self._lst[row].concentration
|
||||||
if n is None:
|
if n is None:
|
||||||
return self._trad['not_associated']
|
return self._trad['not_associated']
|
||||||
return n
|
return n
|
||||||
elif self._headers[column] is "eg":
|
elif self._headers[column] == "eg":
|
||||||
n = self._lst[row].eg
|
n = self._lst[row].eg
|
||||||
if n is None:
|
if n is None:
|
||||||
return self._trad['not_associated']
|
return self._trad['not_associated']
|
||||||
return n
|
return n
|
||||||
elif self._headers[column] is "em":
|
elif self._headers[column] == "em":
|
||||||
n = self._lst[row].em
|
n = self._lst[row].em
|
||||||
if n is None:
|
if n is None:
|
||||||
return self._trad['not_associated']
|
return self._trad['not_associated']
|
||||||
return n
|
return n
|
||||||
elif self._headers[column] is "ed":
|
elif self._headers[column] == "ed":
|
||||||
n = self._lst[row].ed
|
n = self._lst[row].ed
|
||||||
if n is None:
|
if n is None:
|
||||||
return self._trad['not_associated']
|
return self._trad['not_associated']
|
||||||
return n
|
return n
|
||||||
elif self._headers[column] is "rate":
|
elif self._headers[column] == "rate":
|
||||||
n = self._lst[row].rate
|
n = self._lst[row].rate
|
||||||
if n is None:
|
if n is None:
|
||||||
return self._trad['not_associated']
|
return self._trad['not_associated']
|
||||||
@@ -194,7 +194,6 @@ class InitialConditionTableModel(PamhyrTableModel):
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
elif self._headers[column] == "reach":
|
elif self._headers[column] == "reach":
|
||||||
print(self._river.edge(value).id)
|
|
||||||
self._undo.push(
|
self._undo.push(
|
||||||
SetCommandSpec(
|
SetCommandSpec(
|
||||||
self._lst, row, self._headers[column],
|
self._lst, row, self._headers[column],
|
||||||
|
|||||||
@@ -55,24 +55,24 @@ class InitialConditionTableDefaultModel(PamhyrTableModel):
|
|||||||
row = index.row()
|
row = index.row()
|
||||||
column = index.column()
|
column = index.column()
|
||||||
|
|
||||||
if self._headers[column] is "name":
|
if self._headers[column] == "name":
|
||||||
return self._data[row].name
|
return self._data[row].name
|
||||||
elif self._headers[column] is "concentration":
|
elif self._headers[column] == "concentration":
|
||||||
n = self._data[row].concentration
|
n = self._data[row].concentration
|
||||||
if n is None:
|
if n is None:
|
||||||
return self._trad['not_associated']
|
return self._trad['not_associated']
|
||||||
return n
|
return n
|
||||||
elif self._headers[column] is "eg":
|
elif self._headers[column] == "eg":
|
||||||
n = self._data[row].eg
|
n = self._data[row].eg
|
||||||
if n is None:
|
if n is None:
|
||||||
return self._trad['not_associated']
|
return self._trad['not_associated']
|
||||||
return n
|
return n
|
||||||
elif self._headers[column] is "em":
|
elif self._headers[column] == "em":
|
||||||
n = self._data[row].em
|
n = self._data[row].em
|
||||||
if n is None:
|
if n is None:
|
||||||
return self._trad['not_associated']
|
return self._trad['not_associated']
|
||||||
return n
|
return n
|
||||||
elif self._headers[column] is "ed":
|
elif self._headers[column] == "ed":
|
||||||
n = self._data[row].ed
|
n = self._data[row].ed
|
||||||
if n is None:
|
if n is None:
|
||||||
return self._trad['not_associated']
|
return self._trad['not_associated']
|
||||||
|
|||||||
@@ -281,9 +281,7 @@ class InitialConditionsAdisTSWindow(PamhyrWindow):
|
|||||||
self._table_spec.add(rows[0])
|
self._table_spec.add(rows[0])
|
||||||
|
|
||||||
def delete(self):
|
def delete(self):
|
||||||
print("del")
|
|
||||||
rows = self.index_selected_rows()
|
rows = self.index_selected_rows()
|
||||||
if len(rows) == 0:
|
if len(rows) == 0:
|
||||||
print("len 0")
|
|
||||||
return
|
return
|
||||||
self._table_spec.delete(rows)
|
self._table_spec.delete(rows)
|
||||||
+11
-10
@@ -348,10 +348,12 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
|||||||
def closeEvent(self, event):
|
def closeEvent(self, event):
|
||||||
if not self._close_question:
|
if not self._close_question:
|
||||||
if self._study is not None and not self._study.is_saved:
|
if self._study is not None and not self._study.is_saved:
|
||||||
if self.dialog_close(cancel=False):
|
if self.dialog_close():
|
||||||
# PAMHYR is close correctly (no crash)
|
# PAMHYR is close correctly (no crash)
|
||||||
self.conf.set_close_correctly()
|
self.conf.set_close_correctly()
|
||||||
super(ApplicationWindow, self).closeEvent(event)
|
super(ApplicationWindow, self).closeEvent(event)
|
||||||
|
else:
|
||||||
|
event.ignore()
|
||||||
else:
|
else:
|
||||||
super(ApplicationWindow, self).closeEvent(event)
|
super(ApplicationWindow, self).closeEvent(event)
|
||||||
|
|
||||||
@@ -531,7 +533,7 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
|||||||
self.update()
|
self.update()
|
||||||
|
|
||||||
def close_model(self):
|
def close_model(self):
|
||||||
if not self.dialog_close(cancel=True):
|
if not self.dialog_close():
|
||||||
return
|
return
|
||||||
|
|
||||||
self._study = None
|
self._study = None
|
||||||
@@ -833,21 +835,19 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
|||||||
|
|
||||||
return file
|
return file
|
||||||
|
|
||||||
def dialog_close(self, cancel=True):
|
def dialog_close(self):
|
||||||
dlg = QMessageBox(self)
|
dlg = QMessageBox(self)
|
||||||
|
|
||||||
dlg.setWindowTitle(self._trad["mb_close_title"])
|
dlg.setWindowTitle(self._trad["mb_close_title"])
|
||||||
dlg.setText(self._trad["mb_close_msg"])
|
dlg.setText(self._trad["mb_close_msg"])
|
||||||
opt = QMessageBox.Save | QMessageBox.Close
|
opt = QMessageBox.Save | QMessageBox.Close
|
||||||
if cancel:
|
opt |= QMessageBox.Cancel
|
||||||
opt |= QMessageBox.Cancel
|
|
||||||
|
|
||||||
dlg.setStandardButtons(opt)
|
dlg.setStandardButtons(opt)
|
||||||
dlg.setIcon(QMessageBox.Warning)
|
dlg.setIcon(QMessageBox.Warning)
|
||||||
dlg.button(QMessageBox.Save).setText(self._trad["Save"])
|
dlg.button(QMessageBox.Save).setText(self._trad["Save"])
|
||||||
dlg.button(QMessageBox.Close).setText(self._trad["Close"])
|
dlg.button(QMessageBox.Close).setText(self._trad["Close"])
|
||||||
if cancel:
|
dlg.button(QMessageBox.Cancel).setText(self._trad["Cancel"])
|
||||||
dlg.button(QMessageBox.Cancel).setText(self._trad["Cancel"])
|
|
||||||
|
|
||||||
res = dlg.exec()
|
res = dlg.exec()
|
||||||
|
|
||||||
@@ -1319,7 +1319,6 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
|||||||
# self.conf.solvers))
|
# self.conf.solvers))
|
||||||
# solver = next(filter(lambda x: x.name == "AdisTS-WC",
|
# solver = next(filter(lambda x: x.name == "AdisTS-WC",
|
||||||
# self.conf.solvers))
|
# self.conf.solvers))
|
||||||
# print(solver._type)
|
|
||||||
# self.run_solver(solver)
|
# self.run_solver(solver)
|
||||||
|
|
||||||
run = SelectSolverWindowAdisTS(
|
run = SelectSolverWindowAdisTS(
|
||||||
@@ -1578,6 +1577,8 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
|||||||
if run.exec():
|
if run.exec():
|
||||||
results = self.diff_results(run.solver1,
|
results = self.diff_results(run.solver1,
|
||||||
run.solver2)
|
run.solver2)
|
||||||
|
else:
|
||||||
|
return
|
||||||
|
|
||||||
# At least one result not available
|
# At least one result not available
|
||||||
if results is None:
|
if results is None:
|
||||||
@@ -1649,8 +1650,8 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
|||||||
result3.set("nb_profile", result1.get("nb_profile"))
|
result3.set("nb_profile", result1.get("nb_profile"))
|
||||||
result4.set("nb_profile", result1.get("nb_profile"))
|
result4.set("nb_profile", result1.get("nb_profile"))
|
||||||
result5.set("nb_profile", result1.get("nb_profile"))
|
result5.set("nb_profile", result1.get("nb_profile"))
|
||||||
ts = list(result1.get("timestamps").intersection(
|
ts = sorted(list(result1.get("timestamps").intersection(
|
||||||
result2.get("timestamps")))
|
result2.get("timestamps"))))
|
||||||
result3.set("timestamps", ts)
|
result3.set("timestamps", ts)
|
||||||
result4.set("timestamps", ts)
|
result4.set("timestamps", ts)
|
||||||
result5.set("timestamps", ts)
|
result5.set("timestamps", ts)
|
||||||
|
|||||||
@@ -0,0 +1,78 @@
|
|||||||
|
# ShiftDialog.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.QtWidgets import QDoubleSpinBox, QPushButton
|
||||||
|
|
||||||
|
|
||||||
|
class CoordinatesDialog(PamhyrDialog):
|
||||||
|
_pamhyr_ui = "GeotiffCoordinates"
|
||||||
|
_pamhyr_name = "ImageCoordinates"
|
||||||
|
|
||||||
|
def __init__(self, x, y, trad=None, parent=None):
|
||||||
|
super(CoordinatesDialog, self).__init__(
|
||||||
|
title=trad[self._pamhyr_name],
|
||||||
|
trad=trad,
|
||||||
|
options=[],
|
||||||
|
parent=parent
|
||||||
|
)
|
||||||
|
|
||||||
|
self.spinbox = {}
|
||||||
|
self._init_default_values(x, y)
|
||||||
|
self.setup_connections()
|
||||||
|
|
||||||
|
def _init_default_values(self, x, y):
|
||||||
|
self._x = x
|
||||||
|
self._y = y
|
||||||
|
self._values = {"bottom": x[0],
|
||||||
|
"top": x[1],
|
||||||
|
"left": y[0],
|
||||||
|
"right": y[1]}
|
||||||
|
self.spinbox = {}
|
||||||
|
for t in self._values:
|
||||||
|
self.spinbox[t] = self.find(QDoubleSpinBox, f"doubleSpinBox_{t}")
|
||||||
|
self.reset(t)
|
||||||
|
|
||||||
|
def setup_connections(self):
|
||||||
|
for t in self._values:
|
||||||
|
self.find(QPushButton,
|
||||||
|
f"pushButton_{t}").clicked.connect(
|
||||||
|
lambda state, x=t: self.reset(x))
|
||||||
|
|
||||||
|
def reset(self, t):
|
||||||
|
self.spinbox[t].setValue(self._values[t])
|
||||||
|
|
||||||
|
@property
|
||||||
|
def x(self):
|
||||||
|
return [self._values["bottom"], self._values["top"]]
|
||||||
|
|
||||||
|
@property
|
||||||
|
def y(self):
|
||||||
|
return [self._values["left"], self._values["right"]]
|
||||||
|
|
||||||
|
@property
|
||||||
|
def values(self):
|
||||||
|
return [self._values[t] for t in self._values]
|
||||||
|
|
||||||
|
def accept(self):
|
||||||
|
for t in self._values:
|
||||||
|
self._values[t] = self.get_double_spin_box(f"doubleSpinBox_{t}")
|
||||||
|
super().accept()
|
||||||
|
|
||||||
|
def reject(self):
|
||||||
|
self.close()
|
||||||
@@ -1285,8 +1285,10 @@ class CustomPlot(PamhyrPlot):
|
|||||||
|
|
||||||
self.lines["wet_area"][0].set_ydata(d)
|
self.lines["wet_area"][0].set_ydata(d)
|
||||||
|
|
||||||
|
self._current.set_visible(False)
|
||||||
self.canvas.axes.relim(visible_only=True)
|
self.canvas.axes.relim(visible_only=True)
|
||||||
self.canvas.axes.autoscale_view()
|
self.canvas.axes.autoscale_view()
|
||||||
|
self._current.set_visible(True)
|
||||||
|
|
||||||
def draw(self):
|
def draw(self):
|
||||||
self.draw_static()
|
self.draw_static()
|
||||||
@@ -1386,7 +1388,7 @@ class CustomPlot(PamhyrPlot):
|
|||||||
self._reach = reach_id
|
self._reach = reach_id
|
||||||
self._profile = 0
|
self._profile = 0
|
||||||
|
|
||||||
self.update()
|
self.draw()
|
||||||
|
|
||||||
def set_profile(self, profile_id):
|
def set_profile(self, profile_id):
|
||||||
self._profile = profile_id
|
self._profile = profile_id
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ _translate = QCoreApplication.translate
|
|||||||
|
|
||||||
class PlotAC(PamhyrPlot):
|
class PlotAC(PamhyrPlot):
|
||||||
def __init__(self, canvas=None, trad=None, toolbar=None,
|
def __init__(self, canvas=None, trad=None, toolbar=None,
|
||||||
results=None, reach_id=0, profile_id=0, res_id=0,
|
results=None, reach_id=0, profile_id=[0], res_id=[0],
|
||||||
parent=None):
|
parent=None):
|
||||||
super(PlotAC, self).__init__(
|
super(PlotAC, self).__init__(
|
||||||
canvas=canvas,
|
canvas=canvas,
|
||||||
@@ -83,6 +83,7 @@ class PlotAC(PamhyrPlot):
|
|||||||
self.draw_profile(reach, profile)
|
self.draw_profile(reach, profile)
|
||||||
self.draw_water_elevation(reach, profile)
|
self.draw_water_elevation(reach, profile)
|
||||||
self.draw_water_elevation_max(reach, profile)
|
self.draw_water_elevation_max(reach, profile)
|
||||||
|
self.draw_gl()
|
||||||
|
|
||||||
self.enable_legend()
|
self.enable_legend()
|
||||||
|
|
||||||
@@ -134,6 +135,63 @@ class PlotAC(PamhyrPlot):
|
|||||||
lw=1., color=self.color_plot_river_water,
|
lw=1., color=self.color_plot_river_water,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def draw_gl(self):
|
||||||
|
|
||||||
|
results = self.results[self._current_res_id]
|
||||||
|
reach = results.river.reach(self._current_reach_id)
|
||||||
|
profile = reach.profile(self._current_profile_id)
|
||||||
|
if profile is None:
|
||||||
|
return
|
||||||
|
|
||||||
|
station = profile.geometry.get_station()
|
||||||
|
elevation = profile.geometry.z()
|
||||||
|
gl = profile.geometry.names()
|
||||||
|
|
||||||
|
self.annotation = []
|
||||||
|
self.cgl, self.igl = reach.geometry.compute_guidelines()
|
||||||
|
|
||||||
|
lcomplete = list(self.cgl)
|
||||||
|
lincomplete = list(self.igl)
|
||||||
|
|
||||||
|
self.color_complete_gl = self.colors
|
||||||
|
self.color_incomplete_gl = 2 * ["grey"]
|
||||||
|
|
||||||
|
x_gl_complete = []
|
||||||
|
y_gl_complete = []
|
||||||
|
x_gl_incomplete = []
|
||||||
|
y_gl_incomplete = []
|
||||||
|
|
||||||
|
for i, txt in enumerate(gl):
|
||||||
|
if txt == "":
|
||||||
|
continue
|
||||||
|
|
||||||
|
if txt.strip() in self.cgl:
|
||||||
|
color = self.color_complete_gl[
|
||||||
|
lcomplete.index(txt) % len(self.color_complete_gl)
|
||||||
|
]
|
||||||
|
else:
|
||||||
|
color = self.color_incomplete_gl[
|
||||||
|
lincomplete.index(txt)
|
||||||
|
]
|
||||||
|
|
||||||
|
annotation = self.canvas.axes.annotate(
|
||||||
|
txt, (station[i], elevation[i]),
|
||||||
|
horizontalalignment='left',
|
||||||
|
verticalalignment='top',
|
||||||
|
annotation_clip=True,
|
||||||
|
fontsize=11, color=color
|
||||||
|
)
|
||||||
|
|
||||||
|
annotation.set_position((station[i] + 0., elevation[i] + 0.))
|
||||||
|
self.annotation.append(annotation)
|
||||||
|
|
||||||
|
if txt.strip() in self.cgl:
|
||||||
|
x_gl_complete.append(station[i])
|
||||||
|
y_gl_complete.append(elevation[i])
|
||||||
|
else:
|
||||||
|
x_gl_incomplete.append(station[i])
|
||||||
|
y_gl_incomplete.append(elevation[i])
|
||||||
|
|
||||||
def set_reach(self, reach_id):
|
def set_reach(self, reach_id):
|
||||||
self._current_reach_id = reach_id
|
self._current_reach_id = reach_id
|
||||||
self._current_profile_id = 0
|
self._current_profile_id = 0
|
||||||
@@ -172,9 +230,17 @@ class PlotAC(PamhyrPlot):
|
|||||||
self.update_river_bottom(reach, profile, x, z)
|
self.update_river_bottom(reach, profile, x, z)
|
||||||
self.update_water(reach, profile, x, z)
|
self.update_water(reach, profile, x, z)
|
||||||
self.update_water_max(reach, profile, x, z)
|
self.update_water_max(reach, profile, x, z)
|
||||||
|
self.update_gl()
|
||||||
|
|
||||||
self.update_idle()
|
self.update_idle()
|
||||||
|
|
||||||
|
def update_gl(self):
|
||||||
|
for a in self.annotation:
|
||||||
|
a.remove()
|
||||||
|
|
||||||
|
self.annotation[:] = []
|
||||||
|
self.draw_gl()
|
||||||
|
|
||||||
def update_river_bottom(self, reach, profile, x, z):
|
def update_river_bottom(self, reach, profile, x, z):
|
||||||
self.line_rk.set_data(x, z)
|
self.line_rk.set_data(x, z)
|
||||||
|
|
||||||
|
|||||||
+23
-21
@@ -35,7 +35,7 @@ logger = logging.getLogger()
|
|||||||
|
|
||||||
class PlotH(PamhyrPlot):
|
class PlotH(PamhyrPlot):
|
||||||
def __init__(self, canvas=None, trad=None, toolbar=None,
|
def __init__(self, canvas=None, trad=None, toolbar=None,
|
||||||
results=None, reach_id=0, profile_id=0, res_id=[0],
|
results=None, reach_id=0, profile_id=[0], res_id=[0],
|
||||||
parent=None):
|
parent=None):
|
||||||
super(PlotH, self).__init__(
|
super(PlotH, self).__init__(
|
||||||
canvas=canvas,
|
canvas=canvas,
|
||||||
@@ -127,27 +127,29 @@ class PlotH(PamhyrPlot):
|
|||||||
|
|
||||||
results = self.results[res_id]
|
results = self.results[res_id]
|
||||||
reach = results.river.reach(self._current_reach_id)
|
reach = results.river.reach(self._current_reach_id)
|
||||||
profile = reach.profile(self._current_profile_id)
|
for i, p in enumerate(self._current_profile_id):
|
||||||
|
profile = reach.profile(p)
|
||||||
|
|
||||||
x = self._timestamps
|
x = self._timestamps
|
||||||
y = profile.get_key("Q")
|
y = profile.get_key("Q")
|
||||||
|
|
||||||
if res_id == 2:
|
if res_id == 2:
|
||||||
label = "Δ " + self.label_discharge
|
label = "Δ " + self.label_discharge + f" {profile.name}"
|
||||||
else:
|
else:
|
||||||
label = self.label_discharge
|
label = self.label_discharge + f" {profile.name}"
|
||||||
|
|
||||||
if len(self._current_res_id) > 1:
|
if len(self._current_res_id) > 1:
|
||||||
if res_id != 2:
|
if res_id != 2:
|
||||||
label += f" ({results._solver.name})"
|
label += f" ({results._solver.name})"
|
||||||
|
|
||||||
line, = self.canvas.axes.plot(
|
line, = self.canvas.axes.plot(
|
||||||
x, y,
|
x, y,
|
||||||
label=label,
|
label=label,
|
||||||
color=self.colors[res_id + 1],
|
color=self.colors[res_id + 1],
|
||||||
**self.plot_default_kargs
|
linestyle=self.linestyle[i % len(self.linestyle)],
|
||||||
)
|
**self.plot_default_kargs
|
||||||
self._line.append(line)
|
)
|
||||||
|
self._line.append(line)
|
||||||
|
|
||||||
def draw_current(self):
|
def draw_current(self):
|
||||||
self._current, = self.canvas.axes.plot(
|
self._current, = self.canvas.axes.plot(
|
||||||
@@ -162,7 +164,6 @@ class PlotH(PamhyrPlot):
|
|||||||
def draw_max(self, res_id):
|
def draw_max(self, res_id):
|
||||||
results = self.results[res_id]
|
results = self.results[res_id]
|
||||||
reach = results.river.reach(self._current_reach_id)
|
reach = results.river.reach(self._current_reach_id)
|
||||||
profile = reach.profile(self._current_profile_id)
|
|
||||||
|
|
||||||
if reach.geometry.number_profiles == 0:
|
if reach.geometry.number_profiles == 0:
|
||||||
self._init = False
|
self._init = False
|
||||||
@@ -194,12 +195,13 @@ class PlotH(PamhyrPlot):
|
|||||||
|
|
||||||
def set_reach(self, reach_id):
|
def set_reach(self, reach_id):
|
||||||
self._current_reach_id = reach_id
|
self._current_reach_id = reach_id
|
||||||
self._current_profile_id = 0
|
self._current_profile_id = [0]
|
||||||
self.draw()
|
self.draw()
|
||||||
|
|
||||||
def set_profile(self, profile_id):
|
def set_profile(self, profile_id):
|
||||||
self._current_profile_id = profile_id
|
self._current_profile_id = profile_id
|
||||||
self.update()
|
# self.update()
|
||||||
|
self.draw()
|
||||||
|
|
||||||
def set_result(self, res_id):
|
def set_result(self, res_id):
|
||||||
self._current_res_id = res_id
|
self._current_res_id = res_id
|
||||||
|
|||||||
+84
-11
@@ -19,6 +19,7 @@
|
|||||||
import os
|
import os
|
||||||
import csv
|
import csv
|
||||||
import logging
|
import logging
|
||||||
|
import rasterio
|
||||||
|
|
||||||
from numpy import sqrt
|
from numpy import sqrt
|
||||||
|
|
||||||
@@ -35,6 +36,7 @@ from PyQt5.QtCore import (
|
|||||||
Qt, QVariant, QAbstractTableModel,
|
Qt, QVariant, QAbstractTableModel,
|
||||||
QCoreApplication, QModelIndex, pyqtSlot,
|
QCoreApplication, QModelIndex, pyqtSlot,
|
||||||
QItemSelectionModel, QTimer,
|
QItemSelectionModel, QTimer,
|
||||||
|
QSettings
|
||||||
)
|
)
|
||||||
|
|
||||||
from PyQt5.QtWidgets import (
|
from PyQt5.QtWidgets import (
|
||||||
@@ -66,7 +68,7 @@ from View.Results.translate import (
|
|||||||
ResultsTranslate,
|
ResultsTranslate,
|
||||||
CompareResultsTranslate
|
CompareResultsTranslate
|
||||||
)
|
)
|
||||||
from View.Stricklers.Window import StricklersWindow
|
from View.Results.CoordinatesDialog import CoordinatesDialog
|
||||||
|
|
||||||
_translate = QCoreApplication.translate
|
_translate = QCoreApplication.translate
|
||||||
|
|
||||||
@@ -126,7 +128,7 @@ class ResultsWindow(PamhyrWindow):
|
|||||||
return
|
return
|
||||||
|
|
||||||
self.update(reach_id=0,
|
self.update(reach_id=0,
|
||||||
profile_id=0)
|
profile_id=[0])
|
||||||
|
|
||||||
self.update_table_selection_solver(0)
|
self.update_table_selection_solver(0)
|
||||||
|
|
||||||
@@ -269,7 +271,7 @@ class ResultsWindow(PamhyrWindow):
|
|||||||
canvas=self.canvas_4,
|
canvas=self.canvas_4,
|
||||||
results=self._results,
|
results=self._results,
|
||||||
reach_id=0,
|
reach_id=0,
|
||||||
profile_id=0,
|
profile_id=[0],
|
||||||
res_id=self._current_results,
|
res_id=self._current_results,
|
||||||
trad=self._trad,
|
trad=self._trad,
|
||||||
toolbar=self.toolbar_4,
|
toolbar=self.toolbar_4,
|
||||||
@@ -334,6 +336,7 @@ class ResultsWindow(PamhyrWindow):
|
|||||||
"action_add": self._add_custom_plot,
|
"action_add": self._add_custom_plot,
|
||||||
"action_export": self._export,
|
"action_export": self._export,
|
||||||
# "action_export": self.export_current,
|
# "action_export": self.export_current,
|
||||||
|
"action_Geo_tiff": self.import_geotiff
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(self._results) > 1:
|
if len(self._results) > 1:
|
||||||
@@ -370,6 +373,10 @@ class ResultsWindow(PamhyrWindow):
|
|||||||
self._button_last.clicked.connect(self._last)
|
self._button_last.clicked.connect(self._last)
|
||||||
self._timer.timeout.connect(self._update_slider)
|
self._timer.timeout.connect(self._update_slider)
|
||||||
|
|
||||||
|
# tabs
|
||||||
|
tab_widget = self.find(QTabWidget, f"tabWidget")
|
||||||
|
tab_widget.currentChanged.connect(self.tab_changed)
|
||||||
|
|
||||||
def update_table_selection_reach(self, ind):
|
def update_table_selection_reach(self, ind):
|
||||||
table = self.find(QTableView, f"tableView_reach")
|
table = self.find(QTableView, f"tableView_reach")
|
||||||
selectionModel = table.selectionModel()
|
selectionModel = table.selectionModel()
|
||||||
@@ -432,15 +439,17 @@ class ResultsWindow(PamhyrWindow):
|
|||||||
self.update_table_selection_profile(0)
|
self.update_table_selection_profile(0)
|
||||||
|
|
||||||
if profile_id is not None:
|
if profile_id is not None:
|
||||||
self.plot_xy.set_profile(profile_id)
|
self.plot_xy.set_profile(profile_id[0])
|
||||||
self.plot_ac.set_profile(profile_id)
|
self.plot_ac.set_profile(profile_id[0])
|
||||||
self.plot_rkc.set_profile(profile_id)
|
self.plot_rkc.set_profile(profile_id[0])
|
||||||
self.plot_h.set_profile(profile_id)
|
self.plot_h.set_profile(profile_id)
|
||||||
|
|
||||||
for plot in self._additional_plot:
|
for plot in self._additional_plot:
|
||||||
self._additional_plot[plot].set_profile(profile_id)
|
self._additional_plot[plot].set_profile(profile_id[0])
|
||||||
|
|
||||||
self.update_table_selection_profile(profile_id)
|
tab_widget = self.find(QTabWidget, f"tabWidget")
|
||||||
|
if tab_widget.currentIndex() != 2:
|
||||||
|
self.update_table_selection_profile(profile_id[0])
|
||||||
|
|
||||||
if solver_id is not None:
|
if solver_id is not None:
|
||||||
self._current_results = solver_id
|
self._current_results = solver_id
|
||||||
@@ -481,6 +490,14 @@ class ResultsWindow(PamhyrWindow):
|
|||||||
|
|
||||||
return indexes[0].row()
|
return indexes[0].row()
|
||||||
|
|
||||||
|
def _get_current_profiles_list(self):
|
||||||
|
table = self.find(QTableView, f"tableView_profile")
|
||||||
|
indexes = table.selectedIndexes()
|
||||||
|
if len(indexes) == 0:
|
||||||
|
return 0
|
||||||
|
|
||||||
|
return [i.row() for i in indexes]
|
||||||
|
|
||||||
def _get_current_timestamp(self):
|
def _get_current_timestamp(self):
|
||||||
return self._timestamps[
|
return self._timestamps[
|
||||||
self._slider_time.value()
|
self._slider_time.value()
|
||||||
@@ -496,12 +513,11 @@ class ResultsWindow(PamhyrWindow):
|
|||||||
|
|
||||||
def _set_current_profile(self):
|
def _set_current_profile(self):
|
||||||
table = self.find(QTableView, f"tableView_profile")
|
table = self.find(QTableView, f"tableView_profile")
|
||||||
indexes = table.selectedIndexes()
|
indexes = table.selectionModel().selectedRows()
|
||||||
if len(indexes) == 0:
|
if len(indexes) == 0:
|
||||||
return
|
return
|
||||||
|
|
||||||
ind = indexes[0].row()
|
self.update(profile_id=[i.row() for i in indexes])
|
||||||
self.update(profile_id=ind)
|
|
||||||
|
|
||||||
def _set_current_profile_raw_data(self):
|
def _set_current_profile_raw_data(self):
|
||||||
return
|
return
|
||||||
@@ -545,6 +561,8 @@ class ResultsWindow(PamhyrWindow):
|
|||||||
self._reload_slider()
|
self._reload_slider()
|
||||||
|
|
||||||
def _add_custom_plot(self):
|
def _add_custom_plot(self):
|
||||||
|
profile_id = self._get_current_profile()
|
||||||
|
self.update_table_selection_profile(profile_id)
|
||||||
dlg = CustomPlotValuesSelectionDialog(parent=self)
|
dlg = CustomPlotValuesSelectionDialog(parent=self)
|
||||||
if dlg.exec():
|
if dlg.exec():
|
||||||
x, y, envelop = dlg.value
|
x, y, envelop = dlg.value
|
||||||
@@ -665,6 +683,8 @@ class ResultsWindow(PamhyrWindow):
|
|||||||
self._button_play.setIcon(self._icon_start)
|
self._button_play.setIcon(self._icon_start)
|
||||||
|
|
||||||
def _export(self):
|
def _export(self):
|
||||||
|
profile_id = self._get_current_profile()
|
||||||
|
self.update_table_selection_profile(profile_id)
|
||||||
|
|
||||||
dlg = CustomExportDialog(parent=self)
|
dlg = CustomExportDialog(parent=self)
|
||||||
if dlg.exec():
|
if dlg.exec():
|
||||||
@@ -1137,3 +1157,56 @@ class ResultsWindow(PamhyrWindow):
|
|||||||
|
|
||||||
def get_timestamps(self):
|
def get_timestamps(self):
|
||||||
self._timestamps = sorted(list(self._results[0].get("timestamps")))
|
self._timestamps = sorted(list(self._results[0].get("timestamps")))
|
||||||
|
|
||||||
|
def tab_changed(self, i):
|
||||||
|
if i != 2:
|
||||||
|
if len(self._get_current_profiles_list()) > 1:
|
||||||
|
# unselect all profiles but the first one
|
||||||
|
profile_id = self._get_current_profile()
|
||||||
|
self.update_table_selection_profile(profile_id)
|
||||||
|
|
||||||
|
def import_geotiff(self):
|
||||||
|
options = QFileDialog.Options()
|
||||||
|
settings = QSettings(QSettings.IniFormat,
|
||||||
|
QSettings.UserScope, 'MyOrg', )
|
||||||
|
options |= QFileDialog.DontUseNativeDialog
|
||||||
|
|
||||||
|
file_types = [
|
||||||
|
self._trad["file_geotiff"],
|
||||||
|
self._trad["file_all"],
|
||||||
|
]
|
||||||
|
|
||||||
|
filename, _ = QFileDialog.getOpenFileName(
|
||||||
|
self,
|
||||||
|
self._trad["open_file"],
|
||||||
|
"",
|
||||||
|
";; ".join(file_types),
|
||||||
|
options=options
|
||||||
|
)
|
||||||
|
|
||||||
|
if filename != "":
|
||||||
|
with rasterio.open(filename) as data:
|
||||||
|
img = data.read()
|
||||||
|
b = data.bounds[:]
|
||||||
|
# b[0] left
|
||||||
|
# b[1] bottom
|
||||||
|
# b[2] right
|
||||||
|
# b[3] top
|
||||||
|
xlim = self.canvas.axes.get_xlim()
|
||||||
|
ylim = self.canvas.axes.get_ylim()
|
||||||
|
if b[2] > b[0] and b[1] < b[3]:
|
||||||
|
self.canvas.axes.imshow(img.transpose((1, 2, 0)),
|
||||||
|
extent=[b[0], b[2], b[1], b[3]])
|
||||||
|
else:
|
||||||
|
dlg = CoordinatesDialog(
|
||||||
|
xlim,
|
||||||
|
ylim,
|
||||||
|
trad=self._trad,
|
||||||
|
parent=self
|
||||||
|
)
|
||||||
|
if dlg.exec():
|
||||||
|
self.canvas.axes.imshow(img.transpose((1, 2, 0)),
|
||||||
|
extent=dlg.values)
|
||||||
|
self.plot_xy.idle()
|
||||||
|
self.canvas.axes.set_xlim(xlim)
|
||||||
|
self.canvas.axes.set_ylim(ylim)
|
||||||
@@ -53,6 +53,12 @@ class ResultsTranslate(MainTranslate):
|
|||||||
"Results",
|
"Results",
|
||||||
"Max water elevation"
|
"Max water elevation"
|
||||||
)
|
)
|
||||||
|
self._dict["file_all"] = _translate("Results", "All files (*)")
|
||||||
|
self._dict["file_geotiff"] = _translate(
|
||||||
|
"Results", "GeoTIFF file (*.tiff *.tif)")
|
||||||
|
self._dict["ImageCoordinates"] = _translate(
|
||||||
|
"Results", "Image coordinates"
|
||||||
|
)
|
||||||
|
|
||||||
self._sub_dict["table_headers_reach"] = {
|
self._sub_dict["table_headers_reach"] = {
|
||||||
"name": _translate("Results", "Reach name"),
|
"name": _translate("Results", "Reach name"),
|
||||||
|
|||||||
@@ -0,0 +1,68 @@
|
|||||||
|
# Window.py -- Pamhyr
|
||||||
|
# Copyright (C) 2023-2025 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
|
||||||
|
|
||||||
|
|
||||||
|
class SelectReachWindow(PamhyrDialog):
|
||||||
|
_pamhyr_ui = "SelectReach"
|
||||||
|
_pamhyr_name = "Select reach"
|
||||||
|
|
||||||
|
def __init__(self, study=None, config=None, trad=None, parent=None):
|
||||||
|
|
||||||
|
super(SelectReachWindow, self).__init__(
|
||||||
|
title=trad[self._pamhyr_name],
|
||||||
|
study=study,
|
||||||
|
config=config,
|
||||||
|
options=[],
|
||||||
|
parent=parent
|
||||||
|
)
|
||||||
|
|
||||||
|
self.setup_combobox()
|
||||||
|
self.select_current_reach()
|
||||||
|
|
||||||
|
def setup_combobox(self):
|
||||||
|
reaches = list(self._study.river.enable_edges())
|
||||||
|
reaches_name = [r.name for r in reaches]
|
||||||
|
|
||||||
|
self.combobox_add_items("comboBox", reaches_name)
|
||||||
|
|
||||||
|
def select_current_reach(self):
|
||||||
|
if self._study.river.has_current_reach():
|
||||||
|
reach = self._study.river.current_reach()
|
||||||
|
self.set_combobox_text(
|
||||||
|
"comboBox",
|
||||||
|
reach.name
|
||||||
|
)
|
||||||
|
|
||||||
|
def accept(self):
|
||||||
|
reach_name = self.get_combobox_text("comboBox")
|
||||||
|
|
||||||
|
reach = next(
|
||||||
|
filter(
|
||||||
|
lambda s: s.name == reach_name,
|
||||||
|
self._study.river.enable_edges()
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
self.reach = reach
|
||||||
|
|
||||||
|
super().accept()
|
||||||
|
|
||||||
|
def reject(self):
|
||||||
|
self.close()
|
||||||
@@ -39,6 +39,7 @@ class CommonWordTranslate(PamhyrTranslate):
|
|||||||
|
|
||||||
self._dict["reach"] = _translate("CommonWord", "Reach")
|
self._dict["reach"] = _translate("CommonWord", "Reach")
|
||||||
self._dict["reaches"] = _translate("CommonWord", "Reaches")
|
self._dict["reaches"] = _translate("CommonWord", "Reaches")
|
||||||
|
self._dict["Select reach"] = _translate("CommonWord", "Select reach")
|
||||||
self._dict["cross_section"] = _translate("CommonWord", "Cross-section")
|
self._dict["cross_section"] = _translate("CommonWord", "Cross-section")
|
||||||
self._dict["main_channel"] = _translate("CommonWord", "Main channel")
|
self._dict["main_channel"] = _translate("CommonWord", "Main channel")
|
||||||
self._dict["floodway"] = _translate("CommonWord", "Floodway")
|
self._dict["floodway"] = _translate("CommonWord", "Floodway")
|
||||||
|
|||||||
@@ -113,7 +113,7 @@
|
|||||||
<action name="action_sort">
|
<action name="action_sort">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset>
|
<iconset>
|
||||||
<normaloff>ressources/sort_A-Z.png</normaloff>ressources/sort_A-Z.png</iconset>
|
<normaloff>ressources/sort_1-9.png</normaloff>ressources/sort_1-9.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Sort</string>
|
<string>Sort</string>
|
||||||
|
|||||||
@@ -72,6 +72,7 @@
|
|||||||
</attribute>
|
</attribute>
|
||||||
<addaction name="action_add"/>
|
<addaction name="action_add"/>
|
||||||
<addaction name="action_del"/>
|
<addaction name="action_del"/>
|
||||||
|
<addaction name="action_sort"/>
|
||||||
</widget>
|
</widget>
|
||||||
<action name="action_add">
|
<action name="action_add">
|
||||||
<property name="checkable">
|
<property name="checkable">
|
||||||
@@ -106,6 +107,18 @@
|
|||||||
<string>Ctrl+D</string>
|
<string>Ctrl+D</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="action_sort">
|
||||||
|
<property name="icon">
|
||||||
|
<iconset>
|
||||||
|
<normaloff>ressources/sort_1-9.png</normaloff>ressources/sort_1-9.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Sort</string>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Sort points</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
|
|||||||
@@ -93,6 +93,7 @@
|
|||||||
<addaction name="action_update_rk"/>
|
<addaction name="action_update_rk"/>
|
||||||
<addaction name="action_purge"/>
|
<addaction name="action_purge"/>
|
||||||
<addaction name="action_shift"/>
|
<addaction name="action_shift"/>
|
||||||
|
<addaction name="action_select_reach"/>
|
||||||
</widget>
|
</widget>
|
||||||
<action name="action_import">
|
<action name="action_import">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
@@ -235,6 +236,14 @@
|
|||||||
<string>Shift selected sections coordinates</string>
|
<string>Shift selected sections coordinates</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="action_select_reach">
|
||||||
|
<property name="text">
|
||||||
|
<string>Select reach</string>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Change current reach</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
|
|||||||
@@ -0,0 +1,188 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>Dialog</class>
|
||||||
|
<widget class="QDialog" name="Dialog">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>451</width>
|
||||||
|
<height>206</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Dialog</string>
|
||||||
|
</property>
|
||||||
|
<property name="layoutDirection">
|
||||||
|
<enum>Qt::LeftToRight</enum>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QDoubleSpinBox" name="doubleSpinBox_bottom">
|
||||||
|
<property name="decimals">
|
||||||
|
<number>4</number>
|
||||||
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<double>-99999999.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<double>99999999.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<widget class="QDoubleSpinBox" name="doubleSpinBox_right">
|
||||||
|
<property name="decimals">
|
||||||
|
<number>4</number>
|
||||||
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<double>-99999999.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<double>99999999.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<double>1.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="label_bottom">
|
||||||
|
<property name="text">
|
||||||
|
<string>Bottom coordinate</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="label_left">
|
||||||
|
<property name="text">
|
||||||
|
<string>Left coordinate</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QDoubleSpinBox" name="doubleSpinBox_left">
|
||||||
|
<property name="decimals">
|
||||||
|
<number>4</number>
|
||||||
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<double>-99999999.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<double>99999999.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QDoubleSpinBox" name="doubleSpinBox_top">
|
||||||
|
<property name="decimals">
|
||||||
|
<number>4</number>
|
||||||
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<double>-99999999.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<double>99999999.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<double>1.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="label_top">
|
||||||
|
<property name="text">
|
||||||
|
<string>Top coordinate</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QLabel" name="label_right">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Right coordinate</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="2">
|
||||||
|
<widget class="QPushButton" name="pushButton_bottom">
|
||||||
|
<property name="text">
|
||||||
|
<string>Reset</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="2">
|
||||||
|
<widget class="QPushButton" name="pushButton_top">
|
||||||
|
<property name="text">
|
||||||
|
<string>Reset</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="2">
|
||||||
|
<widget class="QPushButton" name="pushButton_left">
|
||||||
|
<property name="text">
|
||||||
|
<string>Reset</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="2">
|
||||||
|
<widget class="QPushButton" name="pushButton_right">
|
||||||
|
<property name="text">
|
||||||
|
<string>Reset</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="standardButtons">
|
||||||
|
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections>
|
||||||
|
<connection>
|
||||||
|
<sender>buttonBox</sender>
|
||||||
|
<signal>accepted()</signal>
|
||||||
|
<receiver>Dialog</receiver>
|
||||||
|
<slot>accept()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>248</x>
|
||||||
|
<y>254</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>157</x>
|
||||||
|
<y>274</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>buttonBox</sender>
|
||||||
|
<signal>rejected()</signal>
|
||||||
|
<receiver>Dialog</receiver>
|
||||||
|
<slot>reject()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>316</x>
|
||||||
|
<y>260</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>286</x>
|
||||||
|
<y>274</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
</connections>
|
||||||
|
</ui>
|
||||||
@@ -238,6 +238,7 @@
|
|||||||
<addaction name="action_add"/>
|
<addaction name="action_add"/>
|
||||||
<addaction name="action_export"/>
|
<addaction name="action_export"/>
|
||||||
<addaction name="action_reload"/>
|
<addaction name="action_reload"/>
|
||||||
|
<addaction name="action_Geo_tiff"/>
|
||||||
</widget>
|
</widget>
|
||||||
<action name="action_add">
|
<action name="action_add">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
@@ -275,6 +276,18 @@
|
|||||||
<string>Ctrl+E</string>
|
<string>Ctrl+E</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="action_Geo_tiff">
|
||||||
|
<property name="icon">
|
||||||
|
<iconset>
|
||||||
|
<normaloff>ressources/picture.png</normaloff>ressources/picture.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Geo tiff</string>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Import background image</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
|
|||||||
@@ -0,0 +1,67 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>Dialog</class>
|
||||||
|
<widget class="QDialog" name="Dialog">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>400</width>
|
||||||
|
<height>76</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Dialog</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="standardButtons">
|
||||||
|
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QComboBox" name="comboBox"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections>
|
||||||
|
<connection>
|
||||||
|
<sender>buttonBox</sender>
|
||||||
|
<signal>accepted()</signal>
|
||||||
|
<receiver>Dialog</receiver>
|
||||||
|
<slot>accept()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>248</x>
|
||||||
|
<y>254</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>157</x>
|
||||||
|
<y>274</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>buttonBox</sender>
|
||||||
|
<signal>rejected()</signal>
|
||||||
|
<receiver>Dialog</receiver>
|
||||||
|
<slot>reject()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>316</x>
|
||||||
|
<y>260</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>286</x>
|
||||||
|
<y>274</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
</connections>
|
||||||
|
</ui>
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
+128
-64
@@ -1,5 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!DOCTYPE TS><TS version="2.0" language="fr_FR" sourcelanguage="en_150">
|
<!DOCTYPE TS>
|
||||||
|
<TS version="2.1" language="fr_FR" sourcelanguage="en_150">
|
||||||
<context>
|
<context>
|
||||||
<name>About</name>
|
<name>About</name>
|
||||||
<message>
|
<message>
|
||||||
@@ -944,6 +945,36 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||||||
<source>OK</source>
|
<source>OK</source>
|
||||||
<translation>Ok</translation>
|
<translation>Ok</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../View/ui/GeotiffCoordinates.ui" line="54"/>
|
||||||
|
<source>Bottom coordinate</source>
|
||||||
|
<translation>Coordonnée bas</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../View/ui/GeotiffCoordinates.ui" line="61"/>
|
||||||
|
<source>Left coordinate</source>
|
||||||
|
<translation>Coordonnée gauche</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../View/ui/GeotiffCoordinates.ui" line="97"/>
|
||||||
|
<source>Top coordinate</source>
|
||||||
|
<translation>Coordonnée haut</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../View/ui/GeotiffCoordinates.ui" line="107"/>
|
||||||
|
<source>Right coordinate</source>
|
||||||
|
<translation>Coordonnée droite</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../View/ui/GeotiffCoordinates.ui" line="135"/>
|
||||||
|
<source>Reset</source>
|
||||||
|
<translation>Rétablir</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../View/ui/GeotiffCoordinates.ui" line="154"/>
|
||||||
|
<source>Image coordinates</source>
|
||||||
|
<translation type="obsolete">Coordonnées de l'image</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>Documentation</name>
|
<name>Documentation</name>
|
||||||
@@ -1235,14 +1266,9 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||||||
<translation>Version : @version @codename</translation>
|
<translation>Version : @version @codename</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/about.ui" line="94"/>
|
|
||||||
<source>Copyright © 2022-2025 INRAE</source>
|
|
||||||
<translation type="obsolete">Copyright © 2022-2025 INRAE</translation>
|
|
||||||
</message>
|
|
||||||
<message encoding="UTF-8">
|
|
||||||
<location filename="../View/ui/about.ui" line="94"/>
|
<location filename="../View/ui/about.ui" line="94"/>
|
||||||
<source>Copyright © 2022-2025 INRAE</source>
|
<source>Copyright © 2022-2025 INRAE</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="obsolete">Copyright © 2022-2025 INRAE</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
@@ -1278,6 +1304,14 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||||||
<translation>Coefficient</translation>
|
<translation>Coefficient</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>GeoTIFF</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../View/Results/translate.py" line="56"/>
|
||||||
|
<source>All files (*)</source>
|
||||||
|
<translation type="obsolete">Tous les fichiers (*)</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>Geometry</name>
|
<name>Geometry</name>
|
||||||
<message>
|
<message>
|
||||||
@@ -1539,17 +1573,17 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||||||
<context>
|
<context>
|
||||||
<name>MainWindow</name>
|
<name>MainWindow</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="160"/>
|
<location filename="../View/Translate.py" line="161"/>
|
||||||
<source>Open debug window</source>
|
<source>Open debug window</source>
|
||||||
<translation>Ouvrir la fenêtre de débogage</translation>
|
<translation>Ouvrir la fenêtre de débogage</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="163"/>
|
<location filename="../View/Translate.py" line="164"/>
|
||||||
<source>Open SQLite debuging tool ('sqlitebrowser')</source>
|
<source>Open SQLite debuging tool ('sqlitebrowser')</source>
|
||||||
<translation>Ouvrir l'outil de débogage SQLite ('sqlitebrowser')</translation>
|
<translation>Ouvrir l'outil de débogage SQLite ('sqlitebrowser')</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="166"/>
|
<location filename="../View/Translate.py" line="167"/>
|
||||||
<source>Enable this window</source>
|
<source>Enable this window</source>
|
||||||
<translation>Activer cette fenêtre</translation>
|
<translation>Activer cette fenêtre</translation>
|
||||||
</message>
|
</message>
|
||||||
@@ -1614,7 +1648,7 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||||||
<translation>Éditer la couche sédimentaire</translation>
|
<translation>Éditer la couche sédimentaire</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/Results.ui" line="275"/>
|
<location filename="../View/ui/Results.ui" line="276"/>
|
||||||
<source>Ctrl+E</source>
|
<source>Ctrl+E</source>
|
||||||
<translation>Ctrl+E</translation>
|
<translation>Ctrl+E</translation>
|
||||||
</message>
|
</message>
|
||||||
@@ -2104,17 +2138,17 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||||||
<translation>Hydrogramme</translation>
|
<translation>Hydrogramme</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/Results.ui" line="251"/>
|
<location filename="../View/ui/Results.ui" line="252"/>
|
||||||
<source>Add customized visualization</source>
|
<source>Add customized visualization</source>
|
||||||
<translation>Ajouter une visualisation personnalisée</translation>
|
<translation>Ajouter une visualisation personnalisée</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/Results.ui" line="260"/>
|
<location filename="../View/ui/Results.ui" line="261"/>
|
||||||
<source>Reload</source>
|
<source>Reload</source>
|
||||||
<translation>Recharger</translation>
|
<translation>Recharger</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/Results.ui" line="269"/>
|
<location filename="../View/ui/Results.ui" line="270"/>
|
||||||
<source>Export</source>
|
<source>Export</source>
|
||||||
<translation>Exporter</translation>
|
<translation>Exporter</translation>
|
||||||
</message>
|
</message>
|
||||||
@@ -2394,12 +2428,12 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||||||
<translation>Maillage</translation>
|
<translation>Maillage</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="153"/>
|
<location filename="../View/Translate.py" line="154"/>
|
||||||
<source>Summary</source>
|
<source>Summary</source>
|
||||||
<translation>Résumé</translation>
|
<translation>Résumé</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="156"/>
|
<location filename="../View/Translate.py" line="157"/>
|
||||||
<source>Checks</source>
|
<source>Checks</source>
|
||||||
<translation>Vérifications</translation>
|
<translation>Vérifications</translation>
|
||||||
</message>
|
</message>
|
||||||
@@ -2549,12 +2583,12 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||||||
<translation>Purger les profiles pour garder un nombre fixer de points</translation>
|
<translation>Purger les profiles pour garder un nombre fixer de points</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/EditLateralContribution.ui" line="112"/>
|
<location filename="../View/ui/EditBoundaryConditionsAdisTS.ui" line="119"/>
|
||||||
<source>Sort points</source>
|
<source>Sort points</source>
|
||||||
<translation>Trier les points</translation>
|
<translation>Trier les points</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/Results.ui" line="272"/>
|
<location filename="../View/ui/Results.ui" line="273"/>
|
||||||
<source>Export data as CSV</source>
|
<source>Export data as CSV</source>
|
||||||
<translation>Exporter les données au format CSV</translation>
|
<translation>Exporter les données au format CSV</translation>
|
||||||
</message>
|
</message>
|
||||||
@@ -2619,47 +2653,47 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||||||
<translation>Données</translation>
|
<translation>Données</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="174"/>
|
<location filename="../View/Translate.py" line="175"/>
|
||||||
<source>Please select a reach</source>
|
<source>Please select a reach</source>
|
||||||
<translation>Veuillez sélectionner un bief</translation>
|
<translation>Veuillez sélectionner un bief</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="183"/>
|
<location filename="../View/Translate.py" line="184"/>
|
||||||
<source>Last open study</source>
|
<source>Last open study</source>
|
||||||
<translation>Dernière étude ouverte</translation>
|
<translation>Dernière étude ouverte</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="186"/>
|
<location filename="../View/Translate.py" line="187"/>
|
||||||
<source>Do you want to open again the last open study?</source>
|
<source>Do you want to open again the last open study?</source>
|
||||||
<translation>Voulez-vous rouvrir la dernière étude ?</translation>
|
<translation>Voulez-vous rouvrir la dernière étude ?</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="177"/>
|
<location filename="../View/Translate.py" line="178"/>
|
||||||
<source>This edition window need a reach selected into the river network to work on it</source>
|
<source>This edition window need a reach selected into the river network to work on it</source>
|
||||||
<translation>Cette fenêtre d'édition a besoin d'un bief sélectionné dans le réseau pour travailler dessus</translation>
|
<translation>Cette fenêtre d'édition a besoin d'un bief sélectionné dans le réseau pour travailler dessus</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="191"/>
|
<location filename="../View/Translate.py" line="192"/>
|
||||||
<source>Close without saving study</source>
|
<source>Close without saving study</source>
|
||||||
<translation>Fermer sans sauvegarder l'étude</translation>
|
<translation>Fermer sans sauvegarder l'étude</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="194"/>
|
<location filename="../View/Translate.py" line="195"/>
|
||||||
<source>Do you want to save current study before closing it?</source>
|
<source>Do you want to save current study before closing it?</source>
|
||||||
<translation>Souhaitez-vous sauvegarder l'étude en cours avant de la fermer ?</translation>
|
<translation>Souhaitez-vous sauvegarder l'étude en cours avant de la fermer ?</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="171"/>
|
<location filename="../View/Translate.py" line="172"/>
|
||||||
<source>Warning</source>
|
<source>Warning</source>
|
||||||
<translation>Avertissement</translation>
|
<translation>Avertissement</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="198"/>
|
<location filename="../View/Translate.py" line="199"/>
|
||||||
<source>X (m)</source>
|
<source>X (m)</source>
|
||||||
<translation>X (m)</translation>
|
<translation>X (m)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="199"/>
|
<location filename="../View/Translate.py" line="200"/>
|
||||||
<source>Y (m)</source>
|
<source>Y (m)</source>
|
||||||
<translation>Y (m)</translation>
|
<translation>Y (m)</translation>
|
||||||
</message>
|
</message>
|
||||||
@@ -2729,7 +2763,7 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||||||
<translation>Activer / Désactiver la sortie AdisTS</translation>
|
<translation>Activer / Désactiver la sortie AdisTS</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/EditBoundaryConditionsAdisTS.ui" line="88"/>
|
<location filename="../View/ui/EditBoundaryConditionsAdisTS.ui" line="89"/>
|
||||||
<source>Add a new point in boundary condition or punctual contribution</source>
|
<source>Add a new point in boundary condition or punctual contribution</source>
|
||||||
<translation>Ajouter un nouveau point dans la condition limite</translation>
|
<translation>Ajouter un nouveau point dans la condition limite</translation>
|
||||||
</message>
|
</message>
|
||||||
@@ -2834,12 +2868,12 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||||||
<translation>Export données brutes</translation>
|
<translation>Export données brutes</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="200"/>
|
<location filename="../View/Translate.py" line="201"/>
|
||||||
<source>Yes</source>
|
<source>Yes</source>
|
||||||
<translation>Oui</translation>
|
<translation>Oui</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="201"/>
|
<location filename="../View/Translate.py" line="202"/>
|
||||||
<source>No</source>
|
<source>No</source>
|
||||||
<translation>Non</translation>
|
<translation>Non</translation>
|
||||||
</message>
|
</message>
|
||||||
@@ -2848,6 +2882,16 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||||||
<source>Compare results</source>
|
<source>Compare results</source>
|
||||||
<translation>Comparaison de résultats</translation>
|
<translation>Comparaison de résultats</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../View/ui/Results.ui" line="285"/>
|
||||||
|
<source>Geo tiff</source>
|
||||||
|
<translation>Geo tiff</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../View/ui/Results.ui" line="288"/>
|
||||||
|
<source>Import background image</source>
|
||||||
|
<translation>Importer une image de fond</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>MainWindow_reach</name>
|
<name>MainWindow_reach</name>
|
||||||
@@ -3033,7 +3077,7 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||||||
<translation>jour</translation>
|
<translation>jour</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Results/translate.py" line="47"/>
|
<location filename="../View/Results/translate.py" line="48"/>
|
||||||
<source>X (m)</source>
|
<source>X (m)</source>
|
||||||
<translation>X (m)</translation>
|
<translation>X (m)</translation>
|
||||||
</message>
|
</message>
|
||||||
@@ -3068,27 +3112,27 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||||||
<translation>Lecture des résultats</translation>
|
<translation>Lecture des résultats</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Results/translate.py" line="147"/>
|
<location filename="../View/Results/translate.py" line="154"/>
|
||||||
<source>Water elevation</source>
|
<source>Water elevation</source>
|
||||||
<translation>Cote de l'eau</translation>
|
<translation>Cote de l'eau</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Results/translate.py" line="51"/>
|
<location filename="../View/Results/translate.py" line="52"/>
|
||||||
<source>Max water elevation</source>
|
<source>Max water elevation</source>
|
||||||
<translation>Cote maximum de l'eau</translation>
|
<translation>Cote maximum de l'eau</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Results/translate.py" line="57"/>
|
<location filename="../View/Results/translate.py" line="64"/>
|
||||||
<source>Reach name</source>
|
<source>Reach name</source>
|
||||||
<translation>Nom du bief</translation>
|
<translation>Nom du bief</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Results/translate.py" line="153"/>
|
<location filename="../View/Results/translate.py" line="160"/>
|
||||||
<source>Profile</source>
|
<source>Profile</source>
|
||||||
<translation>Profil</translation>
|
<translation>Profil</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Results/translate.py" line="49"/>
|
<location filename="../View/Results/translate.py" line="50"/>
|
||||||
<source>Bottom</source>
|
<source>Bottom</source>
|
||||||
<translation>Fond</translation>
|
<translation>Fond</translation>
|
||||||
</message>
|
</message>
|
||||||
@@ -3138,30 +3182,50 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||||||
<translation>Masse min</translation>
|
<translation>Masse min</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Results/translate.py" line="61"/>
|
<location filename="../View/Results/translate.py" line="68"/>
|
||||||
<source>Variables names</source>
|
<source>Variables names</source>
|
||||||
<translation>Noms des variables</translation>
|
<translation>Noms des variables</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Results/translate.py" line="74"/>
|
<location filename="../View/Results/translate.py" line="81"/>
|
||||||
<source>Pollutant name</source>
|
<source>Pollutant name</source>
|
||||||
<translation>Nom des polluants</translation>
|
<translation>Nom des polluants</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Results/translate.py" line="45"/>
|
<location filename="../View/Results/translate.py" line="45"/>
|
||||||
<source>envelop</source>
|
<source>envelop</source>
|
||||||
<translation>enveloppe</translation>
|
<translation type="obsolete">enveloppe</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Results/translate.py" line="65"/>
|
<location filename="../View/Results/translate.py" line="72"/>
|
||||||
<source>Profile name</source>
|
<source>Profile name</source>
|
||||||
<translation>Nom du profil</translation>
|
<translation>Nom du profil</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Results/translate.py" line="70"/>
|
<location filename="../View/Results/translate.py" line="46"/>
|
||||||
<source>Solver</source>
|
<source>Solver</source>
|
||||||
<translation>Solveur</translation>
|
<translation>Solveur</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../View/Results/translate.py" line="45"/>
|
||||||
|
<source>Envelop</source>
|
||||||
|
<translation>Enveloppe</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../View/Results/translate.py" line="57"/>
|
||||||
|
<source>GeoTIFF file (*.tiff *.tif)</source>
|
||||||
|
<translation>Fichiers GeoTIFF (*.tiff *.tif)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../View/Results/translate.py" line="59"/>
|
||||||
|
<source>Image coordinates</source>
|
||||||
|
<translation>Coordonnées de l'image</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../View/Results/translate.py" line="56"/>
|
||||||
|
<source>All files (*)</source>
|
||||||
|
<translation>Tous les fichiers (*)</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>SedimentLayers</name>
|
<name>SedimentLayers</name>
|
||||||
@@ -3579,27 +3643,27 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||||||
<translation>Cote (m)</translation>
|
<translation>Cote (m)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="116"/>
|
<location filename="../View/Translate.py" line="117"/>
|
||||||
<source>Area (hectare)</source>
|
<source>Area (hectare)</source>
|
||||||
<translation>Aire (hectare)</translation>
|
<translation>Aire (hectare)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="118"/>
|
<location filename="../View/Translate.py" line="119"/>
|
||||||
<source>Time (sec)</source>
|
<source>Time (sec)</source>
|
||||||
<translation>Temps (s)</translation>
|
<translation>Temps (s)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="119"/>
|
<location filename="../View/Translate.py" line="120"/>
|
||||||
<source>Time (JJJ:HH:MM:SS)</source>
|
<source>Time (JJJ:HH:MM:SS)</source>
|
||||||
<translation>Temps (JJJ:HH:MM:SS)</translation>
|
<translation>Temps (JJJ:HH:MM:SS)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="121"/>
|
<location filename="../View/Translate.py" line="122"/>
|
||||||
<source>Date (sec)</source>
|
<source>Date (sec)</source>
|
||||||
<translation>Date (s)</translation>
|
<translation>Date (s)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="122"/>
|
<location filename="../View/Translate.py" line="123"/>
|
||||||
<source>Date (ISO format)</source>
|
<source>Date (ISO format)</source>
|
||||||
<translation>Date (format ISO)</translation>
|
<translation>Date (format ISO)</translation>
|
||||||
</message>
|
</message>
|
||||||
@@ -3624,17 +3688,17 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||||||
<translation>Vitesse (m/s)</translation>
|
<translation>Vitesse (m/s)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="137"/>
|
<location filename="../View/Translate.py" line="138"/>
|
||||||
<source>Wet Perimeter (m)</source>
|
<source>Wet Perimeter (m)</source>
|
||||||
<translation>Périmètre mouillé (m)</translation>
|
<translation>Périmètre mouillé (m)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="140"/>
|
<location filename="../View/Translate.py" line="141"/>
|
||||||
<source>Hydraulic Radius (m)</source>
|
<source>Hydraulic Radius (m)</source>
|
||||||
<translation>Rayon hydraulique (m)</translation>
|
<translation>Rayon hydraulique (m)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="143"/>
|
<location filename="../View/Translate.py" line="144"/>
|
||||||
<source>Froude number</source>
|
<source>Froude number</source>
|
||||||
<translation>Nombre de Froude</translation>
|
<translation>Nombre de Froude</translation>
|
||||||
</message>
|
</message>
|
||||||
@@ -3757,52 +3821,52 @@ moyen droit (m)</translation>
|
|||||||
<translation>Vitesse min (m/s)</translation>
|
<translation>Vitesse min (m/s)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="124"/>
|
<location filename="../View/Translate.py" line="125"/>
|
||||||
<source>Area</source>
|
<source>Area</source>
|
||||||
<translation>Aire</translation>
|
<translation>Aire</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="125"/>
|
<location filename="../View/Translate.py" line="126"/>
|
||||||
<source>Rho</source>
|
<source>Rho</source>
|
||||||
<translation>Rho</translation>
|
<translation>Rho</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="126"/>
|
<location filename="../View/Translate.py" line="127"/>
|
||||||
<source>Porosity</source>
|
<source>Porosity</source>
|
||||||
<translation>Porosité</translation>
|
<translation>Porosité</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="127"/>
|
<location filename="../View/Translate.py" line="128"/>
|
||||||
<source>CDC_RIV</source>
|
<source>CDC_RIV</source>
|
||||||
<translation>CDC_RIV</translation>
|
<translation>CDC_RIV</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="128"/>
|
<location filename="../View/Translate.py" line="129"/>
|
||||||
<source>CDC_CAS</source>
|
<source>CDC_CAS</source>
|
||||||
<translation>CDC_CAS</translation>
|
<translation>CDC_CAS</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="129"/>
|
<location filename="../View/Translate.py" line="130"/>
|
||||||
<source>APD</source>
|
<source>APD</source>
|
||||||
<translation>APD</translation>
|
<translation>APD</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="130"/>
|
<location filename="../View/Translate.py" line="131"/>
|
||||||
<source>AC</source>
|
<source>AC</source>
|
||||||
<translation>AC</translation>
|
<translation>AC</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="131"/>
|
<location filename="../View/Translate.py" line="132"/>
|
||||||
<source>BC</source>
|
<source>BC</source>
|
||||||
<translation>BC</translation>
|
<translation>BC</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="133"/>
|
<location filename="../View/Translate.py" line="134"/>
|
||||||
<source>Concentration (g/l)</source>
|
<source>Concentration (g/l)</source>
|
||||||
<translation>Concentration (g/l)</translation>
|
<translation>Concentration (g/l)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="144"/>
|
<location filename="../View/Translate.py" line="145"/>
|
||||||
<source>Mass (kg)</source>
|
<source>Mass (kg)</source>
|
||||||
<translation>Masse</translation>
|
<translation>Masse</translation>
|
||||||
</message>
|
</message>
|
||||||
@@ -3827,27 +3891,27 @@ moyen droit (m)</translation>
|
|||||||
<translation>Débit</translation>
|
<translation>Débit</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="110"/>
|
<location filename="../View/Translate.py" line="111"/>
|
||||||
<source>Discharge Envelop</source>
|
<source>Discharge Envelop</source>
|
||||||
<translation>Enveloppe du débit</translation>
|
<translation>Enveloppe du débit</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="112"/>
|
<location filename="../View/Translate.py" line="113"/>
|
||||||
<source>Max Discharge</source>
|
<source>Max Discharge</source>
|
||||||
<translation>Débit max</translation>
|
<translation>Débit max</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="114"/>
|
<location filename="../View/Translate.py" line="115"/>
|
||||||
<source>Min Discharge</source>
|
<source>Min Discharge</source>
|
||||||
<translation>Débit min</translation>
|
<translation>Débit min</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="145"/>
|
<location filename="../View/Translate.py" line="146"/>
|
||||||
<source>Concentration</source>
|
<source>Concentration</source>
|
||||||
<translation>Concentration</translation>
|
<translation>Concentration</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="136"/>
|
<location filename="../View/Translate.py" line="137"/>
|
||||||
<source>Wet Area</source>
|
<source>Wet Area</source>
|
||||||
<translation>Aire mouillée</translation>
|
<translation>Aire mouillée</translation>
|
||||||
</message>
|
</message>
|
||||||
|
|||||||
Reference in new issue
Block a user