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

Method removeChannel

gui/src/widgets/plotlegend.cpp:108–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106}
107
108void PlotLegend::removeChannel(PlotChannel *ch)
109{
110 if(!m_entries.contains(ch)) {
111 return;
112 }
113
114 disconnect(ch, &PlotChannel::enabledChanged, this, &PlotLegend::updateStyles);
115 disconnect(ch, &PlotChannel::thicknessChanged, this, nullptr);
116 disconnect(ch, &PlotChannel::styleChanged, this, nullptr);
117 disconnect(ch, &PlotChannel::nameChanged, this, nullptr);
118
119 QWidget *entry = m_entries.take(ch);
120 m_labels.remove(ch);
121 m_colorLines.remove(ch);
122 m_legendLayout->removeWidget(entry);
123 entry->deleteLater();
124}
125
126void PlotLegend::updateStyles()
127{

Callers

nothing calls this directly

Calls 4

disconnectFunction · 0.85
containsMethod · 0.45
removeMethod · 0.45
removeWidgetMethod · 0.45

Tested by

no test coverage detected