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

A model managing a list of fileset entries for UI display. More...

#include <fileset_entry_model.h>

Inheritance diagram for FilesetEntryModel:

Public Member Functions

 FilesetEntryModel (QObject *parent=0)
 Constructs a new FilesetEntryModel.
QModelIndex index (int row, int column, const QModelIndex &=QModelIndex()) const override
 Generates an index for the given row and column.
virtual QModelIndex parent (const QModelIndex &) const override
 Retrieves the parent of a given index. Everything is under the root.
virtual int rowCount (const QModelIndex &parent=QModelIndex()) const override
 Returns the number of rows under a given parent.
virtual int columnCount (const QModelIndex &) const override
 Returns the number of columns under a given parent.
virtual QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const override
 Retrieves data from the model for a given index and role.
virtual QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
 Retrieves the header data for a specific section and role.
virtual void appendEntry (const fileset_entry *entry)
 Appends a new entry to the fileset model.
const fileset_entrygetRowEntry (int row) const
 Retrieves the fileset entry at a specific row.
int entryCount () const
 Retrieves the total number of entries in the model.
void clear ()
 Calls fileset_delete and clears our model data.

Detailed Description

A model managing a list of fileset entries for UI display.

Constructor & Destructor Documentation

◆ FilesetEntryModel()

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

Constructs a new FilesetEntryModel.

Parameters
parentThe parent QObject, defaults to 0.

Member Function Documentation

◆ appendEntry()

void FilesetEntryModel::appendEntry ( const fileset_entry * entry)
virtual

Appends a new entry to the fileset model.

Parameters
entryPointer to the fileset entry to add.

◆ columnCount()

virtual int FilesetEntryModel::columnCount ( const QModelIndex & ) const
inlineoverridevirtual

Returns the number of columns under a given parent.

Returns
The number of columns.

◆ data()

QVariant FilesetEntryModel::data ( const QModelIndex & index,
int role = Qt::DisplayRole ) const
overridevirtual

Retrieves data from the model for a given index and role.

Parameters
indexThe model index.
roleThe data role requested (defaults to Qt::DisplayRole).
Returns
The data associated with the index and role.

◆ entryCount()

int FilesetEntryModel::entryCount ( ) const
inline

Retrieves the total number of entries in the model.

Returns
The entry count.

◆ getRowEntry()

const fileset_entry * FilesetEntryModel::getRowEntry ( int row) const
inline

Retrieves the fileset entry at a specific row.

Parameters
rowThe row index.
Returns
Pointer to the fileset entry, or NULL if not found.

◆ headerData()

QVariant FilesetEntryModel::headerData ( int section,
Qt::Orientation orientation,
int role = Qt::DisplayRole ) const
overridevirtual

Retrieves the header data for a specific section and role.

Parameters
sectionThe column or row section.
orientationThe orientation of the header.
roleThe data role requested (defaults to Qt::DisplayRole).
Returns
The header data.

◆ index()

QModelIndex FilesetEntryModel::index ( int row,
int column,
const QModelIndex & = QModelIndex() ) const
override

Generates an index for the given row and column.

Parameters
rowThe row index.
columnThe column index.
Returns
The corresponding model index.

◆ parent()

virtual QModelIndex FilesetEntryModel::parent ( const QModelIndex & ) const
inlineoverridevirtual

Retrieves the parent of a given index. Everything is under the root.

Returns
An invalid QModelIndex since all items are top-level.

◆ rowCount()

int FilesetEntryModel::rowCount ( const QModelIndex & parent = QModelIndex()) const
overridevirtual

Returns the number of rows under a given parent.

Parameters
parentThe parent model index (defaults to an invalid QModelIndex).
Returns
The number of rows.

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