| Wireshark 4.7.3 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
Public Member Functions | List of all members
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_entry * | getRowEntry (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

  parent | The 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

  entry | Pointer to the fileset entry to add.

## ◆ columnCount()

virtual int FilesetEntryModel::columnCount | ( | const QModelIndex & |  | ) | const
| inline override virtual

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
| override virtual

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

Parameters

  index | The model index.
  role | The 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

  row | The 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
| override virtual

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 FilesetEntryModel::index | ( | int | row,
|  | int | column,
|  | const QModelIndex & | = QModelIndex() ) const
| override

Generates an index for the given row and column.

Parameters

  row | The row index.
  column | The column index.

Returns
  The corresponding model index.

## ◆ parent()

virtual QModelIndex FilesetEntryModel::parent | ( | const QModelIndex & |  | ) | const
| inline override virtual

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
| override virtual

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.

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

- /builds/wireshark/wireshark/ui/qt/models/fileset_entry_model.h
- /builds/wireshark/wireshark/ui/qt/models/fileset_entry_model.cpp