![Roland Knall](/assets/img/avatar_default.png)
Rewrite of the about dialog, to use QTableView and Models instead of HTML files. Everything is now model based, and the model is generic enough to support any variation which can be put into a QStringList row. Change-Id: Ie32bf66b2fe2a7754c0bf07205a7b068d46b0070 Reviewed-on: https://code.wireshark.org/review/24534 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
49 lines
1 KiB
C++
49 lines
1 KiB
C++
/* html_text_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+
|
|
*/
|
|
|
|
#ifndef HTML_TEXT_DELEGATE_H
|
|
#define HTML_TEXT_DELEGATE_H
|
|
|
|
#include <config.h>
|
|
|
|
#include <QWidget>
|
|
#include <QStyledItemDelegate>
|
|
#include <QStyleOptionViewItem>
|
|
#include <QModelIndex>
|
|
#include <QAbstractItemModel>
|
|
|
|
class HTMLTextDelegate : public QStyledItemDelegate
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit HTMLTextDelegate(QObject *parent = Q_NULLPTR);
|
|
|
|
protected:
|
|
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
|
|
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const;
|
|
|
|
|
|
};
|
|
#endif // HTML_TEXT_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:
|
|
* :indentSize=4:tabSize=8:noTabs=true:
|
|
*/
|