MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / drawAnnotations_

Method drawAnnotations_

src/openms_gui/source/VISUAL/Painter1DBase.cpp:34–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32namespace OpenMS
33{
34 void Painter1DBase::drawAnnotations_(const LayerData1DBase* layer, QPainter& painter, Plot1DCanvas* canvas) const
35 {
36 const QColor col {QColor(String(layer->param.getValue("annotation_color").toString()).toQString())};
37 // 0: default pen; 1: selected pen
38 const QPen pen[2] = {col, col.lighter()};
39
40 for (const auto& c : layer->getCurrentAnnotations())
41 {
42 painter.setPen(pen[c->isSelected()]);
43 c->draw(canvas, painter, layer->flipped);
44 }
45 }
46
47 // ###############################
48 // ###### 1D Peak

Callers

nothing calls this directly

Calls 7

QColorClass · 0.85
isSelectedMethod · 0.80
StringClass · 0.50
toQStringMethod · 0.45
toStringMethod · 0.45
getValueMethod · 0.45
drawMethod · 0.45

Tested by

no test coverage detected