MCPcopy Create free account
hub / github.com/Audio4Linux/JDSP4Linux / data

Method data

src/data/model/DeviceListModel.cpp:20–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18}
19
20QVariant DeviceListModel::data(const QModelIndex &index, int role) const
21{
22 if (!index.isValid())
23 return QVariant();
24
25 auto device = devices[index.row()];
26
27 switch (role) {
28 case Qt::ItemDataRole::DisplayRole:
29 return QString::fromStdString(device.description);
30 case Qt::ItemDataRole::UserRole:
31 return QVariant::fromValue(device);
32 default:
33 return QVariant();
34 }
35}
36
37bool DeviceListModel::loadRemaining(PresetRuleTableModel* ruleModel)
38{

Callers

nothing calls this directly

Calls 1

QVariantClass · 0.50

Tested by

no test coverage detected