# HG changeset patch # User Chris Cannam # Date 1386185892 0 # Node ID 52e5f6fe31ad728a3c096b77d79bbcecab7daffa # Parent cc6b219762614a33cf00614c4a6e200c0da8efe6 Support non-SV file types (should have been committed earlier, omitted due to confusion) diff -r cc6b21976261 -r 52e5f6fe31ad widgets/InteractiveFileFinder.cpp --- a/widgets/InteractiveFileFinder.cpp Wed Dec 04 13:55:17 2013 +0000 +++ b/widgets/InteractiveFileFinder.cpp Wed Dec 04 19:38:12 2013 +0000 @@ -81,6 +81,20 @@ .arg(RDFImporter::getKnownExtensions()); break; + case LayerFileNonSV: + settingsKey = "layerpath"; + filter = tr("All supported files (%1 %2)\nComma-separated data files (*.csv)\nSonic Visualiser Layer XML files (*.svl)\nSpace-separated .lab files (*.lab)\nRDF files (%2)\nMIDI files (*.mid)\nText files (*.txt)\nAll files (*.*)") + .arg(DataFileReaderFactory::getKnownExtensions()) + .arg(RDFImporter::getKnownExtensions()); + break; + + case LayerFileNoMidiNonSV: + settingsKey = "layerpath"; + filter = tr("All supported files (%1 %2)\nComma-separated data files (*.csv)\nSonic Visualiser Layer XML files (*.svl)\nSpace-separated .lab files (*.lab)\nRDF files (%2)\nText files (*.txt)\nAll files (*.*)") + .arg(DataFileReaderFactory::getKnownExtensions()) + .arg(RDFImporter::getKnownExtensions()); + break; + case SessionOrAudioFile: settingsKey = "lastpath"; filter = tr("All supported files (*.sv %1 %2)\nSonic Visualiser session files (*.sv)\nAudio files (%2)\nRDF files (%1)\nAll files (*.*)") @@ -224,6 +238,18 @@ filter = tr("Sonic Visualiser Layer XML files (*.svl)\nComma-separated data files (*.csv)\nRDF/Turtle files (%1)\nText files (*.txt)\nAll files (*.*)").arg(RDFExporter::getSupportedExtensions()); break; + case LayerFileNonSV: + settingsKey = "savelayerpath"; + title = tr("Select a file to export to"); + filter = tr("Comma-separated data files (*.csv)\nSonic Visualiser Layer XML files (*.svl)\nRDF/Turtle files (%1)\nMIDI files (*.mid)\nText files (*.txt)\nAll files (*.*)").arg(RDFExporter::getSupportedExtensions()); + break; + + case LayerFileNoMidiNonSV: + settingsKey = "savelayerpath"; + title = tr("Select a file to export to"); + filter = tr("Comma-separated data files (*.csv)\nSonic Visualiser Layer XML files (*.svl)\nRDF/Turtle files (%1)\nText files (*.txt)\nAll files (*.*)").arg(RDFExporter::getSupportedExtensions()); + break; + case SessionOrAudioFile: cerr << "ERROR: Internal error: InteractiveFileFinder::getSaveFileName: SessionOrAudioFile cannot be used here" << endl; abort(); @@ -299,7 +325,8 @@ cerr << "type = " << type << ", suffix = " << fi.suffix() << endl; - if ((type == LayerFile || type == LayerFileNoMidi) + if ((type == LayerFile || type == LayerFileNoMidi || + type == LayerFileNonSV || type == LayerFileNoMidiNonSV) && fi.suffix() == "") { QString expectedExtension; QString selectedFilter = dialog.selectedNameFilter(); @@ -369,6 +396,14 @@ settingsKey = "layerpath"; break; + case LayerFileNonSV: + settingsKey = "layerpath"; + break; + + case LayerFileNoMidiNonSV: + settingsKey = "layerpath"; + break; + case SessionOrAudioFile: settingsKey = "lastpath"; break;