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

Method view

src/backend/notebook/Notebook.cpp:287–312  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

285}
286
287QWidget* Notebook::view() const {
288#ifndef SDK
289 if (!m_partView) {
290 m_view = new NotebookView(const_cast<Notebook*>(this));
291 m_view->setBaseSize(1500, 1500);
292 m_partView = m_view;
293 connect(this, &Notebook::viewAboutToBeDeleted, [this]() {
294 m_view = nullptr;
295 });
296 // connect(m_view, SIGNAL(statusInfo(QString)), this, SIGNAL(statusInfo(QString)));
297
298 // set the current path in the session to the path of the project file
299#ifdef HAVE_CANTOR_LIBS
300 if (m_session) {
301 const Project* project = const_cast<Notebook*>(this)->project();
302 const QString& fileName = project->fileName();
303 if (!fileName.isEmpty()) {
304 QFileInfo fi(fileName);
305 m_session->setWorksheetPath(fi.filePath());
306 }
307 }
308#endif
309 }
310#endif
311 return m_partView;
312}
313
314//! Return a new context menu.
315/**

Callers

nothing calls this directly

Calls 4

filePathMethod · 0.80
projectMethod · 0.45
fileNameMethod · 0.45
isEmptyMethod · 0.45

Tested by

no test coverage detected