Wireshark 2.9.0-477-g68ec514b The Wireshark network protocol analyzer

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

info_proxy_model.h
1 /* info_proxy_model.h
2 * Proxy model for displaying an info text at the end of any QAbstractListModel
3 *
4 * Wireshark - Network traffic analyzer
5 * By Gerald Combs <gerald@wireshark.org>
6 * Copyright 1998 Gerald Combs
7 *
8 * SPDX-License-Identifier: GPL-2.0-or-later
9 */
10
11 #ifndef INFO_PROXY_MODEL_H
12 #define INFO_PROXY_MODEL_H
13
14 #include <config.h>
15
16 #include <QStringList>
17 #include <QIdentityProxyModel>
18
19 class InfoProxyModel : public QIdentityProxyModel
20 {
21 Q_OBJECT
22
23 public:
24 explicit InfoProxyModel(QObject * parent = 0);
25 ~InfoProxyModel();
26
27 virtual int rowCount(const QModelIndex &parent = QModelIndex()) const;
28 virtual QVariant data (const QModelIndex &index, int role = Qt::DisplayRole) const;
29
30 virtual Qt::ItemFlags flags(const QModelIndex &index) const;
31 virtual QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;
32
33 virtual QModelIndex mapToSource(const QModelIndex &proxyIndex) const;
34 virtual QModelIndex mapFromSource(const QModelIndex &fromIndex) const;
35
36 void appendInfo(QString info);
37 void clearInfos();
38
39 void setColumn(int column);
40
41 private:
42
43 int column_;
44
45 QStringList infos_;
46 };
47
48 #endif // INFO_PROXY_MODEL_H
49
50 /*
51 * Editor modelines
52 *
53 * Local Variables:
54 * c-basic-offset: 4
55 * tab-width: 8
56 * indent-tabs-mode: nil
57 * End:
58 *
59 * ex: set shiftwidth=4 tabstop=8 expandtab:
60 * :indentSize=4:tabSize=8:noTabs=true:
61 */
info
Definition: file-pcapng.c:177
InfoProxyModel
Definition: info_proxy_model.h:19