work on results, type_pol

This commit is contained in:
Theophile Terraz committed 2024-12-03 14:59:38 +01:00
1 parent a1ae3f42f4
commit b85962bfcd
6 files changed
+105 -102

No files matched your search

+4 -9
View File
@@ -24,7 +24,7 @@ _translate = QCoreApplication.translate
class ResultsTranslate(MainTranslate):
def __init__(self, pollutants=None, type_pol=None):
def __init__(self, pollutants=None):
if pollutants is not None:
self.pollutants = pollutants
if "total_sediment" in self.pollutants:
@@ -32,8 +32,6 @@ class ResultsTranslate(MainTranslate):
else:
self.pollutants = pollutants
self._type_pol = type_pol
super(ResultsTranslate, self).__init__()
self._dict["Results"] = _translate("Results", "Results")
@@ -104,12 +102,9 @@ class ResultsTranslate(MainTranslate):
self._sub_dict["table_headers_raw_data"] = {
"name": _translate("Results", "Profile"),
}
for pol in self.pollutants:
if self._type_pol == 7:
self._sub_dict["table_headers_raw_data"][pol + " Concentration"] = pol + "\n Concentration"
self._sub_dict["table_headers_raw_data"][pol + " Mass"] = pol + "\n Mass"
else:
self._sub_dict["table_headers_raw_data"][pol + " Concentration"] = pol + "\n Concentration"
for i, pol in enumerate(self.pollutants):
self._sub_dict["table_headers_raw_data"][pol + " Concentration"] = pol + "\n Concentration"
self._sub_dict["table_headers_raw_data"][pol + " Mass"] = pol + "\n Mass"
else:
self._sub_dict["table_headers_raw_data"] = {
"name": _translate("Results", "Profile"),