Mercurial > hg > svgui
changeset 705:52e5f6fe31ad tonioni
Support non-SV file types (should have been committed earlier, omitted due to confusion)
author | Chris Cannam |
---|---|
date | Wed, 04 Dec 2013 19:38:12 +0000 |
parents | cc6b21976261 |
children | 461a600ff26d |
files | widgets/InteractiveFileFinder.cpp |
diffstat | 1 files changed, 36 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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;