A tree model managing the list of all standard and heuristic protocols.
More...
#include <enabled_protocols_model.h>
|
| | EnabledProtocolsModel (QObject *parent=Q_NULLPTR) |
| | Constructs a new EnabledProtocolsModel.
|
| |
|
virtual | ~EnabledProtocolsModel () |
| | Destroys the EnabledProtocolsModel.
|
| |
| QModelIndex | index (int row, int column, const QModelIndex &parent=QModelIndex()) const |
| | Generates an index for the given row and column.
|
| |
| QModelIndex | parent (const QModelIndex &index) const |
| | Retrieves the parent of a given index.
|
| |
| Qt::ItemFlags | flags (const QModelIndex &index) const |
| | Retrieves the item flags for a given index.
|
| |
| QVariant | data (const QModelIndex &index, int role) const |
| | Retrieves data from the model for a given index and role.
|
| |
| bool | setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) |
| | Sets data in the model for a given index and role.
|
| |
| QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const |
| | Retrieves the header data for a specific section and role.
|
| |
| int | rowCount (const QModelIndex &parent=QModelIndex()) const |
| | Returns the number of rows under a given parent.
|
| |
| int | columnCount (const QModelIndex &parent=QModelIndex()) const |
| | Returns the number of columns under a given parent.
|
| |
|
void | populate () |
| | Populates the model with protocols from the core engine.
|
| |
| void | applyChanges (bool writeChanges=true) |
| | Applies pending changes to the core protocol definitions.
|
| |
|
| static void | saveChanges (bool writeChanges=true) |
| | Triggers the core mechanism to save protocol changes.
|
| |
A tree model managing the list of all standard and heuristic protocols.
◆ EnabledProtocolsColumn
Enumerates the columns for the enabled protocols model.
| Enumerator |
|---|
| colProtocol | Protocol name column.
|
| colDescription | Protocol description column.
|
| colLast | End of columns marker.
|
◆ EnableProtocolData
Enumerates the custom data roles for the enabled protocols model.
| Enumerator |
|---|
| DATA_ENABLE | Role to access the enable state.
|
| DATA_PROTOCOL_TYPE | Role to access the protocol type.
|
◆ EnabledProtocolsModel()
| EnabledProtocolsModel::EnabledProtocolsModel |
( |
QObject * |
parent = Q_NULLPTR | ) |
|
|
explicit |
◆ applyChanges()
| void EnabledProtocolsModel::applyChanges |
( |
bool |
writeChanges = true | ) |
|
Applies pending changes to the core protocol definitions.
- Parameters
-
| writeChanges | True to write changes out to the configuration file (defaults to true). |
◆ columnCount()
| int EnabledProtocolsModel::columnCount |
( |
const QModelIndex & |
parent = QModelIndex() | ) |
const |
Returns the number of columns under a given parent.
- Parameters
-
| parent | The parent model index (defaults to an invalid QModelIndex). |
- Returns
- The number of columns.
◆ data()
| QVariant EnabledProtocolsModel::data |
( |
const QModelIndex & |
index, |
|
|
int |
role |
|
) |
| const |
Retrieves data from the model for a given index and role.
- Parameters
-
| index | The model index. |
| role | The data role requested. |
- Returns
- The data associated with the index and role.
◆ disableProtocol()
| void EnabledProtocolsModel::disableProtocol |
( |
struct _protocol * |
protocol | ) |
|
|
static |
Disables a specific protocol directly in the core.
- Parameters
-
| protocol | Pointer to the core protocol structure. |
◆ flags()
| Qt::ItemFlags EnabledProtocolsModel::flags |
( |
const QModelIndex & |
index | ) |
const |
Retrieves the item flags for a given index.
- Parameters
-
- Returns
- The item flags.
◆ headerData()
| QVariant EnabledProtocolsModel::headerData |
( |
int |
section, |
|
|
Qt::Orientation |
orientation, |
|
|
int |
role = Qt::DisplayRole |
|
) |
| const |
Retrieves the header data for a specific section and role.
- Parameters
-
| section | The column or row section. |
| orientation | The orientation of the header. |
| role | The data role requested (defaults to Qt::DisplayRole). |
- Returns
- The header data.
◆ index()
| QModelIndex EnabledProtocolsModel::index |
( |
int |
row, |
|
|
int |
column, |
|
|
const QModelIndex & |
parent = QModelIndex() |
|
) |
| const |
Generates an index for the given row and column.
- Parameters
-
| row | The row index. |
| column | The column index. |
| parent | The parent index (defaults to an invalid QModelIndex). |
- Returns
- The corresponding model index.
◆ parent()
| QModelIndex EnabledProtocolsModel::parent |
( |
const QModelIndex & |
index | ) |
const |
Retrieves the parent of a given index.
- Parameters
-
| index | The child model index. |
- Returns
- The parent model index.
◆ rowCount()
| int EnabledProtocolsModel::rowCount |
( |
const QModelIndex & |
parent = QModelIndex() | ) |
const |
Returns the number of rows under a given parent.
- Parameters
-
| parent | The parent model index (defaults to an invalid QModelIndex). |
- Returns
- The number of rows.
◆ saveChanges()
| void EnabledProtocolsModel::saveChanges |
( |
bool |
writeChanges = true | ) |
|
|
staticprotected |
Triggers the core mechanism to save protocol changes.
- Parameters
-
| writeChanges | True to save to disk (defaults to true). |
◆ setData()
| bool EnabledProtocolsModel::setData |
( |
const QModelIndex & |
index, |
|
|
const QVariant & |
value, |
|
|
int |
role = Qt::EditRole |
|
) |
| |
Sets data in the model for a given index and role.
- Parameters
-
| index | The model index to update. |
| value | The value to set. |
| role | The role being edited (defaults to Qt::EditRole). |
- Returns
- True if successful, false otherwise.
The documentation for this class was generated from the following files:
- /builds/wireshark/wireshark/ui/qt/models/enabled_protocols_model.h
- /builds/wireshark/wireshark/ui/qt/models/enabled_protocols_model.cpp