Mercurial > hg > svcore
diff data/fileio/FileFinder.cpp @ 250:40db5491bcf8 sv1-1.0pre2 sv1-1.0pre3
* Add basics of an Export Image File function
author | Chris Cannam |
---|---|
date | Mon, 12 Mar 2007 15:36:31 +0000 |
parents | e2bbb58e6df6 |
children | 20028c634494 |
line wrap: on
line diff
--- a/data/fileio/FileFinder.cpp Thu Mar 08 16:53:08 2007 +0000 +++ b/data/fileio/FileFinder.cpp Mon Mar 12 15:36:31 2007 +0000 @@ -82,6 +82,11 @@ .arg(AudioFileReaderFactory::getKnownExtensions()); break; + case ImageFile: + settingsKey = "imagepath"; + filter = tr("Portable Network Graphics files (*.png)\nAll files (*.*)"); + break; + case AnyFile: settingsKey = "lastpath"; filter = tr("All supported files (*.sv %1 %2)\nSonic Visualiser session files (*.sv)\nAudio files (%1)\nLayer files (%2)\nAll files (*.*)") @@ -196,6 +201,12 @@ std::cerr << "ERROR: Internal error: FileFinder::getSaveFileName: SessionOrAudioFile cannot be used here" << std::endl; abort(); + case ImageFile: + settingsKey = "saveimagepath"; + title = tr("Select a file to export to"); + filter = tr("Portable Network Graphics files (*.png)\nAll files (*.*)"); + break; + case AnyFile: std::cerr << "ERROR: Internal error: FileFinder::getSaveFileName: AnyFile cannot be used here" << std::endl; abort(); @@ -233,6 +244,8 @@ dialog.setDefaultSuffix("sv"); } else if (type == AudioFile) { dialog.setDefaultSuffix("wav"); + } else if (type == ImageFile) { + dialog.setDefaultSuffix("png"); } bool good = false; @@ -313,6 +326,10 @@ settingsKey = "lastpath"; break; + case ImageFile: + settingsKey = "imagepath"; + break; + case AnyFile: settingsKey = "lastpath"; break;