Wireshark 5.1.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
tag_column_delegate.h
1/* tag_column_delegate.h
2 *
3 * Delegate for COL_TAG packet list column
4 * Copyright 2026, Mark Stout <[email protected]>
5 *
6 * Wireshark - Network traffic analyzer
7 * By Gerald Combs <[email protected]>
8 * Copyright 1998 Gerald Combs
9 *
10 * SPDX-License-Identifier: GPL-2.0-or-later
11 */
12
13#ifndef TAG_COLUMN_DELEGATE_H
14#define TAG_COLUMN_DELEGATE_H
15
16#include <config.h>
17
18#include <QStyledItemDelegate>
19
20class QPainter;
21
22class TagColumnDelegate : public QStyledItemDelegate
23{
24 Q_OBJECT
25
26public:
27 explicit TagColumnDelegate(QWidget *parent = nullptr);
28
37 void paintContent(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
38
39protected:
40 void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
41 QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override;
42 bool editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index) override;
43};
44
45#endif // TAG_COLUMN_DELEGATE_H
void paintContent(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
Paint only the tag content (emoji/text), no background fill.
Definition tag_column_delegate.cpp:153