Position in gridlayout for measurement_wgt_tab is now configurable from client json file
This commit is contained in:
@@ -263,7 +263,7 @@ class BaseWindow(QMainWindow):
|
|||||||
self.parent.add_to_hdf(dataH5, proc=True, raw=True)
|
self.parent.add_to_hdf(dataH5, proc=True, raw=True)
|
||||||
self.parent.hdf_save_completed = True
|
self.parent.hdf_save_completed = True
|
||||||
|
|
||||||
_mess = "Processed data saved to {}".format(
|
_mess = "Data saved to {}".format(
|
||||||
self.parent.hdf_filename)
|
self.parent.hdf_filename)
|
||||||
self.parent.trigger_log_message.emit(
|
self.parent.trigger_log_message.emit(
|
||||||
MsgSeverity.INFO.name, _pymodule, _line(), _mess,
|
MsgSeverity.INFO.name, _pymodule, _line(), _mess,
|
||||||
@@ -379,13 +379,17 @@ class BaseWindow(QMainWindow):
|
|||||||
def run(self):
|
def run(self):
|
||||||
"""Run thread
|
"""Run thread
|
||||||
"""
|
"""
|
||||||
print("RUN IN BASE CLASS", flush=True)
|
print("RUN ANLYSIS THREAD FROM WITHIN IN BASE CLASS", flush=True)
|
||||||
|
|
||||||
|
#Reset all_data fro parent
|
||||||
|
self.parent.all_data = None
|
||||||
|
|
||||||
all_dict = self.analysis_procedure.measure_and_analyze(
|
all_dict = self.analysis_procedure.measure_and_analyze(
|
||||||
self.input_parameters)
|
self.input_parameters)
|
||||||
|
|
||||||
|
|
||||||
# Emit results
|
# Emit results
|
||||||
if all_dict:
|
if all_dict is not None:
|
||||||
self.trigger_thread_event.emit(all_dict)
|
self.trigger_thread_event.emit(all_dict)
|
||||||
mess = self.messages['success']
|
mess = self.messages['success']
|
||||||
self.parent.trigger_log_message.emit(
|
self.parent.trigger_log_message.emit(
|
||||||
|
|||||||
+21
-4
@@ -421,10 +421,24 @@ class GUIFrame(QWidget):
|
|||||||
def init_measurement_tab_wgt(self):
|
def init_measurement_tab_wgt(self):
|
||||||
""" Add tabs to measurement widget
|
""" Add tabs to measurement widget
|
||||||
"""
|
"""
|
||||||
|
row_idx = 0
|
||||||
|
column_idx = 0
|
||||||
|
no_rows = 1
|
||||||
|
no_columns = 1
|
||||||
|
try:
|
||||||
|
layout_parameters = self.settings.data["MeasurementGridLayout"]
|
||||||
|
row_idx = layout_parameters[0]
|
||||||
|
column_idx = layout_parameters[1]
|
||||||
|
no_rows = layout_parameters[2]
|
||||||
|
no_columns = layout_parameters[3]
|
||||||
|
except KeyError:
|
||||||
|
pass
|
||||||
|
|
||||||
self.measurement_tab_wgt.setFont(self.font_gui)
|
self.measurement_tab_wgt.setFont(self.font_gui)
|
||||||
self.measurement_tab_wgt.addTab(self.operator_wgt, "Operator")
|
self.measurement_tab_wgt.addTab(self.operator_wgt, "Operator")
|
||||||
self.measurement_tab_wgt.addTab(self.expert_wgt, "Expert")
|
self.measurement_tab_wgt.addTab(self.expert_wgt, "Expert")
|
||||||
self.measurement_layout.addWidget(self.measurement_tab_wgt, 0, 0)
|
self.measurement_layout.addWidget(
|
||||||
|
self.measurement_tab_wgt, row_idx, column_idx, no_rows, no_columns)
|
||||||
|
|
||||||
def init_results_tab_wgt(self):
|
def init_results_tab_wgt(self):
|
||||||
""" Add canvas tabs for plots/results
|
""" Add canvas tabs for plots/results
|
||||||
@@ -1895,7 +1909,7 @@ class GUIFrame(QWidget):
|
|||||||
final_wgt.setLayout(final_lo)
|
final_wgt.setLayout(final_lo)
|
||||||
|
|
||||||
|
|
||||||
return final_wgt #qtab_widget #
|
return final_wgt, qtab_widget #
|
||||||
|
|
||||||
|
|
||||||
def pv_stacked_wgt(self, pvlist, title, default_value, key, object_name):
|
def pv_stacked_wgt(self, pvlist, title, default_value, key, object_name):
|
||||||
@@ -2691,6 +2705,7 @@ class GUIFrame(QWidget):
|
|||||||
label.setContentsMargins(5, 0, 0, 0)
|
label.setContentsMargins(5, 0, 0, 0)
|
||||||
|
|
||||||
line = None
|
line = None
|
||||||
|
qtab = None
|
||||||
|
|
||||||
#Add callbacksand actions
|
#Add callbacksand actions
|
||||||
if buddy == "QComboBox".upper():
|
if buddy == "QComboBox".upper():
|
||||||
@@ -2734,7 +2749,7 @@ class GUIFrame(QWidget):
|
|||||||
|
|
||||||
elif buddy == "QTabWidget".upper():
|
elif buddy == "QTabWidget".upper():
|
||||||
#print("buddy/label", buddy, label, key, value, flush=True)
|
#print("buddy/label", buddy, label, key, value, flush=True)
|
||||||
line = self.qtab_wgt(key, irow, wgt_grid)
|
line, qtab = self.qtab_wgt(key, irow, wgt_grid)
|
||||||
|
|
||||||
if self.grid_loc:
|
if self.grid_loc:
|
||||||
a = self.grid_loc[0]
|
a = self.grid_loc[0]
|
||||||
@@ -2758,7 +2773,9 @@ class GUIFrame(QWidget):
|
|||||||
print("Supported widgets are: {0}".format(wgt_list))
|
print("Supported widgets are: {0}".format(wgt_list))
|
||||||
pass
|
pass
|
||||||
|
|
||||||
if line is not None:
|
if qtab is not None:
|
||||||
|
self.line_sender_dict[key] = qtab
|
||||||
|
elif line is not None:
|
||||||
self.line_sender_dict[key] = line
|
self.line_sender_dict[key] = line
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user