Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
Public Member Functions | List of all members
InfoProxyModel Class Reference

Proxy model that appends additional information rows to a source model. More...

#include <info_proxy_model.h>

Inheritance diagram for InfoProxyModel:

Public Member Functions

 InfoProxyModel (QObject *parent=0)
 Constructs an InfoProxyModel.
 
 ~InfoProxyModel ()
 Destroys the InfoProxyModel.
 
virtual int rowCount (const QModelIndex &parent=QModelIndex()) const
 Returns the number of rows under the given parent.
 
virtual QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const
 Returns the data stored under the given role for the item referred to by the index.
 
virtual Qt::ItemFlags flags (const QModelIndex &index) const
 Returns the item flags for the given index.
 
virtual QModelIndex index (int row, int column, const QModelIndex &parent=QModelIndex()) const
 Returns the index of the item in the model specified by the given row, column and parent index.
 
virtual QModelIndex mapToSource (const QModelIndex &proxyIndex) const
 Maps a proxy index to the corresponding source model index.
 
virtual QModelIndex mapFromSource (const QModelIndex &fromIndex) const
 Maps a source model index to the corresponding proxy model index.
 
void appendInfo (QString info)
 Appends an information string to the model.
 
void clearInfos ()
 Clears all appended information strings.
 
void setColumn (int column)
 Sets the column used for displaying the information.
 

Detailed Description

Proxy model that appends additional information rows to a source model.

Constructor & Destructor Documentation

◆ InfoProxyModel()

InfoProxyModel::InfoProxyModel ( QObject *  parent = 0)
explicit

Constructs an InfoProxyModel.

Parameters
parentThe parent object.

Member Function Documentation

◆ appendInfo()

void InfoProxyModel::appendInfo ( QString  info)

Appends an information string to the model.

Parameters
infoThe information string to append.

◆ data()

QVariant InfoProxyModel::data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const
virtual

Returns the data stored under the given role for the item referred to by the index.

Parameters
indexThe model index.
roleThe item role.
Returns
The data for the specified role.

◆ flags()

Qt::ItemFlags InfoProxyModel::flags ( const QModelIndex &  index) const
virtual

Returns the item flags for the given index.

Parameters
indexThe model index.
Returns
The item flags.

◆ index()

QModelIndex InfoProxyModel::index ( int  row,
int  column,
const QModelIndex &  parent = QModelIndex() 
) const
virtual

Returns the index of the item in the model specified by the given row, column and parent index.

Parameters
rowThe row number.
columnThe column number.
parentThe parent model index.
Returns
The created model index.

◆ mapFromSource()

QModelIndex InfoProxyModel::mapFromSource ( const QModelIndex &  fromIndex) const
virtual

Maps a source model index to the corresponding proxy model index.

Parameters
fromIndexThe source model index.
Returns
The proxy model index.

◆ mapToSource()

QModelIndex InfoProxyModel::mapToSource ( const QModelIndex &  proxyIndex) const
virtual

Maps a proxy index to the corresponding source model index.

Parameters
proxyIndexThe proxy model index.
Returns
The source model index.

◆ rowCount()

int InfoProxyModel::rowCount ( const QModelIndex &  parent = QModelIndex()) const
virtual

Returns the number of rows under the given parent.

Parameters
parentThe parent model index.
Returns
The row count including the appended information rows.

◆ setColumn()

void InfoProxyModel::setColumn ( int  column)

Sets the column used for displaying the information.

Parameters
columnThe column index.

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