fix merge conflicts

This commit is contained in:
stalbe_j
2023-01-24 10:53:02 +01:00
parent 89cc602175
commit c36e045e99

View File

@ -52,18 +52,16 @@ class MainWindow(QMainWindow):
self.setCentralWidget(splitter)
self.rst = rst = RPCServerThread(host, port, doc_title_suffix=title)
self.rst = rst = rst.start()
self.rst = rst = rst.server.register_function(self.new_plot)
self.rst = rst = rst.server.register_function(self.append_data)
rst.start()
rst.server.register_function(self.new_plot)
rst.server.register_function(self.append_data)
self.sig_make_new_plot.connect(self.on_make_new_plot)
def keyPressEvent(self, event):
if event.key() == Qt.Key_F1:
self.webdoc.show()
# Remote API calls
def new_plot(self, name, cfg):
@ -84,7 +82,6 @@ class MainWindow(QMainWindow):
else:
item.set_alarm(True)
# Signal callbacks
def on_make_new_plot(self, *args, **kwargs):
@ -103,7 +100,6 @@ class MainWindow(QMainWindow):
else:
self.plot_multiple_items(selected)
# Plumbing
def plot_single_item(self, item):
@ -112,18 +108,17 @@ class MainWindow(QMainWindow):
self.activate_or_make_subwin(MDISubPlot, name, desc)
def plot_multiple_items(self, items):
#TODO: unset alarm status for all items?
# TODO: unset alarm status for all items?
pairs = ((i.key, i.value) for i in items)
names, descs = zip(*pairs)
name = " | ".join(names)
self.activate_or_make_subwin(MDISubMultiPlot, name, descs)
#TODO: the following two could be methods to MDIArea?
# TODO: the following two could be methods to MDIArea?
def activate_or_make_subwin(self, MDISubType, name, *args, **kwargs):
sub = self.mdi.findSubWindow(name)
if sub: #TODO check type? what to do for mismatches?
if sub: # TODO check type? what to do for mismatches?
self.mdi.setActiveSubWindow(sub)
else:
self.make_subwin(MDISubType, name, *args, **kwargs)
@ -131,6 +126,3 @@ class MainWindow(QMainWindow):
def make_subwin(self, MDISubType, name, *args, **kwargs):
sub = MDISubType(name, *args, **kwargs)
self.mdi.add(sub)