MCPcopy Create free account
hub / github.com/PlotJuggler/PlotJuggler / setPlotWidget

Method setPlotWidget

pj_plotting/widget/src/DockWidget.cpp:152–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

150}
151
152void DockWidget::setPlotWidget(PlotWidget* plot) {
153 if (plot_widget_ == plot) {
154 return;
155 }
156 clearCurrentContent(true);
157 plot_widget_ = plot;
158 content_widget_ = plot_widget_;
159 if (plot_widget_ == nullptr) {
160 return;
161 }
162 plot_widget_->setDataServices(session_, catalog_);
163 setWidget(plot_widget_);
164 layout()->setContentsMargins(6, 6, 6, 6); // plots keep a margin; reset to flush in clearCurrentContent
165 connect(plot_widget_, &PlotWidget::splitHorizontal, this, [this]() { splitHorizontal(); });
166 connect(plot_widget_, &PlotWidget::splitVertical, this, [this]() { splitVertical(); });
167 connect(plot_widget_, &PlotWidget::undoableChange, this, &DockWidget::undoableChange);
168 emit plotWidgetCreated(plot_widget_);
169}
170
171void DockWidget::setObjectWidget(IDataWidget* widget) {
172 if (object_widget_ == widget) {

Callers 1

restoreNodeFunction · 0.80

Calls 1

setDataServicesMethod · 0.45

Tested by

no test coverage detected