Wireshark 4.5.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
credentials_model.h
Go to the documentation of this file.
1
12#ifndef CREDENTIALS_MODELS_H
13#define CREDENTIALS_MODELS_H
14
15#include <QAbstractListModel>
16#include <QList>
17
18#include <epan/tap.h>
19#include <capture_file.h>
20#include <ui/tap-credentials.h>
21
22class CredentialsModel : public QAbstractListModel
23{
24 Q_OBJECT
25
26public:
27 CredentialsModel(QObject *parent);
29 virtual int rowCount(const QModelIndex &parent = QModelIndex()) const ;
30 virtual int columnCount(const QModelIndex &parent = QModelIndex()) const;
31 virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
32 virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
33
34 void addRecord(const tap_credential_t *rec);
35 void clear();
36
37 enum {
38 COL_NUM,
39 COL_PROTO,
40 COL_USERNAME,
41 COL_INFO
42 };
43
44 enum {
45 ColumnHFID = Qt::UserRole + 1
46 };
47
48private:
49 QList<tap_credential_t*> credentials_;
50
51};
52
53#endif // CREDENTIALS_MODELS_H
Definition credentials_model.h:23
Definition tap-credentials.h:18