MailJD nbsp;·nbsp; Test Dashboard nbsp;·nbsp; Coverage
LCOV - code coverage report
Current view: top level - ui - LabelDelegate.h (source / functions) Coverage Total Hit
Test: MailJD Coverage (Unit + E2E) Lines: 100.0 % 1 1
Test Date: 2026-06-21 21:10:19 Functions: 100.0 % 1 1
Legend: Lines:     hit not hit

            Line data    Source code
       1              : #pragma once
       2              : 
       3              : #include <QStyledItemDelegate>
       4              : 
       5              : // LabelDelegate renders the Subject column with colored label chips.
       6              : // Labels (IMAP keywords) are drawn as small colored badges after the subject
       7              : // text. Mails without labels render normally.
       8              : class LabelDelegate : public QStyledItemDelegate {
       9            3 :   Q_OBJECT
      10              : 
      11              : public:
      12              :   explicit LabelDelegate(QObject *parent = nullptr);
      13              : 
      14              :   void paint(QPainter *painter, const QStyleOptionViewItem &option,
      15              :              const QModelIndex &index) const override;
      16              : 
      17              :   QSize sizeHint(const QStyleOptionViewItem &option,
      18              :                  const QModelIndex &index) const override;
      19              : 
      20              :   // Label color and display name (also used by MailView)
      21              :   static QColor colorForLabel(const QString &label);
      22              :   static QString displayName(const QString &label);
      23              : };
        

Generated by: LCOV version 2.0-1