Results: Add speed value into row data table.

This commit is contained in:
Pierre-Antoine Rouby committed 2024-05-13 15:26:58 +02:00
1 parent 0c039793df
commit 9760d41561
2 files changed
+7

No files matched your search

+6
View File
@@ -86,6 +86,12 @@ class TableModel(PamhyrTableModel):
elif self._headers[column] == "discharge":
v = self._lst[row].get_ts_key(self._timestamp, "Q")
return f"{v:.4f}"
elif self._headers[column] == "speed":
q = self._lst[row].get_ts_key(self._timestamp, "Q")
z = self._lst[row].get_ts_key(self._timestamp, "Q")
v = self._lst[row].geometry.speed(q, z)
return f"{v:.4f}"
return QVariant()
+1
View File
@@ -57,4 +57,5 @@ class ResultsTranslate(MainTranslate):
"name": _translate("Results", "Profile"),
"water_elevation": self._dict["unit_water_elevation"],
"discharge": self._dict["unit_discharge"],
"speed": self._dict["unit_speed"],
}