-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplot_review.py
More file actions
40 lines (25 loc) · 1.06 KB
/
Copy pathplot_review.py
File metadata and controls
40 lines (25 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import sys
import glob
class Plot_Review():
def __init__(self, filename, review_manager):
self.filename = filename
self.review_manager = review_manager
self.filename_sans_path = self.filename.replace("\\", "/").split("/")[-1]
self.review = {}
for problem_var in self.review_manager.problem_vars:
self.review[problem_var + "_tick"] = ""
self.review[problem_var + "_text"] = ""
def absorb_changes(self, current_input):
for problem_var in self.review_manager.problem_vars:
checkbox = current_input[problem_var + "_tick"]
checked = str(checkbox.isChecked()).strip()
input_field = current_input[problem_var + "_text"]
text = str(input_field.displayText()).strip()
self.review[problem_var + "_tick"] = checked
self.review[problem_var + "_text"] = text
def csv_output(self):
output = self.filename_sans_path
for problem_var in self.review_manager.problem_vars:
output += "," + self.review[problem_var + "_tick"] + "," + self.review[problem_var + "_text"]
output += "\n"
return output