Kerberos: add kerberos_inject_longterm_key() helper function
[wireshark-sm.git] / ui / qt / models / info_proxy_model.h
blobf9775b4d10a118ae2331ad899484823b5c4a9b1f
1 /** @file
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
15 #include <config.h>
17 #include <QStringList>
18 #include <QIdentityProxyModel>
20 class InfoProxyModel : public QIdentityProxyModel
22 public:
23 explicit InfoProxyModel(QObject * parent = 0);
24 ~InfoProxyModel();
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);
36 void clearInfos();
38 void setColumn(int column);
40 private:
42 int column_;
44 QStringList infos_;
47 #endif // INFO_PROXY_MODEL_H