MCPcopy Create free account
hub / github.com/analogdevicesinc/scopy / setupPlotInfo

Method setupPlotInfo

gui/src/plotwidget.cpp:260–277  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

258PlotButtonManager *PlotWidget::plotButtonManager() const { return m_plotButtonManager; }
259
260void PlotWidget::setupPlotInfo()
261{
262 m_plotInfo = new PlotInfo(m_plot->canvas());
263 m_plotInfo->addCustomInfo(new FPSInfo(this, this), InfoPosition::IP_LEFT);
264
265 HDivInfo *hDivInfo = new HDivInfo(this);
266 m_plotInfo->addCustomInfo(hDivInfo, InfoPosition::IP_LEFT);
267
268 if(!Preferences::GetInstance()->get("show_grid").toBool()) {
269 hDivInfo->hide();
270 }
271 connect(Preferences::GetInstance(), &Preferences::preferenceChanged, this,
272 [=](QString preference, QVariant value) {
273 if(preference == "show_grid") {
274 hDivInfo->setVisible(value.toBool());
275 }
276 });
277}
278
279void PlotWidget::setupPlotScales() { m_plotScales = new PlotScales(this); }
280

Callers

nothing calls this directly

Calls 5

canvasMethod · 0.80
addCustomInfoMethod · 0.80
connectFunction · 0.50
getMethod · 0.45
setVisibleMethod · 0.45

Tested by

no test coverage detected