MCPcopy Create free account
hub / github.com/OpenBoard-org/OpenBoard / getFeature

Method getFeature

src/board/UBFeaturesController.cpp:1132–1150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1130}
1131
1132UBFeature UBFeaturesController::getFeature(const QModelIndex &index, const QString &listName)
1133{
1134// QSortFilterProxyModel *model = qobject_cast<QSortFilterProxyModel *>(pOnView->model());
1135 QAbstractItemModel *model = 0;
1136 if (listName == UBFeaturesWidget::objNamePathList) {
1137 model = featuresPathModel;
1138 } else if (listName == UBFeaturesWidget::objNameFeatureList) {
1139 model = curListModel;
1140 }
1141
1142 if (model) {
1143 return model->data(index, Qt::UserRole + 1).value<UBFeature>();
1144 }
1145
1146 return UBFeature();
1147
1148
1149// return pOnView->model()->data(index, Qt::UserRole + 1).value<UBFeature>(); /*featuresSearchModel->data(index, Qt::UserRole + 1).value<UBFeature>()*/;
1150}
1151
1152void UBFeaturesController::searchStarted(const QString &pattern, QListView *pOnView)
1153{

Callers 2

currentSelectedMethod · 0.80

Calls 2

UBFeatureClass · 0.85
dataMethod · 0.45

Tested by

no test coverage detected