![Roland Knall](/assets/img/avatar_default.png)
- Fix an issue, where the url was opened twice on Linux - Make the filter case insensitive if so wished for - Allow the copy to either copy the selected column (just Copy) or copy the complete row, with tab separation - Move to QTreeView instead to make it similar to the rest of the tables Change-Id: Ie6064f2ad2014e24546553c5febe63358e2f69ec Reviewed-on: https://code.wireshark.org/review/24570 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Jim Young <jim.young.ws@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
51 lines
1.1 KiB
C++
51 lines
1.1 KiB
C++
/* url_link_delegate.cpp
|
|
* 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+
|
|
*/
|
|
|
|
#include <ui/qt/models/url_link_delegate.h>
|
|
|
|
#include <QComboBox>
|
|
#include <QEvent>
|
|
#include <QLineEdit>
|
|
#include <QPainter>
|
|
#include <QTextDocument>
|
|
#include <QRect>
|
|
#include <QStyledItemDelegate>
|
|
#include <QStyleOptionViewItem>
|
|
#include <QTextEdit>
|
|
|
|
UrlLinkDelegate::UrlLinkDelegate(QObject *parent)
|
|
: QStyledItemDelegate(parent)
|
|
{}
|
|
|
|
void UrlLinkDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const {
|
|
QStyleOptionViewItem options = option;
|
|
initStyleOption(&options, index);
|
|
|
|
QStyleOptionViewItem opt = option;
|
|
initStyleOption(&opt, index);
|
|
|
|
opt.font.setUnderline(true);
|
|
|
|
QStyledItemDelegate::paint(painter, opt, index);
|
|
}
|
|
|
|
/*
|
|
* Editor modelines
|
|
*
|
|
* Local Variables:
|
|
* c-basic-offset: 4
|
|
* tab-width: 8
|
|
* indent-tabs-mode: nil
|
|
* End:
|
|
*
|
|
* ex: set shiftwidth=4 tabstop=8 expandtab:
|
|
* :indentSize=4:tabSize=8:noTabs=true:
|
|
*/
|