Wireshark
2.9.0-477-g68ec514b
The Wireshark network protocol analyzer
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
ui
qt
models
url_link_delegate.h
1
/* url_link_delegate.h
2
* Delegates for displaying links as links, including elide model
3
*
4
* Wireshark - Network traffic analyzer
5
* By Gerald Combs <gerald@wireshark.org>
6
* Copyright 1998 Gerald Combs
7
*
8
* SPDX-License-Identifier: GPL-2.0-or-later
9
*/
10
11
#ifndef URL_LINK_DELEGATE_H
12
#define URL_LINK_DELEGATE_H
13
14
#include <QStyledItemDelegate>
15
#include <QStyleOptionViewItem>
16
#include <QModelIndex>
17
18
class
QRegExp;
19
20
class
UrlLinkDelegate
:
public
QStyledItemDelegate
21
{
22
Q_OBJECT
23
24
public
:
25
explicit
UrlLinkDelegate
(QObject *parent = Q_NULLPTR);
26
~
UrlLinkDelegate
();
27
// If pattern matches the string in column, render as a URL.
28
// Otherwise render as plain text.
29
void
setColCheck(
int
column, QString &pattern);
30
31
protected
:
32
void
paint(QPainter *painter,
const
QStyleOptionViewItem &
option
,
const
QModelIndex &index)
const
;
33
34
private
:
35
int
re_col_;
36
QRegExp *url_re_;
37
};
38
#endif // URL_LINK_DELEGATE_H
39
40
/*
41
* Editor modelines
42
*
43
* Local Variables:
44
* c-basic-offset: 4
45
* tab-width: 8
46
* indent-tabs-mode: nil
47
* End:
48
*
49
* ex: set shiftwidth=4 tabstop=8 expandtab:
50
*/
UrlLinkDelegate
Definition:
url_link_delegate.h:20
option
Definition:
pcapng.c:148
Generated by
1.8.11