+void LogicSignal::paint_fore(QPainter &p, const RowItemPaintParams &pp)
+{
+ // Draw the trigger marker
+ if (!trigger_match_)
+ return;
+
+ const int y = get_visual_y();
+ const vector<int32_t> trig_types = get_trigger_types();
+ for (int32_t type_id : trig_types) {
+ const TriggerMatchType *const type =
+ TriggerMatchType::get(type_id);
+ if (trigger_match_ != type || type_id < 0 ||
+ (size_t)type_id >= countof(TriggerMarkerIcons) ||
+ !TriggerMarkerIcons[type_id])
+ continue;
+
+ const QPixmap *const pixmap = get_pixmap(
+ TriggerMarkerIcons[type_id]);
+ if (!pixmap)
+ continue;
+
+ const int pad = TriggerMarkerPadding;
+ const QSize size = pixmap->size();
+ const QPoint point(
+ pp.right() - size.width() - pad * 2,
+ y - (SignalHeight + size.height()) / 2);
+
+ p.setPen(QPen(Qt::NoPen));
+ p.setBrush(TriggerMarkerBackgroundColour);
+ p.drawRoundedRect(QRect(point, size).adjusted(
+ -pad, -pad, pad, pad), pad, pad);
+ p.drawPixmap(point, *pixmap);
+
+ break;
+ }
+}
+