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

void Rosegarden::RosegardenGUIApp::saveGlobalProperties ( KConfig *  _cfg  )  [protected, virtual]

saves the window properties for each open window during session end to the session config file, including saving the currently opened file by a temporary filename provided by KApplication.

See also:

Definition at line 2001 of file RosegardenGUIApp.cpp.

References Rosegarden::RosegardenGUIDoc::getAbsFilePath(), Rosegarden::RosegardenGUIDoc::getTitle(), Rosegarden::RosegardenGUIDoc::isModified(), m_doc, and Rosegarden::RosegardenGUIDoc::saveDocument().

    if (m_doc->getTitle() != i18n("Untitled") && !m_doc->isModified()) {
        // saving to tempfile not necessary
    } else {
        QString filename = m_doc->getAbsFilePath();
        cfg->writeEntry("filename", filename);
        cfg->writeEntry("modified", m_doc->isModified());

        QString tempname = kapp->tempSaveName(filename);
        QString errMsg;
        bool res = m_doc->saveDocument(tempname, errMsg);
        if (!res) {
            if (errMsg)
                KMessageBox::error(this, i18n(QString("Could not save document at %1\nError was : %2")
                KMessageBox::error(this, i18n(QString("Could not save document at %1")

Generated by  Doxygen 1.6.0   Back to index