Wireshark 4.7.3
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
PluginIfTypeModel Class Reference

List model that exposes a collection of PluginIfType entries to Qt views. More...

#include <pluginifdemo_main.h>

Inheritance diagram for PluginIfTypeModel:

Public Member Functions

 PluginIfTypeModel (QObject *parent=0)
 Constructs an empty PluginIfTypeModel.
void addPluginIfType (const PluginIfType &pluginIfType)
 Appends a PluginIfType entry to the model.
int rowCount (const QModelIndex &parent=QModelIndex()) const override
 Returns the number of rows (entries) in the model.
QVariant data (const QModelIndex &idx, int role=Qt::DisplayRole) const override
 Returns data for the given index and role.

Detailed Description

List model that exposes a collection of PluginIfType entries to Qt views.

Constructor & Destructor Documentation

◆ PluginIfTypeModel()

PluginIfTypeModel::PluginIfTypeModel ( QObject * parent = 0)

Constructs an empty PluginIfTypeModel.

Parameters
parentOptional parent QObject.

Member Function Documentation

◆ addPluginIfType()

void PluginIfTypeModel::addPluginIfType ( const PluginIfType & pluginIfType)

Appends a PluginIfType entry to the model.

Parameters
pluginIfTypeThe entry to append.

◆ data()

QVariant PluginIfTypeModel::data ( const QModelIndex & idx,
int role = Qt::DisplayRole ) const
override

Returns data for the given index and role.

Parameters
idxModel index of the requested item.
roleQt item data role (e.g. Qt::DisplayRole).
Returns
QVariant containing the requested data, or an invalid QVariant if unavailable.

◆ rowCount()

int PluginIfTypeModel::rowCount ( const QModelIndex & parent = QModelIndex()) const
override

Returns the number of rows (entries) in the model.

Parameters
parentUnused; pass a default QModelIndex for list models.
Returns
Number of PluginIfType entries currently held.

The documentation for this class was generated from the following files: