Beispiel #1
0
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 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);
}