Exemplo n.º 1
0
    def addPlotWidget(self, name, plotter, enabled=True):
        plot_widget = PlotWidget(name, plotter)
        plot_widget.customizationTriggered.connect(self.toggleCustomizeDialog)

        index = self._central_tab.addTab(plot_widget, name)
        self._plot_widgets.append(plot_widget)
        self._central_tab.setTabEnabled(index, enabled)
Exemplo n.º 2
0
    def addPlotWidget(self, name, plotFunction, data_gatherers, enabled=True):
        plot_condition_function_list = [data_gatherer.canGatherDataForKey for data_gatherer in data_gatherers]
        plot_widget = PlotWidget(name, plotFunction, plot_condition_function_list, self.createPlotContext)
        plot_widget.customizationTriggered.connect(self.toggleCustomizeDialog)

        index = self._central_tab.addTab(plot_widget, name)
        self._plot_widgets.append(plot_widget)
        self._central_tab.setTabEnabled(index, enabled)
Exemplo n.º 3
0
    def addPlotWidget(self, name, plotFunction, data_gatherers, enabled=True):
        plot_condition_function_list = [
            data_gatherer.canGatherDataForKey
            for data_gatherer in data_gatherers
        ]
        plot_widget = PlotWidget(name, plotFunction,
                                 plot_condition_function_list,
                                 self.createPlotContext)

        index = self.__central_tab.addTab(plot_widget, name)
        self.__plot_widgets.append(plot_widget)
        self.__central_tab.setTabEnabled(index, enabled)