| 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
23 class InfoProxyModel : public QIdentityProxyModel
24{
25 public:
30 explicit InfoProxyModel(QObject * parent = 0);
31
35 ~InfoProxyModel();
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
99 private:
100
101 int column_;
102
103 QStringList infos_;
104};
105
106#endif // INFO_PROXY_MODEL_H
InfoProxyModel::~InfoProxyModel
~InfoProxyModel()
Destroys the InfoProxyModel.
Definition info_proxy_model.cpp:23
InfoProxyModel::mapToSource
virtual QModelIndex mapToSource(const QModelIndex &proxyIndex) const override
Maps a proxy index to the corresponding source model index.
Definition info_proxy_model.cpp:85
InfoProxyModel::data
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::InfoProxyModel
InfoProxyModel(QObject *parent=0)
Constructs an InfoProxyModel.
Definition info_proxy_model.cpp:17
InfoProxyModel::rowCount
virtual int rowCount(const QModelIndex &parent=QModelIndex()) const override
Returns the number of rows under the given parent.
Definition info_proxy_model.cpp:39
InfoProxyModel::index
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
InfoProxyModel::setColumn
void setColumn(int column)
Sets the column used for displaying the information.
Definition info_proxy_model.cpp:101
InfoProxyModel::flags
virtual Qt::ItemFlags flags(const QModelIndex &index) const override
Returns the item flags for the given index.
Definition info_proxy_model.cpp:69
InfoProxyModel::appendInfo
void appendInfo(QString info)
Appends an information string to the model.
Definition info_proxy_model.cpp:28
InfoProxyModel::mapFromSource
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
InfoProxyModel::clearInfos
void clearInfos()
Clears all appended information strings.
Definition info_proxy_model.cpp:34
info
Definition file-pcapng.h:57