Wireshark 4.7.3
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
info_proxy_model.h
Go to the documentation of this file.
1
11
12#ifndef INFO_PROXY_MODEL_H
13#define INFO_PROXY_MODEL_H
14
15#include <config.h>
16
17#include <QStringList>
18#include <QIdentityProxyModel>
19
23class InfoProxyModel : public QIdentityProxyModel
24{
25public:
30 explicit InfoProxyModel(QObject * parent = 0);
31
36
42 virtual int rowCount(const QModelIndex &parent = QModelIndex()) const override;
43
50 virtual QVariant data (const QModelIndex &index, int role = Qt::DisplayRole) const override;
51
57 virtual Qt::ItemFlags flags(const QModelIndex &index) const override;
58
66 virtual QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override;
67
73 virtual QModelIndex mapToSource(const QModelIndex &proxyIndex) const override;
74
80 virtual QModelIndex mapFromSource(const QModelIndex &fromIndex) const override;
81
86 void appendInfo(QString info);
87
91 void clearInfos();
92
97 void setColumn(int column);
98
99private:
100
101 int column_;
102
103 QStringList infos_;
104};
105
106#endif // INFO_PROXY_MODEL_H
~InfoProxyModel()
Destroys the InfoProxyModel.
Definition info_proxy_model.cpp:23
virtual QModelIndex mapToSource(const QModelIndex &proxyIndex) const override
Maps a proxy index to the corresponding source model index.
Definition info_proxy_model.cpp:85
virtual QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override
Returns the data stored under the given role for the item referred to by the index.
Definition info_proxy_model.cpp:44
InfoProxyModel(QObject *parent=0)
Constructs an InfoProxyModel.
Definition info_proxy_model.cpp:17
virtual int rowCount(const QModelIndex &parent=QModelIndex()) const override
Returns the number of rows under the given parent.
Definition info_proxy_model.cpp:39
virtual QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const override
Returns the index of the item in the model specified by the given row, column and parent index.
Definition info_proxy_model.cpp:77
void setColumn(int column)
Sets the column used for displaying the information.
Definition info_proxy_model.cpp:101
virtual Qt::ItemFlags flags(const QModelIndex &index) const override
Returns the item flags for the given index.
Definition info_proxy_model.cpp:69
void appendInfo(QString info)
Appends an information string to the model.
Definition info_proxy_model.cpp:28
virtual QModelIndex mapFromSource(const QModelIndex &fromIndex) const override
Maps a source model index to the corresponding proxy model index.
Definition info_proxy_model.cpp:96
void clearInfos()
Clears all appended information strings.
Definition info_proxy_model.cpp:34
Definition file-pcapng.h:57