mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
SolverParameters: Add solver parameter window base.
This commit is contained in:
1 parent
eb6d218b8e
commit
9cd8fadcd1
13 files changed
+616
-45
No files matched your search
+46
-43
@@ -14,81 +14,84 @@ class AbstractSolver(object):
|
||||
def __init__(self, name):
|
||||
super(AbstractSolver, self).__init__()
|
||||
|
||||
self.current_process = None
|
||||
self.status = STATUS.STOPED
|
||||
self._current_process = None
|
||||
self._status = STATUS.STOPED
|
||||
|
||||
# Informations
|
||||
self._type = ""
|
||||
self.name = name
|
||||
self.description = ""
|
||||
self._name = name
|
||||
self._description = ""
|
||||
|
||||
self.path_input = ""
|
||||
self.path_solver = ""
|
||||
self.path_output = ""
|
||||
self._path_input = ""
|
||||
self._path_solver = ""
|
||||
self._path_output = ""
|
||||
|
||||
self.cmd_input = ""
|
||||
self.cmd_solver = ""
|
||||
self.cmd_output = ""
|
||||
self._cmd_input = ""
|
||||
self._cmd_solver = ""
|
||||
self._cmd_output = ""
|
||||
|
||||
def __str__(self):
|
||||
return f"{self.name} : {self._type} : {self.description}"
|
||||
return f"{self._name} : {self._type} : {self._description}"
|
||||
|
||||
# Getter
|
||||
def get_status(self):
|
||||
return self.status
|
||||
@classmethod
|
||||
def default_parameters(cls):
|
||||
return []
|
||||
|
||||
def get_type(self):
|
||||
@property
|
||||
def name(self):
|
||||
return self.name
|
||||
|
||||
@property
|
||||
def description(self):
|
||||
return self.description
|
||||
|
||||
@property
|
||||
def status(self):
|
||||
return self._status
|
||||
|
||||
@property
|
||||
def type(self):
|
||||
return self._type
|
||||
|
||||
def __getitem__(self, name):
|
||||
ret = None
|
||||
@status.setter
|
||||
def status(self, status):
|
||||
self._status = status
|
||||
|
||||
if name == "name":
|
||||
ret = self.name
|
||||
elif name == "description":
|
||||
ret = self.description
|
||||
elif name == "type":
|
||||
ret = self._type
|
||||
@name.setter
|
||||
def name(self, name):
|
||||
self._name = name
|
||||
|
||||
return ret
|
||||
|
||||
# Setter
|
||||
def set_status(self, status):
|
||||
self.status = status
|
||||
|
||||
def set_name(self, name):
|
||||
self.name = name
|
||||
|
||||
def set_description(self, description):
|
||||
self.description = description
|
||||
@description.setter
|
||||
def description(self, description):
|
||||
self._description = description
|
||||
|
||||
def set_input(self, path, cmd):
|
||||
self.path_input = path
|
||||
self.cmd_input = cmd
|
||||
self._path_input = path
|
||||
self._cmd_input = cmd
|
||||
|
||||
def set_solver(self, path, cmd):
|
||||
self.path_solver = path
|
||||
self.cmd_solver = cmd
|
||||
self._path_solver = path
|
||||
self._cmd_solver = cmd
|
||||
|
||||
def set_output(self, path, cmd):
|
||||
self.path_output = path
|
||||
self.cmd_output = cmd
|
||||
self._path_output = path
|
||||
self._cmd_output = cmd
|
||||
|
||||
# Run
|
||||
def run_input_data_fomater(self):
|
||||
if self.cmd_input == "":
|
||||
if self._cmd_input == "":
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
def run_solver(self):
|
||||
if self.cmd_solver == "":
|
||||
if self._cmd_solver == "":
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
def run_output_data_fomater(self, ):
|
||||
if self.cmd_output == "":
|
||||
if self._cmd_output == "":
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
Reference in new issue
Block a user