| 274 | } |
| 275 | |
| 276 | void RemoteViewWidget::elementsAtReceived(const GammaRay::ObjectIds &ids, int bestCandidate) |
| 277 | { |
| 278 | Q_ASSERT(!ids.isEmpty()); |
| 279 | |
| 280 | m_pickProxyModel->setIds(ids); |
| 281 | |
| 282 | if (ids.size() == 1) { |
| 283 | m_interface->pickElementId(ids.first()); |
| 284 | } else { |
| 285 | const int candidate = bestCandidate == -1 ? 0 : bestCandidate; |
| 286 | auto *dlg = new ModelPickerDialog(window()); |
| 287 | m_invisibleItemsProxyModel->setSourceModel(m_pickProxyModel); |
| 288 | m_invisibleItemsProxyModel->setFlagRole(flagRole()); |
| 289 | m_invisibleItemsProxyModel->setInvisibleMask(invisibleMask()); |
| 290 | |
| 291 | dlg->setModel(m_invisibleItemsProxyModel); |
| 292 | dlg->setCurrentIndex(ObjectModel::ObjectIdRole, QVariant::fromValue(ids[candidate])); |
| 293 | connect(dlg, &ModelPickerDialog::activated, this, &RemoteViewWidget::pickElementId); |
| 294 | connect(dlg, &ModelPickerDialog::checkBoxStateChanged, m_invisibleItemsProxyModel, &VisibilityFilterProxyModel::setHideItems); |
| 295 | dlg->open(); |
| 296 | } |
| 297 | } |
| 298 | |
| 299 | void RemoteViewWidget::frameUpdated(const RemoteViewFrame &frame) |
| 300 | { |
nothing calls this directly
no test coverage detected