def _do_add_new_plot(self, plot_area_name):
def remove():
self._plot_containers.remove(plc)
plc = PlotContainerWidget(self, PLOT_AREAS[plot_area_name], self._active_data_types)
plc.on_close = remove
self._plot_containers.append(plc)
docks = [
Qt.LeftDockWidgetArea,
Qt.LeftDockWidgetArea,
Qt.RightDockWidgetArea,
Qt.RightDockWidgetArea,
]
dock_to = docks[(len(self._plot_containers) - 1) % len(docks)]
self.addDockWidget(dock_to, plc)
if len(self._plot_containers) > 1:
self.statusBar().showMessage('Drag plots by the header to rearrange or detach them')
评论列表
文章目录