mg-pso-gui 0.1.239__py3-none-any.whl → 0.1.240__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mg_pso_gui-0.1.239.dist-info → mg_pso_gui-0.1.240.dist-info}/METADATA +1 -1
- {mg_pso_gui-0.1.239.dist-info → mg_pso_gui-0.1.240.dist-info}/RECORD +14 -13
- mgpsogui/gui/HomePage.py +4 -4
- mgpsogui/gui/OptionManager.py +24 -4
- mgpsogui/gui/PlatformTab/PlatformTab.py +3 -3
- mgpsogui/gui/PlatformTab/ServiceParametersView.py +0 -3
- mgpsogui/gui/SetupTab/BoundsList.py +2 -2
- mgpsogui/gui/SetupTab/OverrideParameterMetrics.py +77 -0
- mgpsogui/gui/SetupTab/OverrideParameterWindow.py +42 -0
- mgpsogui/gui/SetupTab/SetupTab.py +2 -2
- mgpsogui/gui/SetupTab/StepView.py +9 -5
- mgpsogui/gui/images/IGOW 4 Logo.png +0 -0
- {mg_pso_gui-0.1.239.dist-info → mg_pso_gui-0.1.240.dist-info}/WHEEL +0 -0
- {mg_pso_gui-0.1.239.dist-info → mg_pso_gui-0.1.240.dist-info}/entry_points.txt +0 -0
- {mg_pso_gui-0.1.239.dist-info → mg_pso_gui-0.1.240.dist-info}/top_level.txt +0 -0
@@ -1,16 +1,16 @@
|
|
1
1
|
mgpsogui/__init__.py,sha256=q7AfBjeJABnFtbsZnsObpUwaXKPDVYtz46G6MKXLF74,42
|
2
2
|
mgpsogui/mgpsogui.py,sha256=NIZmyNcbwC8EgSwf1ubdMUSJscrIEgoD4jLYziqHQ-k,148
|
3
3
|
mgpsogui/start.yaml,sha256=ZjCVLb-MLqAxrGRm9kA7_SDpa-45EuKIELNQ2QqCAiU,4713
|
4
|
-
mgpsogui/gui/HomePage.py,sha256=
|
5
|
-
mgpsogui/gui/OptionManager.py,sha256=
|
4
|
+
mgpsogui/gui/HomePage.py,sha256=6Tt1dnSsuYk888Da0RLbJpxEgtgxk-dg72Qphi85Cns,23231
|
5
|
+
mgpsogui/gui/OptionManager.py,sha256=vLVwIvKMt08-Yr3BNYsWFxfrZcuiay_yZv6_o8_Qmmg,18111
|
6
6
|
mgpsogui/gui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
7
|
-
mgpsogui/gui/PlatformTab/PlatformTab.py,sha256
|
8
|
-
mgpsogui/gui/PlatformTab/ServiceParametersView.py,sha256=
|
7
|
+
mgpsogui/gui/PlatformTab/PlatformTab.py,sha256=-YdSvNFr-ybTuvsB9WNTEy0rRmDuCTiVf9jBHu_8CNk,10939
|
8
|
+
mgpsogui/gui/PlatformTab/ServiceParametersView.py,sha256=jzv-kPNVo-aAflpi-xPz1yltv2P87wR0iOUf6b_fwMg,2760
|
9
9
|
mgpsogui/gui/PlatformTab/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
10
10
|
mgpsogui/gui/RunTab/RunTab.py,sha256=8FT7mdxNRQrftDuU0v4LoK1eyH8_RHwLOyM4dz8O_4A,1850
|
11
11
|
mgpsogui/gui/RunTab/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
12
12
|
mgpsogui/gui/SetupTab/BoundsEditorWindow.py,sha256=U64oaiDIOaimjbqKMz5rQNq2o1SrQtrRHDdTYQ9ux1s,2870
|
13
|
-
mgpsogui/gui/SetupTab/BoundsList.py,sha256=
|
13
|
+
mgpsogui/gui/SetupTab/BoundsList.py,sha256=yen8lUc5iVzUyNwRg1qAENJz-gzN9-UhTHx3jyc946c,12260
|
14
14
|
mgpsogui/gui/SetupTab/CalibrationParametersView.py,sha256=ppVBHG3nphku9-P6Z8az-HTpgk8vHxnj-A5m80BZTgA,2784
|
15
15
|
mgpsogui/gui/SetupTab/CustomFunctionEditorWindow.py,sha256=yx0dHSNa7fGy99Q6qFcI6j9r8p0DlV3iOBgyPMGd8pM,2884
|
16
16
|
mgpsogui/gui/SetupTab/CustomFunctionMetrics.py,sha256=hAVZSJMgHEQYrFsgUUnil17pWMFDA26Scio5DAlfdzE,5899
|
@@ -18,15 +18,16 @@ mgpsogui/gui/SetupTab/FunctionsList.py,sha256=cMBv87GeRACiJ1DPxFrPvZJOZ3fK6FUVAe
|
|
18
18
|
mgpsogui/gui/SetupTab/ListEditor.py,sha256=vlP0KDPu8J1_6KXuUTlE7OClgfF0Qk6cISsFm_SglUw,3232
|
19
19
|
mgpsogui/gui/SetupTab/ListParametersView.py,sha256=wYcDcaooYkw-y7XW6dJUwhTWxLuUUOK5tGUFVHBf3ck,7352
|
20
20
|
mgpsogui/gui/SetupTab/OptimalParameterView.py,sha256=H92S6ioJI2iTjFBspEzyDxluagCEgfFSW5AkqQFO-l8,1738
|
21
|
-
mgpsogui/gui/SetupTab/
|
21
|
+
mgpsogui/gui/SetupTab/OverrideParameterMetrics.py,sha256=Wf8zTLTm2XnKKp7O0l60HOle0cJK5YEiR98DtJyfhIo,3078
|
22
|
+
mgpsogui/gui/SetupTab/OverrideParameterWindow.py,sha256=qt3bHKBu-YYedvxx_BfQqZBiFvkSM85n_J1Qke-bq4w,1374
|
23
|
+
mgpsogui/gui/SetupTab/SetupTab.py,sha256=hbEUU1QYjEyLsLEOFTMLLiTK_7X6NFsXhmdYwnx2q5g,2812
|
22
24
|
mgpsogui/gui/SetupTab/StaticParameterView.py,sha256=iEG-UpBBlAJabZo3MG768oLqOROjUPc23tKOSd47IUc,2739
|
23
|
-
mgpsogui/gui/SetupTab/StepView.py,sha256=
|
25
|
+
mgpsogui/gui/SetupTab/StepView.py,sha256=wBWKOjGoc_CRqBjC_bXN2aq7gMg-tY0a-W5vldQWYmA,9049
|
24
26
|
mgpsogui/gui/SetupTab/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
25
27
|
mgpsogui/gui/VisualizeTab/MatrixEditor.py,sha256=JPQmfljdddIwHtTKpFqUdk7hRzVdX-IKl4neOk3DsjM,3132
|
26
28
|
mgpsogui/gui/VisualizeTab/SideBar.py,sha256=MtZfDScNFN0fQ8DyPm6bZGJSrFRgT14fZeUq-qc61O8,21936
|
27
29
|
mgpsogui/gui/VisualizeTab/VisualizeTab.py,sha256=JCm4qOe_l2vVTabBjGUHAK6fl21UQ4RhRLll_PIUFWI,6832
|
28
30
|
mgpsogui/gui/VisualizeTab/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
29
|
-
mgpsogui/gui/images/IGOW 4 Logo.png,sha256=JixNXz5gOEj898VF-_PHthAlGU-6W-y9ucb4EVNPtjs,433752
|
30
31
|
mgpsogui/gui/images/collapse.png,sha256=yicb16LaY7Nl5q9V8HHlht-Fbg5xU-l4_LJ_Arfmu1c,2989
|
31
32
|
mgpsogui/gui/images/down.png,sha256=pspJkvUitD648C_2y8JLLD4Eagpk4MDEKQJGOO_yIaY,2654
|
32
33
|
mgpsogui/gui/images/expand.png,sha256=YQyxXipCiNiZpTok5Y4juNU5davxoK7MTlRQI4Id27w,2922
|
@@ -63,8 +64,8 @@ mgpsogui/util/recosu/utils/trace_writer.py,sha256=V9BJlOjCbNYGoXGEk3CF5wjifBxvar
|
|
63
64
|
mgpsogui/util/recosu/utils/utils.py,sha256=QB8vftq3142ekG0ORjz0ZBHU5YknXbR0oTsrxrPAsF0,3951
|
64
65
|
mgpsogui/util/recosu/utils/plot/__init__.py,sha256=h1KjM7_tNDv351pcwt8A6Ibb1jhwWyx5Gbu-zj-sI3Q,71
|
65
66
|
mgpsogui/util/recosu/utils/plot/cost_steps.py,sha256=1Ce11AJyweWkmvjXPxEygzS-h8yVLmQEDLS53yjPLqQ,3779
|
66
|
-
mg_pso_gui-0.1.
|
67
|
-
mg_pso_gui-0.1.
|
68
|
-
mg_pso_gui-0.1.
|
69
|
-
mg_pso_gui-0.1.
|
70
|
-
mg_pso_gui-0.1.
|
67
|
+
mg_pso_gui-0.1.240.dist-info/METADATA,sha256=F7xHFn6Tbj4ryic8_F6Wk_Ig0bElTIYNCniQM-M26gk,9456
|
68
|
+
mg_pso_gui-0.1.240.dist-info/WHEEL,sha256=cVxcB9AmuTcXqmwrtPhNK88dr7IR_b6qagTj0UvIEbY,91
|
69
|
+
mg_pso_gui-0.1.240.dist-info/entry_points.txt,sha256=jg82VOFjR1XDGrchs1wJSCqKYE4Ozv12aBcCSp--koA,117
|
70
|
+
mg_pso_gui-0.1.240.dist-info/top_level.txt,sha256=y7JuS9xJN5YdxUsQ3PSVjN8MzQAnR146bP3ZN3PYWdE,9
|
71
|
+
mg_pso_gui-0.1.240.dist-info/RECORD,,
|
mgpsogui/gui/HomePage.py
CHANGED
@@ -262,8 +262,8 @@ class App(customtkinter.CTk):
|
|
262
262
|
|
263
263
|
self.steps_frame.clear()
|
264
264
|
self.steps_frame.render()
|
265
|
-
self.optimal_param_frame.clear()
|
266
|
-
self.optimal_param_frame.render()
|
265
|
+
#self.optimal_param_frame.clear()
|
266
|
+
#self.optimal_param_frame.render()
|
267
267
|
|
268
268
|
def open_new_window(self):
|
269
269
|
# Shell out and run ./main.py
|
@@ -313,8 +313,8 @@ class App(customtkinter.CTk):
|
|
313
313
|
self.calib_param_frame.clear()
|
314
314
|
self.calib_param_frame.render()
|
315
315
|
|
316
|
-
self.optimal_param_frame.clear()
|
317
|
-
self.optimal_param_frame.render()
|
316
|
+
#self.optimal_param_frame.clear()
|
317
|
+
#self.optimal_param_frame.render()
|
318
318
|
|
319
319
|
self.load_button.configure(text="Loaded!")
|
320
320
|
self.after(3000, lambda: self.load_button.configure(text="Load"))
|
mgpsogui/gui/OptionManager.py
CHANGED
@@ -87,9 +87,12 @@ class OptionManager():
|
|
87
87
|
|
88
88
|
def add_steps(self, steps):
|
89
89
|
for step in steps:
|
90
|
-
obj = {"param": [],
|
90
|
+
obj = {"param": [],
|
91
|
+
"overrideparam": [],
|
92
|
+
"objfunc": [],
|
93
|
+
"name": sv(),
|
94
|
+
"open": False}
|
91
95
|
obj["name"].set("Group " + str(len(self.steps) + 1))
|
92
|
-
obj["message"].set("Wow")
|
93
96
|
|
94
97
|
for param in step["param"]:
|
95
98
|
param_obj = {
|
@@ -130,6 +133,12 @@ class OptionManager():
|
|
130
133
|
|
131
134
|
obj["param"].append(param_obj)
|
132
135
|
|
136
|
+
for override in step["overrideparam"]:
|
137
|
+
override_obj = {"name": sv(), "value": sv()}
|
138
|
+
override_obj['name'].set(override['name'])
|
139
|
+
override_obj['value'].set(override['value'])
|
140
|
+
obj['overrideparam'].append(override_obj)
|
141
|
+
|
133
142
|
for objfunc in step["objfunc"]:
|
134
143
|
objfunc_obj = {"name": sv(),
|
135
144
|
"of": sv(),
|
@@ -231,6 +240,18 @@ class OptionManager():
|
|
231
240
|
def remove_bound(self, step_index, index):
|
232
241
|
self.steps[step_index]["param"].pop(index)
|
233
242
|
|
243
|
+
def add_override(self, step_index, name, value):
|
244
|
+
obj = {"name": sv(), "value": sv()}
|
245
|
+
obj["name"].set(name)
|
246
|
+
obj["value"].set(value)
|
247
|
+
self.steps[step_index]["overrideparam"].append(obj)
|
248
|
+
|
249
|
+
def remove_override(self, step_index, index):
|
250
|
+
self.steps[step_index]["overrideparam"].pop(index)
|
251
|
+
|
252
|
+
def get_override(self, step_index):
|
253
|
+
return self.steps[step_index]["overrideparam"]
|
254
|
+
|
234
255
|
def add_argument(self, key, value):
|
235
256
|
obj = {"name": sv(), "value": sv()}
|
236
257
|
obj["name"].set(key)
|
@@ -330,8 +351,7 @@ class OptionManager():
|
|
330
351
|
|
331
352
|
def get_steps(self):
|
332
353
|
return self.steps
|
333
|
-
|
334
|
-
|
354
|
+
|
335
355
|
def get_all_as_json(self):
|
336
356
|
obj = {"arguments": self.arguments, "steps": self.steps}
|
337
357
|
return obj
|
@@ -135,13 +135,13 @@ def create_tab(self, tab):
|
|
135
135
|
|
136
136
|
"""
|
137
137
|
|
138
|
-
self.service_param_frame = spv.ServiceParametersView(tab, option_manager=self.option_manager)
|
138
|
+
self.service_param_frame = spv.ServiceParametersView(tab, option_manager=self.option_manager, label_text="Service Parameters")
|
139
139
|
self.service_param_frame.grid(row=0, column=0, padx=(20, 20), pady=(20, 20), sticky="nsew")
|
140
140
|
self.service_param_frame.grid_columnconfigure(0, weight=1)
|
141
141
|
self.service_param_frame.grid_rowconfigure(0, weight=1)
|
142
142
|
|
143
143
|
|
144
|
-
self.service_editor = customtkinter.CTkScrollableFrame(tab, label_text="Service
|
144
|
+
self.service_editor = customtkinter.CTkScrollableFrame(tab, label_text="Service Status")
|
145
145
|
self.service_editor.grid(row=0, column=1, padx=(20, 20), pady=(20, 20), sticky="nsew")
|
146
146
|
self.service_editor.grid_columnconfigure(0, weight=1)
|
147
147
|
self.service_editor.grid_rowconfigure(0, weight=1)
|
@@ -170,7 +170,7 @@ def create_tab(self, tab):
|
|
170
170
|
self.service_details = customtkinter.CTkTextbox(self.service_editor, height=480)
|
171
171
|
self.service_details.grid(row=8, column=0, padx=(20, 20), pady=(5, 5), sticky="ew")
|
172
172
|
|
173
|
-
self.environment_editor = customtkinter.CTkScrollableFrame(tab, label_text="Environment Editor")
|
173
|
+
self.environment_editor = customtkinter.CTkScrollableFrame(tab, label_text="Minikube Environment Editor")
|
174
174
|
self.environment_editor.grid(row=0, column=2, padx=(20, 20), pady=(20, 20), sticky="nsew")
|
175
175
|
self.environment_editor.grid_columnconfigure(0, weight=1)
|
176
176
|
self.environment_editor.grid_rowconfigure(0, weight=1)
|
@@ -34,9 +34,6 @@ class ServiceParametersView(CTkScrollableFrame):
|
|
34
34
|
self.containerFrame = CTkFrame(self)
|
35
35
|
self.containerFrame.grid(row=0, column=0, padx=(5, 5), pady=(5, 5), sticky="nsew")
|
36
36
|
self.containerFrame.grid_columnconfigure((0, 1), weight=1)
|
37
|
-
|
38
|
-
CTkLabel(self.containerFrame, text="Service Parameters").grid(row=row, column=0, columnspan=2, padx=5, pady=5, sticky="")
|
39
|
-
row += 1
|
40
37
|
|
41
38
|
CTkLabel(self.containerFrame, text="Name:").grid(row=row, column=0, columnspan=1, padx=5, pady=5, sticky="")
|
42
39
|
CTkLabel(self.containerFrame, text="Value:").grid(row=row, column=1, columnspan=1, padx=5, pady=5, sticky="")
|
@@ -132,8 +132,8 @@ class BoundsList(CTkFrame):
|
|
132
132
|
|
133
133
|
if (bound_type == "list"):
|
134
134
|
def button_click_event(bound_index):
|
135
|
-
|
136
|
-
print("Number:", dialog.get_input())
|
135
|
+
BEW(title="Edit List Bound", step_index=self.step_index, bound_index=bound_index, option_manager=self.option_manager)
|
136
|
+
#print("Number:", dialog.get_input())
|
137
137
|
|
138
138
|
open_window = lambda event=None, bound_index=index: (button_click_event(bound_index))
|
139
139
|
expand_image = CTkImage(Image.open(os.path.join("./images", "expand.png")), size=(20, 20))
|
@@ -0,0 +1,77 @@
|
|
1
|
+
from customtkinter import CTkScrollableFrame
|
2
|
+
from customtkinter import CTkFrame
|
3
|
+
from customtkinter import CTkLabel
|
4
|
+
from customtkinter import CTkButton
|
5
|
+
from customtkinter import CTkEntry
|
6
|
+
from customtkinter import CTkOptionMenu
|
7
|
+
import tkinter as tk
|
8
|
+
import subprocess
|
9
|
+
import platform
|
10
|
+
import os
|
11
|
+
|
12
|
+
global option_manager
|
13
|
+
|
14
|
+
class OverrideParameterMetrics(CTkScrollableFrame):
|
15
|
+
def __init__(self, *args,
|
16
|
+
option_manager: None,
|
17
|
+
step_index: 0,
|
18
|
+
**kwargs):
|
19
|
+
super().__init__(*args, **kwargs)
|
20
|
+
|
21
|
+
self.option_manager = option_manager
|
22
|
+
self.step_index = step_index
|
23
|
+
self.key_values = option_manager.get_override(step_index)
|
24
|
+
|
25
|
+
self.edit_mode = False
|
26
|
+
|
27
|
+
self.render()
|
28
|
+
|
29
|
+
def clear(self):
|
30
|
+
self.containerFrame.destroy()
|
31
|
+
|
32
|
+
def toggle_edit_mode(self):
|
33
|
+
self.clear()
|
34
|
+
self.edit_mode = not self.edit_mode
|
35
|
+
self.render()
|
36
|
+
|
37
|
+
def add_key(self, key="", value=""):
|
38
|
+
self.option_manager.add_override(self.step_index, key, value)
|
39
|
+
|
40
|
+
def remove_key(self, index):
|
41
|
+
self.option_manager.remove_override(self.step_index, index)
|
42
|
+
|
43
|
+
def render(self):
|
44
|
+
row = 0
|
45
|
+
index = 0
|
46
|
+
|
47
|
+
self.containerFrame = CTkFrame(self)
|
48
|
+
self.containerFrame.grid(row=0, column=0, padx=(5, 5), pady=(5, 5), sticky="nsew")
|
49
|
+
self.containerFrame.grid_columnconfigure((0, 1), weight=1)
|
50
|
+
|
51
|
+
CTkLabel(self.containerFrame, text="Name:").grid(row=row, column=0, columnspan=1, padx=5, pady=5, sticky="")
|
52
|
+
CTkLabel(self.containerFrame, text="Value:").grid(row=row, column=1, columnspan=1, padx=5, pady=5, sticky="")
|
53
|
+
row += 1
|
54
|
+
|
55
|
+
for key_value_pair in self.key_values:
|
56
|
+
CTkEntry(self.containerFrame, textvariable=self.key_values[index]["name"]).grid(row=row, column=0, padx=(5, 5), pady=(5, 5), sticky="ew")
|
57
|
+
|
58
|
+
|
59
|
+
if self.edit_mode:
|
60
|
+
return_func = lambda index=index: (self.clear(), self.remove_key(index), self.render())
|
61
|
+
CTkButton(self.containerFrame, text="Remove", command=return_func).grid(row=row, column=1, padx=(5, 5), pady=(5, 5), sticky="ew")
|
62
|
+
else:
|
63
|
+
bb = CTkEntry(self.containerFrame)
|
64
|
+
bb.grid(row=row, column=1, padx=(5, 5), pady=(5, 5), sticky="ew")
|
65
|
+
bb.configure(textvariable=self.key_values[index]["value"])
|
66
|
+
row += 1
|
67
|
+
index += 1
|
68
|
+
|
69
|
+
if self.edit_mode:
|
70
|
+
CTkButton(self.containerFrame, text="Exit", command=self.toggle_edit_mode).grid(row=row, column=0, padx=(5, 5), pady=(5, 5), sticky="ew")
|
71
|
+
else:
|
72
|
+
CTkButton(self.containerFrame, text="Edit", command=self.toggle_edit_mode).grid(row=row, column=0, padx=(5, 5), pady=(5, 5), sticky="ew")
|
73
|
+
|
74
|
+
add_key_func = lambda: (self.clear(), self.add_key(), self.render())
|
75
|
+
CTkButton(self.containerFrame, text="Add", command=add_key_func).grid(row=row, column=1, padx=(5, 5), pady=(5, 5), sticky="ew")
|
76
|
+
|
77
|
+
row += 1
|
@@ -0,0 +1,42 @@
|
|
1
|
+
from typing import Union, Tuple, Optional
|
2
|
+
|
3
|
+
from customtkinter import CTkLabel
|
4
|
+
from customtkinter import CTkButton
|
5
|
+
from customtkinter import CTkEntry
|
6
|
+
from customtkinter import CTkInputDialog
|
7
|
+
from .OverrideParameterMetrics import OverrideParameterMetrics as ListView
|
8
|
+
|
9
|
+
class OverrideParameterWindow(CTkInputDialog):
|
10
|
+
"""
|
11
|
+
Dialog with extra window, message, entry widget, cancel and ok button.
|
12
|
+
For detailed information check out the documentation.
|
13
|
+
"""
|
14
|
+
|
15
|
+
def __init__(self, *args,
|
16
|
+
step_index: 0,
|
17
|
+
function_index: 0,
|
18
|
+
option_manager: None,
|
19
|
+
**kwargs):
|
20
|
+
super().__init__(*args, **kwargs)
|
21
|
+
|
22
|
+
self.geometry("400x800")
|
23
|
+
|
24
|
+
self.step_index = step_index
|
25
|
+
self.function_index = function_index
|
26
|
+
self.option_manager = option_manager
|
27
|
+
self.bounds = None
|
28
|
+
|
29
|
+
def _create_widgets(self):
|
30
|
+
|
31
|
+
self.grid_columnconfigure((0, 1), weight=1)
|
32
|
+
self.rowconfigure(0, weight=1)
|
33
|
+
|
34
|
+
self.bounds = ListView(
|
35
|
+
self, step_index=self.step_index, option_manager=self.option_manager)
|
36
|
+
self.bounds.grid(row=0, column=0, columnspan=2, padx=(10, 10),
|
37
|
+
pady=(10, 10), sticky="nsew")
|
38
|
+
self.bounds.grid_columnconfigure(0, weight=1)
|
39
|
+
|
40
|
+
def _on_closing(self):
|
41
|
+
self.grab_release()
|
42
|
+
self.destroy()
|
@@ -12,8 +12,8 @@ def setup_refresh(self):
|
|
12
12
|
self.static_param_frame.destroy()
|
13
13
|
self.calib_param_frame.clear()
|
14
14
|
self.calib_param_frame.destroy()
|
15
|
-
self.optimal_param_frame.clear()
|
16
|
-
self.optimal_param_frame.destroy()
|
15
|
+
#self.optimal_param_frame.clear()
|
16
|
+
#self.optimal_param_frame.destroy()
|
17
17
|
self.steps_frame.clear()
|
18
18
|
self.steps_frame.destroy()
|
19
19
|
self.paramtabview.destroy()
|
@@ -6,6 +6,7 @@ from customtkinter import CTkEntry
|
|
6
6
|
from customtkinter import CTkTextbox
|
7
7
|
from customtkinter import CTkImage
|
8
8
|
from customtkinter import CTkOptionMenu
|
9
|
+
from .OverrideParameterWindow import OverrideParameterWindow as OPW
|
9
10
|
from PIL import Image
|
10
11
|
import os
|
11
12
|
|
@@ -135,13 +136,15 @@ class StepView(CTkScrollableFrame):
|
|
135
136
|
trash_image = CTkImage(Image.open(os.path.join("./images", "trash.png")), size=(20, 20))
|
136
137
|
expand_image = CTkImage(Image.open(os.path.join("./images", "expand.png")), size=(20, 20))
|
137
138
|
collapse_image = CTkImage(Image.open(os.path.join("./images", "collapse.png")), size=(20, 20))
|
139
|
+
override_image = CTkImage(Image.open(os.path.join("./images", "test.png")), size=(20, 20))
|
138
140
|
|
139
141
|
|
140
142
|
expand_func = lambda index=index: (self.clear(), self.option_manager.toggle_step_open(index), self.render())
|
141
143
|
up_func = lambda index=index: (self.clear(), self.option_manager.move_step_up(index), self.render())
|
142
144
|
down_func = lambda index=index: (self.clear(), self.option_manager.move_step_down(index), self.render())
|
143
145
|
remove_func = lambda index=index: (self.clear(), self.option_manager.remove_step(index), self.render())
|
144
|
-
|
146
|
+
open_override_window = lambda index=index: (OPW(title="Edit Override Parameters", step_index=index, option_manager=self.option_manager))
|
147
|
+
|
145
148
|
if (self.mode == "Optimization"):
|
146
149
|
button_container = CTkFrame(self.containerFrame, width=200)
|
147
150
|
button_container.grid(row=row, column=1, sticky="nse", padx=(10, 10), pady=(10, 10))
|
@@ -150,10 +153,11 @@ class StepView(CTkScrollableFrame):
|
|
150
153
|
|
151
154
|
CTkEntry(self.containerFrame, textvariable=step['name'], width=500).grid(row=row, column=0, padx=(20, 20), pady=(20, 20), sticky="nsw")
|
152
155
|
|
153
|
-
CTkButton(button_container, width=30, text=None, image=
|
154
|
-
CTkButton(button_container, width=30, text=None, image=
|
155
|
-
CTkButton(button_container, width=30, text=None, image=
|
156
|
-
CTkButton(button_container, width=30, text=None, image=
|
156
|
+
CTkButton(button_container, width=30, text=None, image=override_image, command=open_override_window).grid(row=0, column=0, padx=(10, 30), pady=(10, 10), sticky="nsew")
|
157
|
+
CTkButton(button_container, width=30, text=None, image=expand_image if not step['open'] else collapse_image, command=expand_func).grid(row=0, column=1, padx=(10, 10), pady=(10, 10), sticky="nsew")
|
158
|
+
CTkButton(button_container, width=30, text=None, image=up_image, state="disabled" if index==0 else "normal", fg_color="gray" if index==0 else None, command=up_func).grid(row=0, column=2, padx=(10, 10), pady=(10, 10), sticky="nsew")
|
159
|
+
CTkButton(button_container, width=30, text=None, image=down_image, state="disabled" if index==(len(self.steps)-1) else "normal", fg_color="gray" if index==(len(self.steps)-1) else None, command=down_func).grid(row=0, column=3, padx=(10, 10), pady=(10, 10), sticky="nsew")
|
160
|
+
CTkButton(button_container, width=30, text=None, image=trash_image, command=remove_func).grid(row=0, column=4, padx=(10, 10), pady=(10, 10), sticky="nsew")
|
157
161
|
|
158
162
|
row += 1
|
159
163
|
|
Binary file
|
File without changes
|
File without changes
|
File without changes
|