Mercurial > hg > svapp
comparison framework/MainWindowBase.cpp @ 374:534bd1def9ee
Remove debug out
author | Chris Cannam |
---|---|
date | Thu, 19 Jun 2014 14:44:47 +0100 |
parents | 024226dd9f51 |
children | 20bab95852c1 |
comparison
equal
deleted
inserted
replaced
373:024226dd9f51 | 374:534bd1def9ee |
---|---|
1120 } | 1120 } |
1121 | 1121 |
1122 MainWindowBase::FileOpenStatus | 1122 MainWindowBase::FileOpenStatus |
1123 MainWindowBase::openPath(QString fileOrUrl, AudioFileOpenMode mode) | 1123 MainWindowBase::openPath(QString fileOrUrl, AudioFileOpenMode mode) |
1124 { | 1124 { |
1125 cerr << "MainWindowBase::openPath(" << fileOrUrl << ")" << endl; | |
1126 ProgressDialog dialog(tr("Opening file or URL..."), true, 2000, this); | 1125 ProgressDialog dialog(tr("Opening file or URL..."), true, 2000, this); |
1127 connect(&dialog, SIGNAL(showing()), this, SIGNAL(hideSplash())); | 1126 connect(&dialog, SIGNAL(showing()), this, SIGNAL(hideSplash())); |
1128 return open(FileSource(fileOrUrl, &dialog), mode); | 1127 return open(FileSource(fileOrUrl, &dialog), mode); |
1129 } | 1128 } |
1130 | 1129 |
1144 source.getExtension().toLower() == "n3" || | 1143 source.getExtension().toLower() == "n3" || |
1145 source.getExtension().toLower() == "ttl"); | 1144 source.getExtension().toLower() == "ttl"); |
1146 | 1145 |
1147 bool audio = AudioFileReaderFactory::getKnownExtensions().contains | 1146 bool audio = AudioFileReaderFactory::getKnownExtensions().contains |
1148 (source.getExtension().toLower()); | 1147 (source.getExtension().toLower()); |
1149 | |
1150 cerr << "MainWindowBase::open(" << source.getLocalFilename() << ": audio = " << audio << endl; | |
1151 | 1148 |
1152 bool rdfSession = false; | 1149 bool rdfSession = false; |
1153 if (rdf) { | 1150 if (rdf) { |
1154 RDFImporter::RDFDocumentType rdfType = | 1151 RDFImporter::RDFDocumentType rdfType = |
1155 RDFImporter::identifyDocumentType | 1152 RDFImporter::identifyDocumentType |
1156 (QUrl::fromLocalFile(source.getLocalFilename()).toString()); | 1153 (QUrl::fromLocalFile(source.getLocalFilename()).toString()); |
1157 // cerr << "RDF type: " << (int)rdfType << endl; | |
1158 if (rdfType == RDFImporter::AudioRefAndAnnotations || | 1154 if (rdfType == RDFImporter::AudioRefAndAnnotations || |
1159 rdfType == RDFImporter::AudioRef) { | 1155 rdfType == RDFImporter::AudioRef) { |
1160 rdfSession = true; | 1156 rdfSession = true; |
1161 } else if (rdfType == RDFImporter::NotRDF) { | 1157 } else if (rdfType == RDFImporter::NotRDF) { |
1162 rdf = false; | 1158 rdf = false; |
1205 | 1201 |
1206 MainWindowBase::FileOpenStatus | 1202 MainWindowBase::FileOpenStatus |
1207 MainWindowBase::openAudio(FileSource source, AudioFileOpenMode mode, | 1203 MainWindowBase::openAudio(FileSource source, AudioFileOpenMode mode, |
1208 QString templateName) | 1204 QString templateName) |
1209 { | 1205 { |
1210 cerr << "MainWindowBase::openAudio(" << source.getLocation() << ")" << endl; | 1206 SVDEBUG << "MainWindowBase::openAudio(" << source.getLocation() << ")" << endl; |
1211 | 1207 |
1212 if (templateName == "") { | 1208 if (templateName == "") { |
1213 templateName = getDefaultSessionTemplate(); | 1209 templateName = getDefaultSessionTemplate(); |
1214 } | 1210 } |
1215 | 1211 |
1216 cerr << "template is: \"" << templateName << "\"" << endl; | 1212 // cerr << "template is: \"" << templateName << "\"" << endl; |
1217 | 1213 |
1218 if (!source.isAvailable()) return FileOpenFailed; | 1214 if (!source.isAvailable()) return FileOpenFailed; |
1219 source.waitForData(); | 1215 source.waitForData(); |
1220 | 1216 |
1221 m_openingAudioFile = true; | 1217 m_openingAudioFile = true; |