Introduce a IsPaired role in the DevicesModel
Reviewed by Albert Vaca
This commit is contained in:
parent
9ec74a8834
commit
dc2f9c0f3c
2 changed files with 4 additions and 1 deletions
|
@ -170,6 +170,8 @@ QVariant DevicesModel::data(const QModelIndex& index, int role) const
|
||||||
}
|
}
|
||||||
case IconNameRole:
|
case IconNameRole:
|
||||||
return device->iconName();
|
return device->iconName();
|
||||||
|
case IsPairedRole:
|
||||||
|
return QVariant::fromValue<bool>(device->isPaired());
|
||||||
default:
|
default:
|
||||||
return QVariant();
|
return QVariant();
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,8 @@ public:
|
||||||
IconModelRole = Qt::DecorationRole,
|
IconModelRole = Qt::DecorationRole,
|
||||||
StatusModelRole = Qt::InitialSortOrderRole,
|
StatusModelRole = Qt::InitialSortOrderRole,
|
||||||
IdModelRole = Qt::UserRole,
|
IdModelRole = Qt::UserRole,
|
||||||
IconNameRole
|
IconNameRole,
|
||||||
|
IsPairedRole
|
||||||
};
|
};
|
||||||
enum StatusFlags {
|
enum StatusFlags {
|
||||||
StatusUnknown = 0x00,
|
StatusUnknown = 0x00,
|
||||||
|
|
Loading…
Reference in a new issue