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

Method buildMarker

gui/src/plotchannel.cpp:152–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

150QList<QwtPlotMarker *> PlotChannel::markers() { return m_markers; }
151
152QwtPlotMarker *PlotChannel::buildMarker(QString str, QwtSymbol::Style shape, double x, double y)
153{
154 QwtPlotMarker *m = new QwtPlotMarker();
155
156 QBrush brush;
157 brush.setColor(m_pen.color());
158 brush.setStyle(Qt::SolidPattern);
159
160 m->setSymbol(new QwtSymbol(shape, brush, m_pen, QSize(12, 12)));
161 m->setLinePen(m_pen);
162 QwtText txt(str);
163 txt.setColor(m_pen.color());
164 m->setLabel(txt);
165 m->setXAxis(m_xAxis->axisId());
166 m->setYAxis(m_yAxis->axisId());
167
168 m->setXValue(x);
169 m->setYValue(y);
170 Q_EMIT attachCurve(m_curve);
171 return m;
172}
173
174void PlotChannel::addMarker(QwtPlotMarker *m) { m_markers.append(m); }
175

Callers 1

drawTagsMethod · 0.80

Calls 8

setSymbolMethod · 0.80
axisIdMethod · 0.80
setColorMethod · 0.45
colorMethod · 0.45
setStyleMethod · 0.45
setLabelMethod · 0.45
setXAxisMethod · 0.45
setYAxisMethod · 0.45

Tested by

no test coverage detected