MCPcopy Create free account
hub / github.com/KDE/labplot / ~MainWin

Method ~MainWin

src/frontend/MainWin.cpp:167–195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

165}
166
167MainWin::~MainWin() {
168 // save the current settings in MainWin
169 m_recentProjectsAction->saveEntries(Settings::group(QStringLiteral("Recent Files")));
170
171 auto group = Settings::group(QStringLiteral("MainWin"));
172 group.writeEntry(QLatin1String("geometry"), saveGeometry()); // current geometry of the main window
173 group.writeEntry(QLatin1String("WindowState"), saveState()); // current state of QMainWindow's toolbars
174 group.writeEntry(QLatin1String("lastOpenFileFilter"), m_lastOpenFileFilter);
175 group.writeEntry(QLatin1String("ShowMemoryInfo"), (m_memoryInfoWidget != nullptr));
176#ifdef HAVE_CANTOR_LIBS
177 if (m_lastUsedNotebookAction)
178 group.writeEntry(QLatin1String("lastUsedNotebook"), m_lastUsedNotebookAction->data().toString());
179#endif
180
181 Settings::sync();
182
183 if (m_project) {
184 delete m_guiObserver;
185 delete m_aspectTreeModel;
186 disconnect(m_project, nullptr, this, nullptr);
187 delete m_project;
188 }
189
190 // if welcome screen is shown, save its settings prior to deleting it
191 // if (dynamic_cast<QQuickWidget*>(centralWidget()))
192 // QMetaObject::invokeMethod(m_welcomeWidget->rootObject(), "saveWidgetDimensions");
193
194 // delete m_welcomeScreenHelper;
195}
196
197void MainWin::showPresenter() {
198 const auto* w = dynamic_cast<Worksheet*>(m_currentAspect);

Callers

nothing calls this directly

Calls 4

groupFunction · 0.85
syncFunction · 0.85
toStringMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected