/** * save window settings etc. and exit */ void KLinPopup::slotQuit() { hide(); saveAutoSaveSettings(); if (watcher) { watcher->stop(); watcher->wait(); } kapp->quit(); }
void MainWindow::configureToolbars() { if (autoSaveSettings()) saveAutoSaveSettings(); KEditToolBar dlg(factory(), this); // The bookmark bar needs to be refill after the UI changes are finished connect(&dlg, SIGNAL(newToolBarConfig()), this, SLOT(initBookmarkBar())); dlg.exec(); }
void MainWin::saveStateToSettings(UiSettings &s) { s.setValue("MainWinSize", _normalSize); s.setValue("MainWinPos", _normalPos); s.setValue("MainWinState", saveState()); s.setValue("MainWinGeometry", saveGeometry()); s.setValue("MainWinMinimized", isMinimized()); s.setValue("MainWinMaximized", isMaximized()); s.setValue("MainWinHidden", !isVisible()); #ifdef HAVE_KDE saveAutoSaveSettings(); #endif }
void MainWin::saveStateToSettings(UiSettings &s) { s.setValue("MainWinSize", _normalSize); s.setValue("MainWinPos", _normalPos); s.setValue("MainWinState", saveState()); s.setValue("MainWinGeometry", saveGeometry()); s.setValue("MainWinMinimized", isMinimized()); s.setValue("MainWinMaximized", isMaximized()); s.setValue("MainWinHidden", !isVisible()); BufferId lastBufId = Client::bufferModel()->currentBuffer(); if(lastBufId.isValid()) s.setValue("LastUsedBufferId", lastBufId.toInt()); #ifdef HAVE_KDE saveAutoSaveSettings(); #endif }
//--------------------------------------------------------------------------- void SecondaryWindow::closeEvent(QCloseEvent *e) { // if there's a system tray applet then just do what needs to be done if a // window is closed. if(kmkernel->haveSystemTrayApplet()) { // BEGIN of code borrowed from KMainWindow::closeEvent // Save settings if auto-save is enabled, and settings have changed if(settingsDirty() && autoSaveSettings()) saveAutoSaveSettings(); if(queryClose()) { e->accept(); } // END of code borrowed from KMainWindow::closeEvent } else KMainWindow::closeEvent(e); }