wireshark/ui/qt/models/url_link_delegate.h
Dario Lombardo 1af6e1f860 tap: add credentials tap.
This new tap collects credentials (username and paassword)
from the dissectors.

So far, few dissectors have been instrumented:
- http (basic auth)
- http (header auth)
- ftp
Others can be instrumented as well using the same technique.

Tshark has a new option (-z credentials) and Wireshark a new
"tools" menu: the documentation has been updated accordingly.

Change-Id: I2d0d96598c85bb3ea4fb5ec090dd8dc28b481fc9
Reviewed-on: https://code.wireshark.org/review/33453
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2019-06-26 07:09:54 +00:00

51 lines
1.1 KiB
C++

/* url_link_delegate.h
* Delegates for displaying links as links, including elide model
*
* Wireshark - Network traffic analyzer
* By Gerald Combs <gerald@wireshark.org>
* Copyright 1998 Gerald Combs
*
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#ifndef URL_LINK_DELEGATE_H
#define URL_LINK_DELEGATE_H
#include <QStyledItemDelegate>
#include <QStyleOptionViewItem>
#include <QModelIndex>
class QRegExp;
class UrlLinkDelegate : public QStyledItemDelegate
{
Q_OBJECT
public:
explicit UrlLinkDelegate(QObject *parent = Q_NULLPTR);
~UrlLinkDelegate();
// If pattern matches the string in column, render as a URL.
// Otherwise render as plain text.
void setColCheck(int column, QString &pattern);
protected:
virtual void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
private:
int re_col_;
QRegExp *url_re_;
};
#endif // URL_LINK_DELEGATE_H
/*
* Editor modelines
*
* Local Variables:
* c-basic-offset: 4
* tab-width: 8
* indent-tabs-mode: nil
* End:
*
* ex: set shiftwidth=4 tabstop=8 expandtab:
*/