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

void Rosegarden::RosegardenGUIApp::slotImportMIDI (  )  [slot]

Let the user select a MIDI file for import

Definition at line 3734 of file RosegardenGUIApp.cpp.

References m_doc, openFile(), and Rosegarden::RosegardenGUIDoc::saveIfModified().

Referenced by setupActions().

{
    if (m_doc && !m_doc->saveIfModified())
        return ;

    KURL url = KFileDialog::getOpenURL
               (":MIDI",
                "audio/x-midi", this,
                i18n("Open MIDI File"));
    if (url.isEmpty()) {
        return ;
    }

    QString tmpfile;
    KIO::NetAccess::download(url, tmpfile, this);
    openFile(tmpfile, ImportMIDI); // does everything including setting the document

    KIO::NetAccess::removeTempFile( tmpfile );
}


Generated by  Doxygen 1.6.0   Back to index