Mercurial > hg > svgui
changeset 672:ee99f5c0050c
Add CSVFile option
author | Chris Cannam |
---|---|
date | Wed, 09 Oct 2013 14:52:09 +0100 |
parents | 0aea4b9e4c3d |
children | b5d3dea6d869 |
files | widgets/InteractiveFileFinder.cpp |
diffstat | 1 files changed, 17 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/widgets/InteractiveFileFinder.cpp Fri Jul 19 15:45:32 2013 +0100 +++ b/widgets/InteractiveFileFinder.cpp Wed Oct 09 14:52:09 2013 +0100 @@ -102,6 +102,11 @@ } break; + case CSVFile: + settingsKey = "layerpath"; + filter = tr("Comma-separated data files (*.csv)\nSpace-separated .lab files (*.lab)\nText files (*.txt)\nAll files (*.*)"); + break; + case AnyFile: settingsKey = "lastpath"; filter = tr("All supported files (*.sv %1 %2 %3)\nSonic Visualiser session files (*.sv)\nAudio files (%1)\nLayer files (%2)\nRDF files (%3)\nAll files (*.*)") @@ -229,6 +234,12 @@ filter = tr("Portable Network Graphics files (*.png)\nAll files (*.*)"); break; + case CSVFile: + settingsKey = "savelayerpath"; + title = tr("Select a file to export to"); + filter = tr("Comma-separated data files (*.csv)\nText files (*.txt)\nAll files (*.*)"); + break; + case AnyFile: std::cerr << "ERROR: Internal error: InteractiveFileFinder::getSaveFileName: AnyFile cannot be used here" << std::endl; abort(); @@ -268,6 +279,8 @@ dialog.setDefaultSuffix("wav"); } else if (type == ImageFile) { dialog.setDefaultSuffix("png"); + } else if (type == CSVFile) { + dialog.setDefaultSuffix("csv"); } bool good = false; @@ -364,6 +377,10 @@ settingsKey = "imagepath"; break; + case CSVFile: + settingsKey = "layerpath"; + break; + case AnyFile: settingsKey = "lastpath"; break;