interim save
This commit is contained in:
@ -1143,7 +1143,7 @@ class NMRMainWindow(QtWidgets.QMainWindow, Ui_BaseWindow):
|
||||
def show_tg_dialog(self):
|
||||
if self._tg_dialog is None:
|
||||
self._tg_dialog = TgCalculator(self.management, parent=self)
|
||||
self._tg_dialog.newTg.connect(self.management.addTg)
|
||||
self._tg_dialog.newData.connect(self.management.addTg)
|
||||
else:
|
||||
self._tg_dialog()
|
||||
self._tg_dialog.show()
|
||||
|
@ -773,24 +773,32 @@ class UpperManagement(QtCore.QObject):
|
||||
|
||||
self.newData.emit(new_data, self.current_graph)
|
||||
|
||||
@QtCore.pyqtSlot(dict)
|
||||
def addTg(self, dic1: dict):
|
||||
for k, (tg, lines) in dic1.items():
|
||||
p: ExperimentContainer = self[k]
|
||||
col = p.plot_real.linecolor
|
||||
@QtCore.pyqtSlot(dict, str)
|
||||
def addTg(self, dic1: dict, dtype: str):
|
||||
if dtype == 'tg':
|
||||
for k, (tg, lines) in dic1.items():
|
||||
p: ExperimentContainer = self[k]
|
||||
col = p.plot_real.linecolor
|
||||
|
||||
tg_data_id = []
|
||||
tg_data_id = []
|
||||
|
||||
if tg is not None:
|
||||
tg_data_id.append(self.add(tg, color=col))
|
||||
if tg is not None:
|
||||
tg_data_id.append(self.add(tg, color=col))
|
||||
|
||||
for line in lines:
|
||||
set_id = self.add(line, color=col)
|
||||
self[set_id].setLine(style=LineStyle.Dashed)
|
||||
self[set_id].setSymbol(symbol=SymbolStyle.No)
|
||||
tg_data_id.append(set_id)
|
||||
for line in lines:
|
||||
set_id = self.add(line, color=col)
|
||||
self[set_id].setLine(style=LineStyle.Dashed)
|
||||
self[set_id].setSymbol(symbol=SymbolStyle.No)
|
||||
tg_data_id.append(set_id)
|
||||
|
||||
self.newData.emit(tg_data_id, self.current_graph)
|
||||
self.newData.emit(tg_data_id, self.current_graph)
|
||||
|
||||
elif dtype == 'hodge':
|
||||
set_id_list = []
|
||||
graph_id = dic1.pop('graph')
|
||||
for v in dic1.values():
|
||||
set_id_list.append(self.add(v))
|
||||
self.newData.emit(set_id_list, graph_id)
|
||||
|
||||
@QtCore.pyqtSlot(int, dict)
|
||||
def smooth_data(self, npoints, param_kwargs):
|
||||
|
Reference in New Issue
Block a user