| 1130 | } |
| 1131 | |
| 1132 | UBFeature 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 | |
| 1152 | void UBFeaturesController::searchStarted(const QString &pattern, QListView *pOnView) |
| 1153 | { |
no test coverage detected