A table model backed by a list of string lists.
More...
#include <astringlist_list_model.h>
|
| | AStringListListModel (QObject *parent=Q_NULLPTR) |
| | Construct an empty model.
|
| |
|
virtual | ~AStringListListModel () |
| | Destroy the model.
|
| |
| virtual int | rowCount (const QModelIndex &parent=QModelIndex()) const |
| | Return the number of rows in the model.
|
| |
| virtual int | columnCount (const QModelIndex &parent=QModelIndex()) const |
| | Return the number of columns in the model.
|
| |
| virtual QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const |
| | Return data for the given index and role.
|
| |
| virtual QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const |
| | Return header data for the given section, orientation, and role.
|
| |
| virtual void | appendRow (const QStringList &row, const QString &row_tooltip=QString(), const QModelIndex &parent=QModelIndex()) |
| | Append a row to the model.
|
| |
|
| virtual QStringList | headerColumns () const =0 |
| | Return the list of column header strings.
|
| |
A table model backed by a list of string lists.
Each row is represented as a QStringList.
◆ AStringListListModel()
| AStringListListModel::AStringListListModel |
( |
QObject * |
parent = Q_NULLPTR | ) |
|
|
explicit |
Construct an empty model.
- Parameters
-
◆ appendRow()
| void AStringListListModel::appendRow |
( |
const QStringList & |
row, |
|
|
const QString & |
row_tooltip = QString(), |
|
|
const QModelIndex & |
parent = QModelIndex() |
|
) |
| |
|
virtual |
Append a row to the model.
This method is public rather than protected because it may need to be invoked from a wmem_map_foreach() callback implemented as an extern "C" static member function of a subclass. wmem_map_foreach() is passed, as the user data, a pointer to the class instance to which rows should be appended.
- Parameters
-
| row | The string list representing the new row's data. |
| row_tooltip | The tooltip text for the new row. |
| parent | Unused; present for API compatibility. |
◆ columnCount()
| int AStringListListModel::columnCount |
( |
const QModelIndex & |
parent = QModelIndex() | ) |
const |
|
virtual |
Return the number of columns in the model.
- Parameters
-
| parent | Unused; present for API compatibility. |
- Returns
- The number of columns.
◆ data()
| QVariant AStringListListModel::data |
( |
const QModelIndex & |
index, |
|
|
int |
role = Qt::DisplayRole |
|
) |
| const |
|
virtual |
Return data for the given index and role.
- Parameters
-
| index | The model index to query. |
| role | The data role. |
- Returns
- The data for the given index and role, or an invalid
QVariant if the index or role is unsupported.
◆ headerColumns()
| virtual QStringList AStringListListModel::headerColumns |
( |
| ) |
const |
|
protectedpure virtual |
◆ headerData()
| QVariant AStringListListModel::headerData |
( |
int |
section, |
|
|
Qt::Orientation |
orientation, |
|
|
int |
role = Qt::DisplayRole |
|
) |
| const |
|
virtual |
Return header data for the given section, orientation, and role.
- Parameters
-
| section | The section index. |
| orientation | The header orientation. |
| role | The data role. |
- Returns
- The header data, or an invalid
QVariant if unsupported.
◆ rowCount()
| int AStringListListModel::rowCount |
( |
const QModelIndex & |
parent = QModelIndex() | ) |
const |
|
virtual |
Return the number of rows in the model.
- Parameters
-
| parent | Unused; present for API compatibility. |
- Returns
- The number of rows.
The documentation for this class was generated from the following files:
- /builds/wireshark/wireshark/ui/qt/models/astringlist_list_model.h
- /builds/wireshark/wireshark/ui/qt/models/astringlist_list_model.cpp