A model managing a list of fileset entries for UI display.
More...
#include <fileset_entry_model.h>
|
| | FilesetEntryModel (QObject *parent=0) |
| | Constructs a new FilesetEntryModel.
|
| |
| QModelIndex | index (int row, int column, const QModelIndex &=QModelIndex()) const |
| | Generates an index for the given row and column.
|
| |
| virtual QModelIndex | parent (const QModelIndex &) const |
| | Retrieves the parent of a given index. Everything is under the root.
|
| |
| virtual int | rowCount (const QModelIndex &parent=QModelIndex()) const |
| | Returns the number of rows under a given parent.
|
| |
| virtual int | columnCount (const QModelIndex &) const |
| | Returns the number of columns under a given parent.
|
| |
| virtual QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const |
| | Retrieves data from the model for a given index and role.
|
| |
| virtual QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const |
| | 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.
|
| |
A model managing a list of fileset entries for UI display.
◆ FilesetEntryModel()
| FilesetEntryModel::FilesetEntryModel |
( |
QObject * |
parent = 0 | ) |
|
|
explicit |
Constructs a new FilesetEntryModel.
- Parameters
-
| parent | The parent QObject, defaults to 0. |
◆ 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 |
|
inlinevirtual |
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 |
|
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
-
- 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 |
|
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 |
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 |
|
inlinevirtual |
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 |
|
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