Skip to content
Snippets Groups Projects
Commit d2171e06 authored by Ondrej Vysocky's avatar Ondrej Vysocky
Browse files

Merge branch 'dev' of code.it4i.cz:vys0053/SGS18-READEX into dev

parents 4c3d5c0c b51bbfad
No related branches found
No related tags found
No related merge requests found
......@@ -75,7 +75,7 @@ class Ui_TabWidget(object):
#csv_names[n] = item
for k, v in self.parameter_values_dic.items():
self.parameter_values_dic[k] = sorted(list(set(v)))
self.parameter_values_dic[k] = sorted(list(set(v)), reverse=True)
measurement_info_path = Path(self.data_path + '/measurementInfo.json')
if measurement_info_path.exists():
......@@ -491,7 +491,7 @@ class Ui_TabWidget(object):
self.comboBox_time.activated.connect(self.__combo_time_energy)
self.comboBox_energy.activated.connect(self.__combo_time_energy)
self.comboBox_opt_settings_list=[self.comboBox_NumThreads, self.comboBox_UncoreFreq, self.comboBox_CoreFreq]
self.comboBox_opt_settings_list=[self.comboBox_CoreFreq, self.comboBox_UncoreFreq, self.comboBox_NumThreads]
func_list = []
for i, e in enumerate(self.comboBox_opt_settings_list):
func_list.append((lambda tmp: lambda: self.__combo_opt_settings(self.comboBox_opt_settings_list[tmp]))(i))
......@@ -701,7 +701,7 @@ class Ui_TabWidget(object):
self.__refresh_opt_combos()
def __combo_opt_settings(self, current_combo_box):
selected_item=current_combo_box.currentText()
selected_item = current_combo_box.currentText()
if self.current_opt_items_dic[selected_item] != current_combo_box:
tmp_key = None
......@@ -725,12 +725,31 @@ class Ui_TabWidget(object):
self.__refresh_opt_combos()
def __generate_btn(self):
user_input_error = False
if not self.current_labels_dic['xLabel']:
print("xLabel is not specified. One of parameters must be xLabel.")
return
print("USER INPUT ERROR: xLabel is not specified. One of parameters must be xLabel.")
user_input_error = True
if not self.current_labels_dic['funcLabel']:
print("funcLabel is not specified. One of parameters must be funcLabel.")
print("USER INPUT ERROR: funcLabel is not specified. One of parameters must be funcLabel.")
user_input_error = True
if len(self.selected_y_labels) == 0:
print("USER INPUT ERROR: yLabel is not specified. Atleast one yLabel must be checked.")
user_input_error = True
if self.checkBox_GenerateOptSettingFile.isChecked():
param_selected = False
for combo_box in self.comboBox_opt_settings_list:
if combo_box.currentText():
param_selected = True
break
if not param_selected:
print("USER INPUT ERROR: While generating optimal settings file, atleast one parameter role must be specified.")
user_input_error = True
if user_input_error:
print("Please check USER INPUT ERRORS and try to generate config file again.")
return
dlg = QtWidgets.QFileDialog()
......@@ -739,7 +758,7 @@ class Ui_TabWidget(object):
if not save_file_path.endswith('.py') and save_file_path:
save_file_path = save_file_path + '.py'
if save_file_path:
print('saving config to file: ' + save_file_path)
print('saved config to file: ' + save_file_path)
self.__create_config(save_file_path)
else:
print('Error: You must enter filename!')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment