mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Implement the data method for location information
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
8115855428
commit
3235dd842e
1 changed files with 8 additions and 0 deletions
|
@ -18,7 +18,15 @@ int LocationInformationModel::rowCount(const QModelIndex &parent) const
|
|||
|
||||
QVariant LocationInformationModel::data(const QModelIndex &index, int role) const
|
||||
{
|
||||
if (!index.isValid())
|
||||
return QVariant();
|
||||
struct dive_site *ds = get_dive_site(index.row());
|
||||
|
||||
switch(role) {
|
||||
case Qt::DisplayRole : return qPrintable(ds->name);
|
||||
}
|
||||
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
void LocationInformationModel::update()
|
||||
|
|
Loading…
Reference in a new issue