3 * Proxy model for displaying an info text at the end of any QAbstractListModel
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 1998 Gerald Combs
9 * SPDX-License-Identifier: GPL-2.0-or-later
12 #ifndef INFO_PROXY_MODEL_H
13 #define INFO_PROXY_MODEL_H
17 #include <QStringList>
18 #include <QIdentityProxyModel>
20 class InfoProxyModel
: public QIdentityProxyModel
23 explicit InfoProxyModel(QObject
* parent
= 0);
26 virtual int rowCount(const QModelIndex
&parent
= QModelIndex()) const;
27 virtual QVariant
data (const QModelIndex
&index
, int role
= Qt::DisplayRole
) const;
29 virtual Qt::ItemFlags
flags(const QModelIndex
&index
) const;
30 virtual QModelIndex
index(int row
, int column
, const QModelIndex
&parent
= QModelIndex()) const;
32 virtual QModelIndex
mapToSource(const QModelIndex
&proxyIndex
) const;
33 virtual QModelIndex
mapFromSource(const QModelIndex
&fromIndex
) const;
35 void appendInfo(QString info
);
38 void setColumn(int column
);
47 #endif // INFO_PROXY_MODEL_H