Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
Public Member Functions | List of all members
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
 Returns the number of rows (entries) in the model.
 
QVariant data (const QModelIndex &idx, int role=Qt::DisplayRole) const
 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

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

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: