Mercurial > hg > svapp
comparison framework/SVFileReader.cpp @ 109:2dd30a7cd21a
* More work to abstract out interactive components used in the data library,
so that it does not need to depend on QtGui.
author | Chris Cannam |
---|---|
date | Fri, 14 Mar 2008 17:14:21 +0000 |
parents | b9faa1418d29 |
children | c82913d31a53 |
comparison
equal
deleted
inserted
replaced
108:e25e8f5d785b | 109:2dd30a7cd21a |
---|---|
19 #include "view/View.h" | 19 #include "view/View.h" |
20 #include "base/PlayParameters.h" | 20 #include "base/PlayParameters.h" |
21 #include "base/PlayParameterRepository.h" | 21 #include "base/PlayParameterRepository.h" |
22 | 22 |
23 #include "data/fileio/AudioFileReaderFactory.h" | 23 #include "data/fileio/AudioFileReaderFactory.h" |
24 #include "data/fileio/FileFinder.h" | |
25 #include "data/fileio/FileSource.h" | 24 #include "data/fileio/FileSource.h" |
25 | |
26 #include "widgets/FileFinder.h" | |
26 | 27 |
27 #include "data/model/WaveFileModel.h" | 28 #include "data/model/WaveFileModel.h" |
28 #include "data/model/EditableDenseThreeDimensionalModel.h" | 29 #include "data/model/EditableDenseThreeDimensionalModel.h" |
29 #include "data/model/SparseOneDimensionalModel.h" | 30 #include "data/model/SparseOneDimensionalModel.h" |
30 #include "data/model/SparseTimeValueModel.h" | 31 #include "data/model/SparseTimeValueModel.h" |
33 #include "data/model/ImageModel.h" | 34 #include "data/model/ImageModel.h" |
34 | 35 |
35 #include "transform/TransformFactory.h" | 36 #include "transform/TransformFactory.h" |
36 | 37 |
37 #include "view/Pane.h" | 38 #include "view/Pane.h" |
39 | |
40 #include "widgets/ProgressDialog.h" | |
38 | 41 |
39 #include "Document.h" | 42 #include "Document.h" |
40 | 43 |
41 #include <QString> | 44 #include <QString> |
42 #include <QMessageBox> | 45 #include <QMessageBox> |
439 FileFinder *ff = FileFinder::getInstance(); | 442 FileFinder *ff = FileFinder::getInstance(); |
440 QString originalPath = attributes.value("file"); | 443 QString originalPath = attributes.value("file"); |
441 QString path = ff->find(FileFinder::AudioFile, | 444 QString path = ff->find(FileFinder::AudioFile, |
442 originalPath, m_location); | 445 originalPath, m_location); |
443 | 446 |
444 FileSource file(path, FileSource::ProgressDialog); | 447 ProgressDialog dialog(tr("Opening file or URL..."), true, 2000); |
448 FileSource file(path, &dialog); | |
445 file.waitForStatus(); | 449 file.waitForStatus(); |
446 | 450 |
447 if (!file.isOK()) { | 451 if (!file.isOK()) { |
448 std::cerr << "SVFileReader::readModel: Failed to retrieve file \"" << path.toStdString() << "\" for wave file model: " << file.getErrorString().toStdString() << std::endl; | 452 std::cerr << "SVFileReader::readModel: Failed to retrieve file \"" << path.toStdString() << "\" for wave file model: " << file.getErrorString().toStdString() << std::endl; |
449 } else if (!file.isAvailable()) { | 453 } else if (!file.isAvailable()) { |