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

Method setProject

src/frontend/ProjectExplorer.cpp:307–322  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

305}
306
307void ProjectExplorer::setProject(Project* project) {
308 connect(project, &Project::childAspectAdded, this, &ProjectExplorer::aspectAdded);
309 connect(project, &Project::requestSaveState, this, &ProjectExplorer::save);
310 connect(project, &Project::requestLoadState, this, &ProjectExplorer::load);
311 connect(project, &Project::requestNavigateTo, this, &ProjectExplorer::navigateTo);
312 m_project = project;
313
314 // for newly created projects, resize the header to fit the size of the header section names.
315 // for projects loaded from a file, this function will be called later to fit the sizes
316 // of the content once the project is loaded
317 resizeHeader();
318
319 // remove all error messages from the previous project, if any are visible
320 if (m_messageWidget && m_messageWidget->isVisible())
321 m_messageWidget->close();
322}
323
324QModelIndex ProjectExplorer::currentIndex() const {
325 return m_treeView->currentIndex();

Callers 6

newProjectMethod · 0.45
closeProjectMethod · 0.45
saveMethod · 0.45

Calls 2

isVisibleMethod · 0.45
closeMethod · 0.45

Tested by 2