| Wireshark 4.7.0 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
url_link_delegate.h
Go to the documentation of this file.
1
12#ifndef URL_LINK_DELEGATE_H
13#define URL_LINK_DELEGATE_H
14
15#include <QStyledItemDelegate>
16#include <QStyleOptionViewItem>
17#include <QModelIndex>
18#include <QRegularExpression>
19
20 class UrlLinkDelegate : public QStyledItemDelegate
21{
22 public:
23 explicit UrlLinkDelegate(QObject *parent = Q_NULLPTR);
24 ~UrlLinkDelegate();
25 // If pattern matches the string in column, render as a URL.
26 // Otherwise render as plain text.
27 void setColCheck(int column, QString &pattern);
28
29 protected:
30 virtual void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
31
32 private:
33 int re_col_;
34 QRegularExpression *url_re_;
35};
36#endif // URL_LINK_DELEGATE_H
UrlLinkDelegate
Definition url_link_delegate.h:21