diff --git a/pytec/tec_qt.py b/pytec/tec_qt.py index bfa362b..05913bc 100644 --- a/pytec/tec_qt.py +++ b/pytec/tec_qt.py @@ -198,6 +198,11 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow): self.thermostat_settings.setMenu(self.menu) + clear = QtGui.QAction("Clear graphs", self.menu) + clear.triggered.connect(self.clear_graphs) + self.menu.addAction(clear) + self.menu.clear = clear + def _set_up_graphs(self): for graph in self.ch0_t_graph, self.ch0_i_graph, self.ch1_t_graph, self.ch1_i_graph: time_axis = LiveAxis('bottom', text="Time since Thermostat reset", **{Axis.TICK_FORMAT: Axis.DURATION})