mirror of https://gitlab.com/pamhyr/pamhyr2
Compare commits
11 Commits
4cddd43f5a
...
ddc612328e
| Author | SHA1 | Date |
|---|---|---|
|
|
ddc612328e | |
|
|
d05d1e6914 | |
|
|
8bcf776813 | |
|
|
589e591d3b | |
|
|
e2e8c5ec9e | |
|
|
fce034419d | |
|
|
d9aea9eb3c | |
|
|
31fe765e51 | |
|
|
b582e133a1 | |
|
|
7c4c772f43 | |
|
|
5fc4e3903a |
Binary file not shown.
|
|
@ -275,6 +275,7 @@ class Layer(SQLSubModel):
|
|||
|
||||
self._sl.modified()
|
||||
|
||||
|
||||
class SedimentLayer(SQLSubModel):
|
||||
_sub_classes = [Layer]
|
||||
|
||||
|
|
|
|||
|
|
@ -414,7 +414,6 @@ class SQLSubModel(PamhyrID):
|
|||
"""
|
||||
raise NotImplementedMethodeError(self, self._db_save)
|
||||
|
||||
|
||||
def _data_traversal(self,
|
||||
predicate=lambda obj, data: True,
|
||||
modifier=lambda obj, data: None,
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ class PamhyrModelList(SQLSubModel):
|
|||
return self.lst.index(el)
|
||||
|
||||
def get(self, index):
|
||||
if len(self._lst) == 0:
|
||||
if len(self.lst) <= index:
|
||||
return None
|
||||
|
||||
return self.lst[index]
|
||||
|
|
@ -122,7 +122,10 @@ class PamhyrModelList(SQLSubModel):
|
|||
raise NotImplementedMethodeError(self, self.new)
|
||||
|
||||
def insert(self, index, new):
|
||||
self._lst.insert(index, new)
|
||||
if new in self._lst:
|
||||
new.set_as_not_deleted()
|
||||
else:
|
||||
self._lst.insert(index, new)
|
||||
|
||||
if self._status is not None:
|
||||
self._status.modified()
|
||||
|
|
@ -165,7 +168,7 @@ class PamhyrModelList(SQLSubModel):
|
|||
lambda x: x[1],
|
||||
filter(
|
||||
lambda x: x[0] in indexes,
|
||||
enumerate(self.lst)
|
||||
enumerate(self._lst)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
|
|
|||
|
|
@ -38,6 +38,19 @@ logger = logging.getLogger()
|
|||
|
||||
|
||||
class ListModel(PamhyrListModel):
|
||||
def get_true_data_row(self, row):
|
||||
el = self._data.get(row)
|
||||
|
||||
return next(
|
||||
map(
|
||||
lambda e: e[0],
|
||||
filter(
|
||||
lambda e: e[1] == el,
|
||||
enumerate(self._data._lst)
|
||||
)
|
||||
), 0
|
||||
)
|
||||
|
||||
def data(self, index, role):
|
||||
row = index.row()
|
||||
column = index.column()
|
||||
|
|
@ -65,6 +78,8 @@ class ListModel(PamhyrListModel):
|
|||
return QVariant()
|
||||
|
||||
def add(self, row):
|
||||
row = self.get_true_data_row(row)
|
||||
|
||||
self._undo.push(
|
||||
AddCommand(
|
||||
self._data, row
|
||||
|
|
@ -75,7 +90,7 @@ class ListModel(PamhyrListModel):
|
|||
def delete(self, row):
|
||||
self._undo.push(
|
||||
DelCommand(
|
||||
self._data, row
|
||||
self._data, self._data.files[row]
|
||||
)
|
||||
)
|
||||
self.update()
|
||||
|
|
|
|||
|
|
@ -58,27 +58,24 @@ class AddCommand(QUndoCommand):
|
|||
self._new = None
|
||||
|
||||
def undo(self):
|
||||
self._files.delete([self._new])
|
||||
self._new.set_as_deleted()
|
||||
|
||||
def redo(self):
|
||||
if self._new is None:
|
||||
self._new = self._files.new(self._row)
|
||||
else:
|
||||
self._files.undelete([self._new])
|
||||
# self._files.insert(self._row, self._new)
|
||||
self._new.set_as_not_deleted()
|
||||
|
||||
|
||||
class DelCommand(QUndoCommand):
|
||||
def __init__(self, files, row):
|
||||
def __init__(self, files, line):
|
||||
QUndoCommand.__init__(self)
|
||||
|
||||
self._files = files
|
||||
self._row = row
|
||||
self._old = self._files.get(row)
|
||||
self._line = line
|
||||
|
||||
def undo(self):
|
||||
self._files.undelete([self._old])
|
||||
# self._files.insert(self._row, self._old)
|
||||
self._line.set_as_not_deleted()
|
||||
|
||||
def redo(self):
|
||||
self._files.delete_i([self._row])
|
||||
self._line.set_as_deleted()
|
||||
|
|
|
|||
|
|
@ -234,3 +234,23 @@ class TableModel(PamhyrTableModel):
|
|||
)
|
||||
self.layoutAboutToBeChanged.emit()
|
||||
self.update()
|
||||
|
||||
def read_from_file(self, file_name, bctype):
|
||||
|
||||
logger.debug(f"Import boundary conditions from {file_name}")
|
||||
data0 = []
|
||||
data1 = []
|
||||
if bctype == "ZD":
|
||||
mult = 1
|
||||
else:
|
||||
mult = 60
|
||||
with open(file_name, encoding="utf-8") as bc_file:
|
||||
for line in bc_file:
|
||||
if not (line.startswith("#") or
|
||||
line.startswith("*") or
|
||||
line.startswith("$")):
|
||||
line = line.split()
|
||||
data0.append(float(line[0]) * mult)
|
||||
data1.append(line[1])
|
||||
|
||||
self.replace_data(data0, data1)
|
||||
|
|
|
|||
|
|
@ -30,10 +30,10 @@ from PyQt5.QtGui import (
|
|||
QKeySequence,
|
||||
)
|
||||
|
||||
from PyQt5 import QtCore
|
||||
from PyQt5 import QtCore, QtWidgets
|
||||
from PyQt5.QtCore import (
|
||||
Qt, QVariant, QAbstractTableModel, QCoreApplication,
|
||||
pyqtSlot, pyqtSignal,
|
||||
pyqtSlot, pyqtSignal, QSettings,
|
||||
)
|
||||
|
||||
from PyQt5.QtWidgets import (
|
||||
|
|
@ -204,6 +204,8 @@ class EditBoundaryConditionWindow(PamhyrWindow):
|
|||
self.find(QAction, "action_add").triggered.connect(self.add)
|
||||
self.find(QAction, "action_del").triggered.connect(self.delete)
|
||||
self.find(QAction, "action_sort").triggered.connect(self.sort)
|
||||
self.find(QAction, "action_import").triggered\
|
||||
.connect(self.import_from_file)
|
||||
|
||||
self.find(QAction, "action_generate_uniform")\
|
||||
.triggered.connect(self.generate_uniform)
|
||||
|
|
@ -301,6 +303,31 @@ class EditBoundaryConditionWindow(PamhyrWindow):
|
|||
self._table.sort(False)
|
||||
self.plot.update()
|
||||
|
||||
def import_from_file(self):
|
||||
options = QFileDialog.Options()
|
||||
settings = QSettings(QSettings.IniFormat,
|
||||
QSettings.UserScope, 'MyOrg', )
|
||||
options |= QFileDialog.DontUseNativeDialog
|
||||
|
||||
if self._data.bctype == "TD":
|
||||
file_types = [self._trad["file_hyd"]]
|
||||
if self._data.bctype == "TZ":
|
||||
file_types = [self._trad["file_lim"]]
|
||||
if self._data.bctype == "ZD":
|
||||
file_types = [self._trad["file_ava"]]
|
||||
file_types.append(self._trad["file_all"])
|
||||
|
||||
file_name, _ = QtWidgets.QFileDialog.getOpenFileName(
|
||||
self,
|
||||
self._trad["open_file"],
|
||||
"",
|
||||
";; ".join(file_types),
|
||||
options=options
|
||||
)
|
||||
|
||||
if file_name != "":
|
||||
self._table.read_from_file(file_name, self._data.bctype)
|
||||
|
||||
def move_up(self):
|
||||
row = self.index_selected_row()
|
||||
self._table.move_up(row)
|
||||
|
|
|
|||
|
|
@ -35,6 +35,17 @@ class BCETranslate(BCTranslate):
|
|||
self._dict["Boundary Condition Options"] = _translate(
|
||||
"BoundaryCondition", "Boundary Condition Options")
|
||||
|
||||
self._dict["open_file"] = _translate(
|
||||
"BoundaryCondition", "Open a file")
|
||||
self._dict["file_hyd"] = _translate(
|
||||
"BoundaryCondition", "Mage hydrograph file (*.HYD)")
|
||||
self._dict["file_lim"] = _translate(
|
||||
"BoundaryCondition", "Mage limnigraph file (*.LIM)")
|
||||
self._dict["file_lim"] = _translate(
|
||||
"BoundaryCondition", "Mage rating curve file (*.AVA)")
|
||||
self._dict["file_all"] = _translate(
|
||||
"BoundaryCondition", "All files (*)")
|
||||
|
||||
self._sub_dict["table_headers"] = {
|
||||
"x": _translate("BoundaryCondition", "X"),
|
||||
"y": _translate("BoundaryCondition", "Y"),
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ from View.Frictions.UndoCommand import (
|
|||
SetNameCommand, SetBeginCommand, SetEndCommand,
|
||||
SetBeginStricklerCommand, SetEndStricklerCommand,
|
||||
AddCommand, DelCommand, SortCommand,
|
||||
MoveCommand, PasteCommand, DuplicateCommand,
|
||||
MoveCommand, PasteCommand, DuplicateCommand, ReplaceDataCommand,
|
||||
)
|
||||
|
||||
from View.Tools.PamhyrTable import PamhyrTableModel
|
||||
|
|
@ -99,7 +99,7 @@ class ComboBoxDelegate(QItemDelegate):
|
|||
self.commitData.emit(self.sender())
|
||||
|
||||
|
||||
class TableModel(PamhyrTableModel):
|
||||
class FrictionTableModel(PamhyrTableModel):
|
||||
def _setup_lst(self):
|
||||
self._lst = self._data.frictions
|
||||
self._study = self._opt_data
|
||||
|
|
@ -199,6 +199,18 @@ class TableModel(PamhyrTableModel):
|
|||
self.endRemoveRows()
|
||||
self.layoutChanged.emit()
|
||||
|
||||
def replace_data(self, new_data):
|
||||
self.layoutAboutToBeChanged.emit()
|
||||
|
||||
self._undo.push(
|
||||
ReplaceDataCommand(
|
||||
self._lst, new_data
|
||||
)
|
||||
)
|
||||
|
||||
self.layoutAboutToBeChanged.emit()
|
||||
self.layoutChanged.emit()
|
||||
|
||||
def sort(self, _reverse, parent=QModelIndex()):
|
||||
self.layoutAboutToBeChanged.emit()
|
||||
|
||||
|
|
@ -252,3 +264,33 @@ class TableModel(PamhyrTableModel):
|
|||
def redo(self):
|
||||
self._undo.redo()
|
||||
self.layoutChanged.emit()
|
||||
|
||||
def read_from_file(self, file_name):
|
||||
|
||||
reach_id = self._study.river.enable_edges().index(self._data) + 1
|
||||
|
||||
logger.debug(f"Import frictions from {file_name}")
|
||||
data = []
|
||||
with open(file_name, encoding="utf-8") as rug_file:
|
||||
for line in rug_file:
|
||||
if line.upper().startswith("K"):
|
||||
line = line.split()
|
||||
if int(line[1]) == reach_id:
|
||||
data.append(line[1:])
|
||||
|
||||
new_data = []
|
||||
for d in data:
|
||||
new = None
|
||||
minor = float(d[3])
|
||||
medium = float(d[4])
|
||||
for s in self._study.river.stricklers.stricklers:
|
||||
if s.minor == minor and s.medium == medium:
|
||||
new = s
|
||||
break
|
||||
if new is None:
|
||||
new = self._study.river.stricklers.new(len(
|
||||
self._study.river.stricklers))
|
||||
new.minor = minor
|
||||
new.medium = medium
|
||||
new_data.append([self._data, float(d[1]), float(d[2]), new, new])
|
||||
self.replace_data(new_data)
|
||||
|
|
|
|||
|
|
@ -145,6 +145,36 @@ class AddCommand(QUndoCommand):
|
|||
self._frictions.insert(self._index, self._new)
|
||||
|
||||
|
||||
class ReplaceDataCommand(QUndoCommand):
|
||||
def __init__(self, frictions, new_data):
|
||||
QUndoCommand.__init__(self)
|
||||
|
||||
self._frictions = frictions
|
||||
self._new_data = new_data
|
||||
self._old_rows = list(range(len(frictions)))
|
||||
self._new_rows = list(range(len(new_data)))
|
||||
|
||||
self._old_friction = []
|
||||
for row in self._old_rows:
|
||||
self._old_friction.append((row, self._frictions.lst[row]))
|
||||
|
||||
def undo(self):
|
||||
self._frictions.delete_i(self._new_rows)
|
||||
for row, el in self._old_friction:
|
||||
self._frictions.insert(row, el)
|
||||
|
||||
def redo(self):
|
||||
self._frictions.delete_i(self._old_rows)
|
||||
for row in self._new_rows:
|
||||
new = self._frictions.new(row)
|
||||
d = self._new_data[row]
|
||||
new.edge = d[0]
|
||||
new.begin_rk = d[1]
|
||||
new.end_rk = d[2]
|
||||
new.begin_strickler = d[3]
|
||||
new.end_strickler = d[4]
|
||||
|
||||
|
||||
class DelCommand(QUndoCommand):
|
||||
def __init__(self, frictions, rows):
|
||||
QUndoCommand.__init__(self)
|
||||
|
|
|
|||
|
|
@ -26,10 +26,11 @@ from PyQt5.QtGui import (
|
|||
QKeySequence,
|
||||
)
|
||||
|
||||
from PyQt5 import QtWidgets
|
||||
from PyQt5.QtCore import (
|
||||
Qt, QVariant, QAbstractTableModel,
|
||||
QCoreApplication, QModelIndex, pyqtSlot,
|
||||
QRect,
|
||||
QRect, QSettings,
|
||||
)
|
||||
|
||||
from PyQt5.QtWidgets import (
|
||||
|
|
@ -46,7 +47,7 @@ from View.Frictions.UndoCommand import (
|
|||
)
|
||||
|
||||
from View.Frictions.Table import (
|
||||
TableModel, ComboBoxDelegate
|
||||
FrictionTableModel, ComboBoxDelegate
|
||||
)
|
||||
|
||||
from View.Tools.Plot.PamhyrCanvas import MplCanvas
|
||||
|
|
@ -114,7 +115,7 @@ class FrictionsWindow(PamhyrWindow):
|
|||
editable_headers = []
|
||||
|
||||
table = self.find(QTableView, f"tableView")
|
||||
self._table = TableModel(
|
||||
self._table = FrictionTableModel(
|
||||
table_view=table,
|
||||
table_headers=self._trad.get_dict("table_headers"),
|
||||
editable_headers=editable_headers,
|
||||
|
|
@ -166,7 +167,8 @@ class FrictionsWindow(PamhyrWindow):
|
|||
self.find(QAction, "action_add").triggered.connect(self.add)
|
||||
self.find(QAction, "action_del").triggered.connect(self.delete)
|
||||
self.find(QAction, "action_sort").triggered.connect(self.sort)
|
||||
|
||||
self.find(QAction, "action_import").triggered\
|
||||
.connect(self.import_from_file)
|
||||
self.find(QAction, "action_edit_stricklers").triggered.connect(
|
||||
self.edit_stricklers
|
||||
)
|
||||
|
|
@ -273,3 +275,22 @@ class FrictionsWindow(PamhyrWindow):
|
|||
parent=self
|
||||
)
|
||||
strick.show()
|
||||
|
||||
def import_from_file(self):
|
||||
options = QFileDialog.Options()
|
||||
settings = QSettings(QSettings.IniFormat,
|
||||
QSettings.UserScope, 'MyOrg', )
|
||||
options |= QFileDialog.DontUseNativeDialog
|
||||
|
||||
file_types = [self._trad["file_rug"], self._trad["file_all"]]
|
||||
|
||||
file_name, _ = QtWidgets.QFileDialog.getOpenFileName(
|
||||
self,
|
||||
self._trad["open_file"],
|
||||
"",
|
||||
";; ".join(file_types),
|
||||
options=options
|
||||
)
|
||||
|
||||
if file_name != "":
|
||||
self._table.read_from_file(file_name)
|
||||
|
|
|
|||
|
|
@ -38,6 +38,10 @@ class FrictionsTranslate(MainTranslate):
|
|||
self._dict["Edit frictions"] = _translate(
|
||||
"Frictions", "Edit frictions"
|
||||
)
|
||||
self._dict["file_rug"] = _translate(
|
||||
"Frictions", "Mage initial frictions file (*.RUG *.rug)")
|
||||
self._dict["file_all"] = _translate(
|
||||
"Frictions", "All files (*)")
|
||||
|
||||
self._sub_dict["table_headers"] = {
|
||||
# "name": self._dict["name"],
|
||||
|
|
|
|||
|
|
@ -282,7 +282,7 @@ class InitialConditionTableModel(PamhyrTableModel):
|
|||
self.layoutAboutToBeChanged.emit()
|
||||
self.layoutChanged.emit()
|
||||
|
||||
def import_from_results(self, index, results):
|
||||
def import_from_results(self, results):
|
||||
if results is None:
|
||||
logger.error("No results data")
|
||||
return
|
||||
|
|
@ -319,6 +319,33 @@ class InitialConditionTableModel(PamhyrTableModel):
|
|||
self.layoutAboutToBeChanged.emit()
|
||||
self.layoutChanged.emit()
|
||||
|
||||
def read_from_ini(self, file_name):
|
||||
|
||||
reach_id = self._data.river.enable_edges().index(self._reach) + 1
|
||||
|
||||
logger.debug(f"Import initial conditions from {file_name}")
|
||||
data = []
|
||||
with open(file_name, encoding="utf-8") as ini_file:
|
||||
for line in ini_file:
|
||||
if not (line.startswith("#") or
|
||||
line.startswith("*") or
|
||||
line.startswith("$")):
|
||||
line = line.split()
|
||||
if int(line[0]) == reach_id:
|
||||
data.append([line[4], line[2], line[3]])
|
||||
|
||||
self._undo.push(
|
||||
ReplaceDataCommand(
|
||||
self._lst,
|
||||
list(
|
||||
map(
|
||||
lambda d: self._lst.new_from_data(*d),
|
||||
data
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
def undo(self):
|
||||
self._undo.undo()
|
||||
self.layoutChanged.emit()
|
||||
|
|
|
|||
|
|
@ -269,20 +269,29 @@ class InitialConditionsWindow(PamhyrWindow):
|
|||
settings = QSettings(QSettings.IniFormat,
|
||||
QSettings.UserScope, 'MyOrg', )
|
||||
options |= QFileDialog.DontUseNativeDialog
|
||||
filename, _ = QtWidgets.QFileDialog.getOpenFileName(
|
||||
|
||||
file_types = [
|
||||
self._trad["file_bin"],
|
||||
self._trad["file_ini"],
|
||||
self._trad["file_all"],
|
||||
]
|
||||
file_name, _ = QtWidgets.QFileDialog.getOpenFileName(
|
||||
self,
|
||||
self._trad["open_file"],
|
||||
"",
|
||||
";; ".join(["Mage (*.BIN)"]),
|
||||
";; ".join(file_types),
|
||||
options=options
|
||||
)
|
||||
|
||||
if filename != "":
|
||||
size = os.stat(filename).st_size
|
||||
# self._table.import_geometry(0, filename)
|
||||
self._import_from_file(filename)
|
||||
if file_name != "":
|
||||
size = os.stat(file_name).st_size
|
||||
# self._table.import_geometry(0, file_name)
|
||||
if file_name[-4:] == ".BIN":
|
||||
self._import_from_bin_file(file_name)
|
||||
elif file_name[-4:].upper() == ".INI":
|
||||
self._import_from_ini_file(file_name)
|
||||
|
||||
def _import_from_file(self, file_name):
|
||||
def _import_from_bin_file(self, file_name):
|
||||
solver = Mage8("dummy")
|
||||
name = os.path.basename(file_name)\
|
||||
.replace(".BIN", "")
|
||||
|
|
@ -310,10 +319,11 @@ class InitialConditionsWindow(PamhyrWindow):
|
|||
|
||||
def _import_from_results(self, results):
|
||||
logger.debug(f"import from results: {results}")
|
||||
row = self.index_selected_row()
|
||||
|
||||
self._table.import_from_results(row, results)
|
||||
|
||||
def _import_from_ini_file(self, file_name):
|
||||
self._table.read_from_ini(file_name)
|
||||
|
||||
def move_up(self):
|
||||
row = self.index_selected_row()
|
||||
self._table.move_up(row)
|
||||
|
|
|
|||
|
|
@ -34,6 +34,15 @@ class ICTranslate(MainTranslate):
|
|||
self._dict["discharge"] = self._dict["unit_discharge"]
|
||||
self._dict["rk"] = self._dict["unit_rk"]
|
||||
|
||||
self._dict["open_file"] = _translate(
|
||||
"InitialCondition", "Open a file")
|
||||
self._dict["file_bin"] = _translate(
|
||||
"InitialCondition", "Mage results file (*.BIN)")
|
||||
self._dict["file_ini"] = _translate(
|
||||
"InitialCondition", "Mage initial conditions file (*.INI *.ini)")
|
||||
self._dict["file_all"] = _translate(
|
||||
"InitialCondition", "All files (*)")
|
||||
|
||||
self._sub_dict["table_headers"] = {
|
||||
# "name": _translate("InitialCondition", "Name"),
|
||||
"rk": self._dict["unit_rk"],
|
||||
|
|
|
|||
|
|
@ -134,6 +134,7 @@ class AddCommand(QUndoCommand):
|
|||
else:
|
||||
self._new.set_as_not_deleted()
|
||||
|
||||
|
||||
class DelCommand(QUndoCommand):
|
||||
def __init__(self, lcs, tab, rows):
|
||||
QUndoCommand.__init__(self)
|
||||
|
|
|
|||
|
|
@ -38,6 +38,19 @@ logger = logging.getLogger()
|
|||
|
||||
|
||||
class ListModel(PamhyrListModel):
|
||||
def get_true_data_row(self, row):
|
||||
el = self._data.get(row)
|
||||
|
||||
return next(
|
||||
map(
|
||||
lambda e: e[0],
|
||||
filter(
|
||||
lambda e: e[1] == el,
|
||||
enumerate(self._data._lst)
|
||||
)
|
||||
), 0
|
||||
)
|
||||
|
||||
def data(self, index, role):
|
||||
row = index.row()
|
||||
column = index.column()
|
||||
|
|
@ -65,17 +78,20 @@ class ListModel(PamhyrListModel):
|
|||
return QVariant()
|
||||
|
||||
def add(self, row):
|
||||
row = self.get_true_data_row(row)
|
||||
|
||||
self._undo.push(
|
||||
AddCommand(
|
||||
self._data, row
|
||||
)
|
||||
)
|
||||
|
||||
self.update()
|
||||
|
||||
def delete(self, row):
|
||||
self._undo.push(
|
||||
DelCommand(
|
||||
self._data, row
|
||||
self._data, self._data.lines[row]
|
||||
)
|
||||
)
|
||||
self.update()
|
||||
|
|
|
|||
|
|
@ -58,25 +58,24 @@ class AddCommand(QUndoCommand):
|
|||
self._new = None
|
||||
|
||||
def undo(self):
|
||||
self._lines.delete([self._new])
|
||||
self._new.set_as_deleted()
|
||||
|
||||
def redo(self):
|
||||
if self._new is None:
|
||||
self._new = self._lines.new(self._row)
|
||||
else:
|
||||
self._lines.insert(self._row, self._new)
|
||||
self._new.set_as_not_deleted()
|
||||
|
||||
|
||||
class DelCommand(QUndoCommand):
|
||||
def __init__(self, lines, row):
|
||||
def __init__(self, lines, data):
|
||||
QUndoCommand.__init__(self)
|
||||
|
||||
self._lines = lines
|
||||
self._row = row
|
||||
self._old = self._lines.get(row)
|
||||
self._data = data
|
||||
|
||||
def undo(self):
|
||||
self._lines.insert(self._row, self._old)
|
||||
self._data.set_as_not_deleted()
|
||||
|
||||
def redo(self):
|
||||
self._lines.delete_i([self._row])
|
||||
self._data.set_as_deleted()
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ class ScenarioMenu(AbstractMenu):
|
|||
)
|
||||
|
||||
action = self._exec()
|
||||
if action == None:
|
||||
if action is None:
|
||||
return
|
||||
elif action == select:
|
||||
self._parent.select_scenario(item)
|
||||
|
|
|
|||
|
|
@ -48,6 +48,19 @@ _translate = QCoreApplication.translate
|
|||
|
||||
|
||||
class TableModel(PamhyrTableModel):
|
||||
def get_true_data_row(self, row):
|
||||
el = self._data.get(row)
|
||||
|
||||
return next(
|
||||
map(
|
||||
lambda e: e[0],
|
||||
filter(
|
||||
lambda e: e[1] == el,
|
||||
enumerate(self._data._lst)
|
||||
)
|
||||
), 0
|
||||
)
|
||||
|
||||
def data(self, index, role):
|
||||
if role != Qt.ItemDataRole.DisplayRole:
|
||||
return QVariant()
|
||||
|
|
@ -109,6 +122,8 @@ class TableModel(PamhyrTableModel):
|
|||
def add(self, row, parent=QModelIndex()):
|
||||
self.beginInsertRows(parent, row, row - 1)
|
||||
|
||||
row = self.get_true_data_row(row)
|
||||
|
||||
self._undo.push(
|
||||
AddCommand(
|
||||
self._data, row
|
||||
|
|
@ -123,7 +138,12 @@ class TableModel(PamhyrTableModel):
|
|||
|
||||
self._undo.push(
|
||||
DelCommand(
|
||||
self._data, rows
|
||||
self._data, list(
|
||||
map(
|
||||
lambda r: self._data.get(r),
|
||||
rows
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -102,33 +102,29 @@ class AddCommand(QUndoCommand):
|
|||
self._new = None
|
||||
|
||||
def undo(self):
|
||||
self._data.delete_i([self._index])
|
||||
self._new.set_as_deleted()
|
||||
|
||||
def redo(self):
|
||||
if self._new is None:
|
||||
self._new = self._data.new(self._index)
|
||||
else:
|
||||
self._data.undelete([self._new])
|
||||
# self._data.insert(self._index, self._new)
|
||||
self._new.set_as_not_deleted()
|
||||
|
||||
|
||||
class DelCommand(QUndoCommand):
|
||||
def __init__(self, data, rows):
|
||||
def __init__(self, data, lines):
|
||||
QUndoCommand.__init__(self)
|
||||
|
||||
self._data = data
|
||||
self._rows = rows
|
||||
|
||||
self._el = []
|
||||
for row in rows:
|
||||
self._el.append(self._data.get(row))
|
||||
self._el.sort()
|
||||
self._lines = lines
|
||||
|
||||
def undo(self):
|
||||
self._data.undelete(self._el)
|
||||
for line in self._lines:
|
||||
line.set_as_not_deleted()
|
||||
|
||||
def redo(self):
|
||||
self._data.delete(self._el)
|
||||
for line in self._lines:
|
||||
line.set_as_deleted()
|
||||
|
||||
|
||||
class SortCommand(QUndoCommand):
|
||||
|
|
|
|||
|
|
@ -70,6 +70,7 @@
|
|||
<attribute name="toolBarBreak">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<addaction name="action_import"/>
|
||||
<addaction name="action_add"/>
|
||||
<addaction name="action_del"/>
|
||||
<addaction name="action_sort"/>
|
||||
|
|
@ -149,6 +150,18 @@
|
|||
<string>Remove points to make the curve increasing</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="action_import">
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>ressources/import.png</normaloff>ressources/import.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Import</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Import from file</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@
|
|||
<attribute name="toolBarBreak">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<addaction name="action_import"/>
|
||||
<addaction name="action_add"/>
|
||||
<addaction name="action_del"/>
|
||||
<addaction name="action_sort"/>
|
||||
|
|
@ -107,6 +108,18 @@
|
|||
<string>Ctrl+E</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="action_import">
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>ressources/import.png</normaloff>ressources/import.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Import</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Import from file</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
|
|
|
|||
266
src/lang/fr.ts
266
src/lang/fr.ts
|
|
@ -1,6 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="fr_FR" sourcelanguage="en_150">
|
||||
<!DOCTYPE TS><TS version="2.0" language="fr_FR" sourcelanguage="en_150">
|
||||
<context>
|
||||
<name>About</name>
|
||||
<message>
|
||||
|
|
@ -193,17 +192,17 @@
|
|||
<translation>Éditer les conditions aux limites</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/BoundaryCondition/Edit/translate.py" line="39"/>
|
||||
<location filename="../View/BoundaryCondition/Edit/translate.py" line="50"/>
|
||||
<source>X</source>
|
||||
<translation>X</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/BoundaryCondition/Edit/translate.py" line="40"/>
|
||||
<location filename="../View/BoundaryCondition/Edit/translate.py" line="51"/>
|
||||
<source>Y</source>
|
||||
<translation>Y</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/BoundaryCondition/Edit/translate.py" line="45"/>
|
||||
<location filename="../View/BoundaryCondition/Edit/translate.py" line="56"/>
|
||||
<source>Solid (kg/s)</source>
|
||||
<translation>Solide (kg/s)</translation>
|
||||
</message>
|
||||
|
|
@ -243,19 +242,19 @@
|
|||
<translation>Options des conditions limites</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/BoundaryCondition/Edit/translate.py" line="48"/>
|
||||
<location filename="../View/BoundaryCondition/Edit/translate.py" line="59"/>
|
||||
<source>No geometry</source>
|
||||
<translation>Pas de géométrie</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/BoundaryCondition/Edit/translate.py" line="51"/>
|
||||
<location filename="../View/BoundaryCondition/Edit/translate.py" line="62"/>
|
||||
<source>No geometry found for this reach.
|
||||
This feature requires a reach with a geometry.</source>
|
||||
<translation>Aucune géométrie n'a été trouvée sur ce bief.
|
||||
Cette fonctionnalité nécessite un bief muni d'une géométrie.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/BoundaryCondition/Edit/translate.py" line="56"/>
|
||||
<location filename="../View/BoundaryCondition/Edit/translate.py" line="67"/>
|
||||
<source>Warning</source>
|
||||
<translation>Avertissement</translation>
|
||||
</message>
|
||||
|
|
@ -264,6 +263,31 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||
<source>Pollutant</source>
|
||||
<translation>Polluant</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/BoundaryCondition/Edit/translate.py" line="38"/>
|
||||
<source>Open a file</source>
|
||||
<translation>Ouvrir un fichier</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/BoundaryCondition/Edit/translate.py" line="40"/>
|
||||
<source>Mage hydrograph file (*.HYD)</source>
|
||||
<translation>Hydrogramme Mage (*.HYD)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/BoundaryCondition/Edit/translate.py" line="42"/>
|
||||
<source>Mage limnigraph file (*.LIM)</source>
|
||||
<translation>Limnigramme Mage (*.LIM)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/BoundaryCondition/Edit/translate.py" line="44"/>
|
||||
<source>Mage rating curve file (*.AVA)</source>
|
||||
<translation>Courbe de tarage Mage (*.AVA)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/BoundaryCondition/Edit/translate.py" line="46"/>
|
||||
<source>All files (*)</source>
|
||||
<translation>Tous les fichiers (*)</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>BoundaryConditions</name>
|
||||
|
|
@ -448,27 +472,27 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||
<translation>Biefs</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="43"/>
|
||||
<location filename="../View/Translate.py" line="44"/>
|
||||
<source>Main channel</source>
|
||||
<translation>Lit mineur</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="44"/>
|
||||
<location filename="../View/Translate.py" line="45"/>
|
||||
<source>Floodway</source>
|
||||
<translation>Lit moyen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="46"/>
|
||||
<location filename="../View/Translate.py" line="47"/>
|
||||
<source>Not defined</source>
|
||||
<translation>Non défini</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="47"/>
|
||||
<location filename="../View/Translate.py" line="48"/>
|
||||
<source>Not associated</source>
|
||||
<translation>Non associé</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="42"/>
|
||||
<location filename="../View/Translate.py" line="43"/>
|
||||
<source>Cross-section</source>
|
||||
<translation>Section en travers</translation>
|
||||
</message>
|
||||
|
|
@ -478,10 +502,15 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||
<translation>Titre</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="51"/>
|
||||
<location filename="../View/Translate.py" line="52"/>
|
||||
<source>Method</source>
|
||||
<translation>Méthode</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="42"/>
|
||||
<source>Select reach</source>
|
||||
<translation>Sélectionner un bief</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Configure</name>
|
||||
|
|
@ -1267,9 +1296,14 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||
</message>
|
||||
<message>
|
||||
<location filename="../View/ui/about.ui" line="94"/>
|
||||
<source>Copyright © 2022-2025 INRAE</source>
|
||||
<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"/>
|
||||
<source>Copyright © 2022-2025 INRAE</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Frictions</name>
|
||||
|
|
@ -1485,6 +1519,26 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||
<source>Initial conditions</source>
|
||||
<translation>Conditions initiales</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/InitialConditions/translate.py" line="37"/>
|
||||
<source>Open a file</source>
|
||||
<translation>Ouvrir un fichier</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/InitialConditions/translate.py" line="39"/>
|
||||
<source>Mage results file (*.BIN)</source>
|
||||
<translation>Fichier de résultats Mage (*.BIN)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/InitialConditions/translate.py" line="41"/>
|
||||
<source>Mage initial conditions file (*.INI *.ini)</source>
|
||||
<translation>Fichiers de conditions initiales Mage (*.INI *.ini)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/InitialConditions/translate.py" line="43"/>
|
||||
<source>All files (*)</source>
|
||||
<translation>Tous les fichiers (*)</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>InitialConditionAdisTS</name>
|
||||
|
|
@ -1573,17 +1627,17 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||
<context>
|
||||
<name>MainWindow</name>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="161"/>
|
||||
<location filename="../View/Translate.py" line="162"/>
|
||||
<source>Open debug window</source>
|
||||
<translation>Ouvrir la fenêtre de débogage</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="164"/>
|
||||
<location filename="../View/Translate.py" line="165"/>
|
||||
<source>Open SQLite debuging tool ('sqlitebrowser')</source>
|
||||
<translation>Ouvrir l'outil de débogage SQLite ('sqlitebrowser')</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="167"/>
|
||||
<location filename="../View/Translate.py" line="168"/>
|
||||
<source>Enable this window</source>
|
||||
<translation>Activer cette fenêtre</translation>
|
||||
</message>
|
||||
|
|
@ -1803,12 +1857,12 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||
<translation>Éditer la géométrie</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/ui/GeometryReach.ui" line="106"/>
|
||||
<location filename="../View/ui/GeometryReach.ui" line="107"/>
|
||||
<source>Import geometry</source>
|
||||
<translation>Importer une géométrie</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/ui/GeometryReach.ui" line="118"/>
|
||||
<location filename="../View/ui/GeometryReach.ui" line="119"/>
|
||||
<source>Export geometry</source>
|
||||
<translation>Exporter la géométrie</translation>
|
||||
</message>
|
||||
|
|
@ -2388,52 +2442,52 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||
<translation>Importer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/ui/GeometryReach.ui" line="130"/>
|
||||
<location filename="../View/ui/GeometryReach.ui" line="131"/>
|
||||
<source>Add a cross-section</source>
|
||||
<translation>Ajouter une section en travers</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/ui/GeometryReach.ui" line="142"/>
|
||||
<location filename="../View/ui/GeometryReach.ui" line="143"/>
|
||||
<source>Delete selected cross-section(s)</source>
|
||||
<translation>Supprimer les sections en travers sélectionnées</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/ui/GeometryReach.ui" line="154"/>
|
||||
<location filename="../View/ui/GeometryReach.ui" line="155"/>
|
||||
<source>Edit selected cross section(s)</source>
|
||||
<translation>Éditer les sections en travers sélectionnées</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/ui/GeometryReach.ui" line="166"/>
|
||||
<location filename="../View/ui/GeometryReach.ui" line="167"/>
|
||||
<source>Sort cross-sections by ascending position</source>
|
||||
<translation>Trier les sections en travers par PK croissant</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/ui/GeometryReach.ui" line="178"/>
|
||||
<location filename="../View/ui/GeometryReach.ui" line="179"/>
|
||||
<source>Sort cross-sections by descending position</source>
|
||||
<translation>Trier les sections en travers par PK décroissant</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/ui/GeometryReach.ui" line="190"/>
|
||||
<location filename="../View/ui/GeometryReach.ui" line="191"/>
|
||||
<source>Move up selected cross-section(s)</source>
|
||||
<translation>Déplacer les sections en travers vers le haut</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/ui/GeometryReach.ui" line="202"/>
|
||||
<location filename="../View/ui/GeometryReach.ui" line="203"/>
|
||||
<source>Move down selected cross-section(s)</source>
|
||||
<translation>Déplacer les sections en travers vers le bas</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/ui/GeometryReach.ui" line="211"/>
|
||||
<location filename="../View/ui/GeometryReach.ui" line="212"/>
|
||||
<source>Meshing</source>
|
||||
<translation>Maillage</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="154"/>
|
||||
<location filename="../View/Translate.py" line="155"/>
|
||||
<source>Summary</source>
|
||||
<translation>Résumé</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="157"/>
|
||||
<location filename="../View/Translate.py" line="158"/>
|
||||
<source>Checks</source>
|
||||
<translation>Vérifications</translation>
|
||||
</message>
|
||||
|
|
@ -2568,17 +2622,17 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||
<translation>Importer depuis un fichier</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/ui/GeometryReach.ui" line="216"/>
|
||||
<location filename="../View/ui/GeometryReach.ui" line="217"/>
|
||||
<source>Update RK</source>
|
||||
<translation>Mise à jour des PK</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/ui/GeometryReach.ui" line="219"/>
|
||||
<location filename="../View/ui/GeometryReach.ui" line="220"/>
|
||||
<source>Recompute RK</source>
|
||||
<translation>Recalcule des PK</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/ui/GeometryReach.ui" line="227"/>
|
||||
<location filename="../View/ui/GeometryReach.ui" line="228"/>
|
||||
<source>Purge cross-sections to keep a given number of points</source>
|
||||
<translation>Purger les profiles pour garder un nombre fixer de points</translation>
|
||||
</message>
|
||||
|
|
@ -2593,42 +2647,42 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||
<translation>Exporter les données au format CSV</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/ui/EditBoundaryConditions.ui" line="130"/>
|
||||
<location filename="../View/ui/EditBoundaryConditions.ui" line="131"/>
|
||||
<source>Generate uniform</source>
|
||||
<translation>Générer un regime uniforme</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/ui/EditBoundaryConditions.ui" line="133"/>
|
||||
<location filename="../View/ui/EditBoundaryConditions.ui" line="134"/>
|
||||
<source>Generate rating curve from Manning law</source>
|
||||
<translation>Générer une courbe de tarage (loi de Maning)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/ui/EditBoundaryConditions.ui" line="138"/>
|
||||
<location filename="../View/ui/EditBoundaryConditions.ui" line="139"/>
|
||||
<source>Generate critical</source>
|
||||
<translation>Générer régime critique</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/ui/EditBoundaryConditions.ui" line="141"/>
|
||||
<location filename="../View/ui/EditBoundaryConditions.ui" line="142"/>
|
||||
<source>Generate rating curve as Q(z) = Sqrt(g*S(z)^3/L(z))</source>
|
||||
<translation>Générer une courbe de tarage (Q(z) = Sqrt(g*S(z)^3/L(z)))</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/ui/EditBoundaryConditions.ui" line="146"/>
|
||||
<location filename="../View/ui/EditBoundaryConditions.ui" line="147"/>
|
||||
<source>Make increasing</source>
|
||||
<translation>Augmenter</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/ui/EditBoundaryConditions.ui" line="149"/>
|
||||
<location filename="../View/ui/EditBoundaryConditions.ui" line="150"/>
|
||||
<source>Remove points to make the curve increasing</source>
|
||||
<translation>Supprimer des points pour rendre la courbe croissante</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/ui/GeometryReach.ui" line="232"/>
|
||||
<location filename="../View/ui/GeometryReach.ui" line="233"/>
|
||||
<source>Shift</source>
|
||||
<translation>Translater</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/ui/GeometryReach.ui" line="235"/>
|
||||
<location filename="../View/ui/GeometryReach.ui" line="236"/>
|
||||
<source>Shift selected sections coordinates</source>
|
||||
<translation>Translater les coordonnées des sections sélectionnées</translation>
|
||||
</message>
|
||||
|
|
@ -2653,47 +2707,47 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||
<translation>Données</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="175"/>
|
||||
<location filename="../View/Translate.py" line="176"/>
|
||||
<source>Please select a reach</source>
|
||||
<translation>Veuillez sélectionner un bief</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="184"/>
|
||||
<location filename="../View/Translate.py" line="185"/>
|
||||
<source>Last open study</source>
|
||||
<translation>Dernière étude ouverte</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="187"/>
|
||||
<location filename="../View/Translate.py" line="188"/>
|
||||
<source>Do you want to open again the last open study?</source>
|
||||
<translation>Voulez-vous rouvrir la dernière étude ?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="178"/>
|
||||
<location filename="../View/Translate.py" line="179"/>
|
||||
<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>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="192"/>
|
||||
<location filename="../View/Translate.py" line="193"/>
|
||||
<source>Close without saving study</source>
|
||||
<translation>Fermer sans sauvegarder l'étude</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="195"/>
|
||||
<location filename="../View/Translate.py" line="196"/>
|
||||
<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>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="172"/>
|
||||
<location filename="../View/Translate.py" line="173"/>
|
||||
<source>Warning</source>
|
||||
<translation>Avertissement</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="199"/>
|
||||
<location filename="../View/Translate.py" line="200"/>
|
||||
<source>X (m)</source>
|
||||
<translation>X (m)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="200"/>
|
||||
<location filename="../View/Translate.py" line="201"/>
|
||||
<source>Y (m)</source>
|
||||
<translation>Y (m)</translation>
|
||||
</message>
|
||||
|
|
@ -2868,12 +2922,12 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||
<translation>Export données brutes</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="201"/>
|
||||
<location filename="../View/Translate.py" line="202"/>
|
||||
<source>Yes</source>
|
||||
<translation>Oui</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="202"/>
|
||||
<location filename="../View/Translate.py" line="203"/>
|
||||
<source>No</source>
|
||||
<translation>Non</translation>
|
||||
</message>
|
||||
|
|
@ -2892,6 +2946,16 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||
<source>Import background image</source>
|
||||
<translation>Importer une image de fond</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/ui/GeometryReach.ui" line="241"/>
|
||||
<source>Select reach</source>
|
||||
<translation>Sélectionner un bief</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/ui/GeometryReach.ui" line="244"/>
|
||||
<source>Change current reach</source>
|
||||
<translation>Changer le bief courrant</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MainWindow_reach</name>
|
||||
|
|
@ -3618,87 +3682,87 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||
<context>
|
||||
<name>Unit</name>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="59"/>
|
||||
<location filename="../View/Translate.py" line="60"/>
|
||||
<source>Width (m)</source>
|
||||
<translation>Largeur (m)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="65"/>
|
||||
<location filename="../View/Translate.py" line="66"/>
|
||||
<source>Depth (m)</source>
|
||||
<translation>Profondeur (m)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="72"/>
|
||||
<location filename="../View/Translate.py" line="73"/>
|
||||
<source>Diameter (m)</source>
|
||||
<translation>Diamètre (m)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="73"/>
|
||||
<location filename="../View/Translate.py" line="74"/>
|
||||
<source>Thickness (m)</source>
|
||||
<translation>Épaisseur (m)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="74"/>
|
||||
<location filename="../View/Translate.py" line="75"/>
|
||||
<source>Elevation (m)</source>
|
||||
<translation>Cote (m)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="117"/>
|
||||
<location filename="../View/Translate.py" line="118"/>
|
||||
<source>Area (hectare)</source>
|
||||
<translation>Aire (hectare)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="119"/>
|
||||
<location filename="../View/Translate.py" line="120"/>
|
||||
<source>Time (sec)</source>
|
||||
<translation>Temps (s)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="120"/>
|
||||
<location filename="../View/Translate.py" line="121"/>
|
||||
<source>Time (JJJ:HH:MM:SS)</source>
|
||||
<translation>Temps (JJJ:HH:MM:SS)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="122"/>
|
||||
<location filename="../View/Translate.py" line="123"/>
|
||||
<source>Date (sec)</source>
|
||||
<translation>Date (s)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="123"/>
|
||||
<location filename="../View/Translate.py" line="124"/>
|
||||
<source>Date (ISO format)</source>
|
||||
<translation>Date (format ISO)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="58"/>
|
||||
<location filename="../View/Translate.py" line="59"/>
|
||||
<source>River Kilometer (m)</source>
|
||||
<translation>Point Kilométrique (m)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="66"/>
|
||||
<location filename="../View/Translate.py" line="67"/>
|
||||
<source>Max Depth (m)</source>
|
||||
<translation>Profondeur max (m)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="71"/>
|
||||
<location filename="../View/Translate.py" line="72"/>
|
||||
<source>Mean Depth (m)</source>
|
||||
<translation>Profondeur moyenne (m)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="99"/>
|
||||
<location filename="../View/Translate.py" line="100"/>
|
||||
<source>Velocity (m/s)</source>
|
||||
<translation>Vitesse (m/s)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="138"/>
|
||||
<location filename="../View/Translate.py" line="139"/>
|
||||
<source>Wet Perimeter (m)</source>
|
||||
<translation>Périmètre mouillé (m)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="141"/>
|
||||
<location filename="../View/Translate.py" line="142"/>
|
||||
<source>Hydraulic Radius (m)</source>
|
||||
<translation>Rayon hydraulique (m)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="144"/>
|
||||
<location filename="../View/Translate.py" line="145"/>
|
||||
<source>Froude number</source>
|
||||
<translation>Nombre de Froude</translation>
|
||||
</message>
|
||||
|
|
@ -3741,132 +3805,132 @@ moyen droit (m)</translation>
|
|||
<translation>D90</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="60"/>
|
||||
<location filename="../View/Translate.py" line="61"/>
|
||||
<source>Width Envelop (m)</source>
|
||||
<translation>Enveloppe de la argeur (m)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="63"/>
|
||||
<location filename="../View/Translate.py" line="64"/>
|
||||
<source>Max Width (m)</source>
|
||||
<translation>Largeur max (m)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="64"/>
|
||||
<location filename="../View/Translate.py" line="65"/>
|
||||
<source>Min Width (m)</source>
|
||||
<translation>Largeur min (m)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="67"/>
|
||||
<location filename="../View/Translate.py" line="68"/>
|
||||
<source>Min Depth (m)</source>
|
||||
<translation>Profondeur min (m)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="68"/>
|
||||
<location filename="../View/Translate.py" line="69"/>
|
||||
<source>Depth Envelop (m)</source>
|
||||
<translation>Enveloppe de la profondeur (m)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="75"/>
|
||||
<location filename="../View/Translate.py" line="76"/>
|
||||
<source>Bed Elevation (m)</source>
|
||||
<translation>Cote du fond (m)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="78"/>
|
||||
<location filename="../View/Translate.py" line="79"/>
|
||||
<source>Bed Elevation Envelop (m)</source>
|
||||
<translation>Enveloppe de la cote du fond (m)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="81"/>
|
||||
<location filename="../View/Translate.py" line="82"/>
|
||||
<source>Max Bed Elevation (m)</source>
|
||||
<translation>Cote du fond max (m)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="84"/>
|
||||
<location filename="../View/Translate.py" line="85"/>
|
||||
<source>Min Bed Elevation (m)</source>
|
||||
<translation>Cote du fond min (m)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="87"/>
|
||||
<location filename="../View/Translate.py" line="88"/>
|
||||
<source>Water Elevation (m)</source>
|
||||
<translation>Cote de l'eau (m)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="90"/>
|
||||
<location filename="../View/Translate.py" line="91"/>
|
||||
<source>Water Elevation Envelop (m)</source>
|
||||
<translation>Enveloppe de la cote de l'eau (m)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="93"/>
|
||||
<location filename="../View/Translate.py" line="94"/>
|
||||
<source>Max Water Elevation (m)</source>
|
||||
<translation>Cote de l'eau max (m)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="96"/>
|
||||
<location filename="../View/Translate.py" line="97"/>
|
||||
<source>Min Water Elevation (m)</source>
|
||||
<translation>Cote de l'eau min (m)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="100"/>
|
||||
<location filename="../View/Translate.py" line="101"/>
|
||||
<source>Velocity Envelop (m/s)</source>
|
||||
<translation>Enveloppe de la vitesse (m/s)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="103"/>
|
||||
<location filename="../View/Translate.py" line="104"/>
|
||||
<source>Max Velocity (m/s)</source>
|
||||
<translation>Vitesse max (m/s)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="106"/>
|
||||
<location filename="../View/Translate.py" line="107"/>
|
||||
<source>Min Velocity (m/s)</source>
|
||||
<translation>Vitesse min (m/s)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="125"/>
|
||||
<location filename="../View/Translate.py" line="126"/>
|
||||
<source>Area</source>
|
||||
<translation>Aire</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="126"/>
|
||||
<location filename="../View/Translate.py" line="127"/>
|
||||
<source>Rho</source>
|
||||
<translation>Rho</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="127"/>
|
||||
<location filename="../View/Translate.py" line="128"/>
|
||||
<source>Porosity</source>
|
||||
<translation>Porosité</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="128"/>
|
||||
<location filename="../View/Translate.py" line="129"/>
|
||||
<source>CDC_RIV</source>
|
||||
<translation>CDC_RIV</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="129"/>
|
||||
<location filename="../View/Translate.py" line="130"/>
|
||||
<source>CDC_CAS</source>
|
||||
<translation>CDC_CAS</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="130"/>
|
||||
<location filename="../View/Translate.py" line="131"/>
|
||||
<source>APD</source>
|
||||
<translation>APD</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="131"/>
|
||||
<location filename="../View/Translate.py" line="132"/>
|
||||
<source>AC</source>
|
||||
<translation>AC</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="132"/>
|
||||
<location filename="../View/Translate.py" line="133"/>
|
||||
<source>BC</source>
|
||||
<translation>BC</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="134"/>
|
||||
<location filename="../View/Translate.py" line="135"/>
|
||||
<source>Concentration (g/l)</source>
|
||||
<translation>Concentration (g/l)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="145"/>
|
||||
<location filename="../View/Translate.py" line="146"/>
|
||||
<source>Mass (kg)</source>
|
||||
<translation>Masse</translation>
|
||||
</message>
|
||||
|
|
@ -3886,32 +3950,32 @@ moyen droit (m)</translation>
|
|||
<translation>Coeff c</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="109"/>
|
||||
<location filename="../View/Translate.py" line="110"/>
|
||||
<source>Discharge</source>
|
||||
<translation>Débit</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="111"/>
|
||||
<location filename="../View/Translate.py" line="112"/>
|
||||
<source>Discharge Envelop</source>
|
||||
<translation>Enveloppe du débit</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="113"/>
|
||||
<location filename="../View/Translate.py" line="114"/>
|
||||
<source>Max Discharge</source>
|
||||
<translation>Débit max</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="115"/>
|
||||
<location filename="../View/Translate.py" line="116"/>
|
||||
<source>Min Discharge</source>
|
||||
<translation>Débit min</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="146"/>
|
||||
<location filename="../View/Translate.py" line="147"/>
|
||||
<source>Concentration</source>
|
||||
<translation>Concentration</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Translate.py" line="137"/>
|
||||
<location filename="../View/Translate.py" line="138"/>
|
||||
<source>Wet Area</source>
|
||||
<translation>Aire mouillée</translation>
|
||||
</message>
|
||||
|
|
|
|||
Loading…
Reference in New Issue