Mercurial > hg > svapp
comparison framework/MainWindowBase.cpp @ 222:ed5804224121 templating
Store default template name in MainWindowBase
author | Chris Cannam |
---|---|
date | Mon, 09 May 2011 11:56:24 +0100 |
parents | e06a0124c662 |
children | e8ae978e1a3d |
comparison
equal
deleted
inserted
replaced
221:e06a0124c662 | 222:ed5804224121 |
---|---|
322 void | 322 void |
323 MainWindowBase::registerLastOpenedFilePath(FileFinder::FileType type, QString path) | 323 MainWindowBase::registerLastOpenedFilePath(FileFinder::FileType type, QString path) |
324 { | 324 { |
325 FileFinder *ff = FileFinder::getInstance(); | 325 FileFinder *ff = FileFinder::getInstance(); |
326 ff->registerLastOpenedFilePath(type, path); | 326 ff->registerLastOpenedFilePath(type, path); |
327 } | |
328 | |
329 void | |
330 MainWindowBase::setDefaultSessionTemplate(QString name) | |
331 { | |
332 m_defaultSessionTemplate = name; | |
333 } | |
334 | |
335 QString | |
336 MainWindowBase::getDefaultSessionTemplate() const | |
337 { | |
338 return m_defaultSessionTemplate; | |
327 } | 339 } |
328 | 340 |
329 void | 341 void |
330 MainWindowBase::updateMenuStates() | 342 MainWindowBase::updateMenuStates() |
331 { | 343 { |
1073 MainWindowBase::FileOpenStatus | 1085 MainWindowBase::FileOpenStatus |
1074 MainWindowBase::openAudio(FileSource source, AudioFileOpenMode mode, QString templateName) | 1086 MainWindowBase::openAudio(FileSource source, AudioFileOpenMode mode, QString templateName) |
1075 { | 1087 { |
1076 // std::cerr << "MainWindowBase::openAudio(" << source.getLocation().toStdString() << ")" << std::endl; | 1088 // std::cerr << "MainWindowBase::openAudio(" << source.getLocation().toStdString() << ")" << std::endl; |
1077 | 1089 |
1078 if (templateName == "") templateName = "testtemplate"; | 1090 if (templateName == "") { |
1091 templateName = m_defaultSessionTemplate; | |
1092 } | |
1079 | 1093 |
1080 if (!source.isAvailable()) return FileOpenFailed; | 1094 if (!source.isAvailable()) return FileOpenFailed; |
1081 source.waitForData(); | 1095 source.waitForData(); |
1082 | 1096 |
1083 m_openingAudioFile = true; | 1097 m_openingAudioFile = true; |