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

Method model

src/backend/datasources/projects/ProjectParser.cpp:53–68  ·  view source on GitHub ↗

! * returns the model containing the structure of the current project used for the preview in the import project dialog. * The caller takes over the ownership of the model. */

Source from the content-addressed store, hash-verified

51 * The caller takes over the ownership of the model.
52 */
53QAbstractItemModel* ProjectParser::model() {
54 WAIT_CURSOR;
55 PERFTRACE(QStringLiteral("project model for preview created"));
56 delete m_previewProject;
57 m_previewProject = new Project();
58
59 bool rc = load(m_previewProject, true);
60 AspectTreeModel* model = nullptr;
61 if (rc) {
62 model = new AspectTreeModel(m_previewProject);
63 model->setReadOnly(true);
64 }
65
66 RESET_CURSOR;
67 return model;
68}
69
70void ProjectParser::importTo(Folder* targetFolder, const QStringList& selectedPathes) {
71 DEBUG(Q_FUNC_INFO << ", starting import of " << STDSTRING(m_projectFileName));

Callers 1

writeCHDUMethod · 0.45

Calls 1

setReadOnlyMethod · 0.80

Tested by

no test coverage detected