Logo Search packages:      
Sourcecode: d3lphin version File versions  Download package

void Dolphin::closeEvent ( QCloseEvent *  event  )  [protected, virtual]

See also:
QMainWindow::closeEvent

Definition at line 296 of file dolphin.cpp.

References DolphinSettings::leftsidebar(), DolphinSettings::rightsidebar(), and DolphinSettings::save().

{
    KConfig* config = kapp->config();
    config->setGroup("General");
    config->writeEntry("First Run", false);

    DolphinSettings& settings = DolphinSettings::instance();

    leftSidebarSettings* leftsidebarSettings = settings.leftsidebar();
    const bool isleftSidebarVisible = (m_leftsidebar != 0);
    leftsidebarSettings->setVisible(isleftSidebarVisible);
    if (isleftSidebarVisible) {
        leftsidebarSettings->setWidth(m_leftsidebar->width());
    }
    
    rightSidebarSettings* rightsidebarSettings = settings.rightsidebar();
    const bool isrightSidebarVisible = (m_rightsidebar != 0);
    rightsidebarSettings->setVisible(isrightSidebarVisible);
    if (isrightSidebarVisible) {
        rightsidebarSettings->setWidth(m_rightsidebar->width());
    }

    settings.save();

    config->sync();
    KMainWindow::closeEvent(event);
}


Generated by  Doxygen 1.6.0   Back to index