| 400 | } |
| 401 | |
| 402 | std::optional<CurveDescriptor> CatalogModel::descriptorForPath( |
| 403 | DatasetId dataset_id, const QString& topic, const QString& field) const { |
| 404 | for (const auto& [key, item] : impl_->items) { |
| 405 | (void)key; |
| 406 | if (item.dataset_id != dataset_id || item.topic_name != topic || !isScalarField(item)) { |
| 407 | continue; |
| 408 | } |
| 409 | if (asScalarField(item)->field_path == field) { |
| 410 | return curveFromItem(item); |
| 411 | } |
| 412 | } |
| 413 | return std::nullopt; |
| 414 | } |
| 415 | |
| 416 | void CatalogModel::rebuildFromDatastore() { |
| 417 | rebuildNow(); |