MCPcopy Create free account
hub / github.com/KDE/labplot / navigateTo

Method navigateTo

src/frontend/ProjectExplorer.cpp:586–597  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

584}
585
586void ProjectExplorer::navigateTo(const QString& path) {
587 const auto* tree_model = dynamic_cast<AspectTreeModel*>(m_treeView->model());
588 if (tree_model) {
589 const auto& index = tree_model->modelIndexOfAspect(path);
590 if (!index.isValid())
591 return;
592 m_treeView->scrollTo(index);
593 m_treeView->setCurrentIndex(index);
594 auto* aspect = static_cast<AbstractAspect*>(index.internalPointer());
595 aspect->setSelected(true);
596 }
597}
598
599void ProjectExplorer::toggleColumn(int index) {
600 // determine the total number of checked column actions

Callers

nothing calls this directly

Calls 5

modelIndexOfAspectMethod · 0.80
modelMethod · 0.45
isValidMethod · 0.45
setCurrentIndexMethod · 0.45
setSelectedMethod · 0.45

Tested by

no test coverage detected