A list model for managing and displaying extracted network credentials.
More...
#include <credentials_model.h>
|
| | CredentialsModel (QObject *parent) |
| | Constructs a new CredentialsModel.
|
| |
|
| ~CredentialsModel () |
| | Destroys the CredentialsModel.
|
| |
| virtual int | rowCount (const QModelIndex &parent=QModelIndex()) const |
| | Returns the number of rows (credentials) under the given parent.
|
| |
| virtual int | columnCount (const QModelIndex &parent=QModelIndex()) const |
| | Returns the number of columns (data fields) for a credential.
|
| |
| virtual QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const |
| | Retrieves data from the model for the given index and role.
|
| |
| virtual QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const |
| | Retrieves header data for the given section, orientation, and role.
|
| |
| void | addRecord (const tap_credential_t *rec) |
| | Adds a new credential record to the model.
|
| |
|
void | clear () |
| | Clears all credential records from the model.
|
| |
A list model for managing and displaying extracted network credentials.
◆ anonymous enum
Enumeration of column identifiers in the credentials model.
| Enumerator |
|---|
| COL_NUM | Column for the packet number.
|
| COL_PROTO | Column for the protocol name.
|
| COL_USERNAME | Column for the username.
|
| COL_INFO | Column for additional credential information.
|
◆ anonymous enum
Enumeration of custom roles used in the credentials model.
| Enumerator |
|---|
| ColumnHFID | Custom role for retrieving the header field ID.
|
◆ CredentialsModel()
| CredentialsModel::CredentialsModel |
( |
QObject * |
parent | ) |
|
◆ addRecord()
Adds a new credential record to the model.
- Parameters
-
| rec | Pointer to the core tap credential structure to add. |
◆ columnCount()
| int CredentialsModel::columnCount |
( |
const QModelIndex & |
parent = QModelIndex() | ) |
const |
|
virtual |
Returns the number of columns (data fields) for a credential.
- Parameters
-
| parent | The parent model index (defaults to an invalid QModelIndex). |
- Returns
- The number of columns.
◆ data()
| QVariant CredentialsModel::data |
( |
const QModelIndex & |
index, |
|
|
int |
role = Qt::DisplayRole |
|
) |
| const |
|
virtual |
Retrieves data from the model for the given index and role.
- Parameters
-
| index | The model index to retrieve data for. |
| role | The requested data role (defaults to Qt::DisplayRole). |
- Returns
- The data associated with the index and role.
◆ headerData()
| QVariant CredentialsModel::headerData |
( |
int |
section, |
|
|
Qt::Orientation |
orientation, |
|
|
int |
role = Qt::DisplayRole |
|
) |
| const |
|
virtual |
Retrieves header data for the given section, orientation, and role.
- Parameters
-
| section | The column or row section. |
| orientation | The orientation of the header. |
| role | The requested data role (defaults to Qt::DisplayRole). |
- Returns
- The header data.
◆ rowCount()
| int CredentialsModel::rowCount |
( |
const QModelIndex & |
parent = QModelIndex() | ) |
const |
|
virtual |
Returns the number of rows (credentials) under the given parent.
- Parameters
-
| parent | The parent model index (defaults to an invalid QModelIndex). |
- Returns
- The number of credential records.
The documentation for this class was generated from the following files:
- /builds/wireshark/wireshark/ui/qt/models/credentials_model.h
- /builds/wireshark/wireshark/ui/qt/models/credentials_model.cpp