mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
AdisTT: new results window, adapted from adists results
This commit is contained in:
1 parent
57f82415bd
commit
9b9202c739
10 files changed
+1238
-18
No files matched your search
+49
-8
@@ -103,6 +103,7 @@ from View.RunSolver.WindowAdisTS import (
|
||||
from View.CheckList.Window import CheckListWindow
|
||||
from View.CheckList.WindowAdisTS import CheckListWindowAdisTS
|
||||
from View.Results.WindowAdisTS import ResultsWindowAdisTS
|
||||
from View.Results.WindowAdisTT import ResultsWindowAdisTT
|
||||
from View.Results.ReadingResultsDialog import ReadingResultsDialog
|
||||
|
||||
from View.Debug.Window import ReplWindow, TimerWindow
|
||||
@@ -297,9 +298,9 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
||||
"action_menu_d90": self.open_d90,
|
||||
"action_menu_pollutants": self.open_pollutants,
|
||||
"action_menu_run_adists":
|
||||
lambda: self.select_run_solver_adists(mode="adists"),
|
||||
self.select_run_solver_adists,
|
||||
"action_menu_run_adistt":
|
||||
lambda: self.select_run_solver_adists(mode="adistt"),
|
||||
self.select_run_solver_adistt,
|
||||
"action_menu_output_rk": self.open_output_rk_adists,
|
||||
"action_menu_config": self.open_configure,
|
||||
"action_menu_new": self.open_new_study,
|
||||
@@ -1570,7 +1571,7 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
||||
if run.exec():
|
||||
self.run_solver(run.solver)
|
||||
|
||||
def select_run_solver_adists(self, mode="adists"):
|
||||
def select_run_solver_adists(self):
|
||||
if self._study is None:
|
||||
return
|
||||
|
||||
@@ -1586,9 +1587,27 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
||||
parent=self
|
||||
)
|
||||
if run.exec():
|
||||
self.run_solver_adists(run.solver, run.mage_rep, mode=mode)
|
||||
self.run_solver_adists(run.solver, run.mage_rep)
|
||||
|
||||
def run_solver_adists(self, solver, mage_rep, mode="adists"):
|
||||
def select_run_solver_adistt(self):
|
||||
if self._study is None:
|
||||
return
|
||||
|
||||
run = SelectSolverWindowAdisTT(
|
||||
study=self._study,
|
||||
config=self.conf,
|
||||
parent=self
|
||||
)
|
||||
if run.exec():
|
||||
self.run_solver_adistt(run.solver, run.mage_rep)
|
||||
|
||||
def run_solver_adists(self, solver, mage_rep):
|
||||
self._run_solver_adis(solver, mage_rep, mode="adists")
|
||||
|
||||
def run_solver_adistt(self, solver, mage_rep):
|
||||
self._run_solver_adis(solver, mage_rep, mode="adistt")
|
||||
|
||||
def _run_solver_adis(self, solver, mage_rep, mode):
|
||||
if self._study is None:
|
||||
return
|
||||
|
||||
@@ -1598,7 +1617,8 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
||||
self._study,
|
||||
self.conf,
|
||||
solver,
|
||||
mage_rep
|
||||
mage_rep,
|
||||
mode,
|
||||
]
|
||||
):
|
||||
return
|
||||
@@ -1609,6 +1629,7 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
||||
solver=solver,
|
||||
parent=self,
|
||||
mage_rep=mage_rep,
|
||||
mode=mode,
|
||||
)
|
||||
check.show()
|
||||
|
||||
@@ -1644,6 +1665,16 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
||||
)
|
||||
sol.show()
|
||||
|
||||
def solver_log_adistt(self, solver, mage_rep):
|
||||
sol = SolverLogWindowAdisTT(
|
||||
study=self._study,
|
||||
config=self.conf,
|
||||
solver=solver,
|
||||
parent=self,
|
||||
mage_rep=mage_rep,
|
||||
)
|
||||
sol.show()
|
||||
|
||||
def solver_log(self, solver):
|
||||
sol = SolverLogWindow(
|
||||
study=self._study,
|
||||
@@ -1763,6 +1794,16 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
||||
)
|
||||
|
||||
def open_solver_results_adists(self, solver, results=None):
|
||||
self._open_solver_results_adis(
|
||||
solver, ResultsWindowAdisTS, results=results
|
||||
)
|
||||
|
||||
def open_solver_results_adistt(self, solver, results=None):
|
||||
self._open_solver_results_adis(
|
||||
solver, ResultsWindowAdisTT, results=results
|
||||
)
|
||||
|
||||
def _open_solver_results_adis(self, solver, window_class, results=None):
|
||||
def reading_fn():
|
||||
self._tmp_results = results
|
||||
|
||||
@@ -1804,7 +1845,7 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
||||
|
||||
# Windows already opened
|
||||
if self.sub_window_exists(
|
||||
ResultsWindowAdisTS,
|
||||
window_class,
|
||||
data=[
|
||||
self._study,
|
||||
None, # No config
|
||||
@@ -1815,7 +1856,7 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
||||
):
|
||||
return
|
||||
|
||||
res = ResultsWindowAdisTS(
|
||||
res = window_class(
|
||||
study=self._study,
|
||||
solver=solver,
|
||||
results=results,
|
||||
|
||||
Reference in new issue
Block a user