comparison framework/MainWindowBase.cpp @ 164:07d8dac78edc

* Activity log updates * Update range lists in play source when a new model is added * Fill cache with empty background in colour 3d plot
author Chris Cannam
date Fri, 27 Feb 2009 13:33:16 +0000
parents c17284397aa9
children 2c2029007618
comparison
equal deleted inserted replaced
163:2c158dd3b983 164:07d8dac78edc
1024 1024
1025 if (mode == CreateAdditionalModel && !getMainModel()) { 1025 if (mode == CreateAdditionalModel && !getMainModel()) {
1026 mode = ReplaceMainModel; 1026 mode = ReplaceMainModel;
1027 } 1027 }
1028 1028
1029 emit activity(tr("Import audio file \"%1\"").arg(source.getLocation()));
1030
1029 if (mode == ReplaceMainModel) { 1031 if (mode == ReplaceMainModel) {
1030 1032
1031 Model *prevMain = getMainModel(); 1033 Model *prevMain = getMainModel();
1032 if (prevMain) { 1034 if (prevMain) {
1033 m_playSource->removeModel(prevMain); 1035 m_playSource->removeModel(prevMain);
1242 << "): Failed to read XML file: " 1244 << "): Failed to read XML file: "
1243 << reader.getErrorString().toStdString() << std::endl; 1245 << reader.getErrorString().toStdString() << std::endl;
1244 return FileOpenFailed; 1246 return FileOpenFailed;
1245 } 1247 }
1246 1248
1249 emit activity(tr("Import layer XML file \"%1\"").arg(source.getLocation()));
1250
1247 m_recentFiles.addFile(source.getLocation()); 1251 m_recentFiles.addFile(source.getLocation());
1248 1252
1249 if (!source.isRemote()) { 1253 if (!source.isRemote()) {
1250 registerLastOpenedFilePath(FileFinder::LayerFile, path); // for file dialog 1254 registerLastOpenedFilePath(FileFinder::LayerFile, path); // for file dialog
1251 } 1255 }
1273 1277
1274 if (model) { 1278 if (model) {
1275 1279
1276 std::cerr << "MainWindowBase::openLayer: Have model" << std::endl; 1280 std::cerr << "MainWindowBase::openLayer: Have model" << std::endl;
1277 1281
1282 emit activity(tr("Import MIDI file \"%1\"").arg(source.getLocation()));
1283
1278 Layer *newLayer = m_document->createImportedLayer(model); 1284 Layer *newLayer = m_document->createImportedLayer(model);
1279 1285
1280 if (newLayer) { 1286 if (newLayer) {
1281 1287
1282 m_document->addLayerToView(pane, newLayer); 1288 m_document->addLayerToView(pane, newLayer);
1451 1457
1452 bool ok = (error == ""); 1458 bool ok = (error == "");
1453 1459
1454 if (ok) { 1460 if (ok) {
1455 1461
1462 emit activity(tr("Import session file \"%1\"").arg(source.getLocation()));
1463
1456 setWindowTitle(tr("%1: %2") 1464 setWindowTitle(tr("%1: %2")
1457 .arg(QApplication::applicationName()) 1465 .arg(QApplication::applicationName())
1458 .arg(source.getLocation())); 1466 .arg(source.getLocation()));
1459 1467
1460 if (!source.isRemote()) m_sessionFile = source.getLocalFilename(); 1468 if (!source.isRemote()) m_sessionFile = source.getLocalFilename();
1542 dialog.setMessage(tr("Importing from RDF...")); 1550 dialog.setMessage(tr("Importing from RDF..."));
1543 1551
1544 if (models.empty()) { 1552 if (models.empty()) {
1545 return FileOpenFailed; 1553 return FileOpenFailed;
1546 } 1554 }
1555
1556 emit activity(tr("Import RDF document \"%1\"").arg(source.getLocation()));
1547 1557
1548 std::set<Model *> added; 1558 std::set<Model *> added;
1549 1559
1550 for (int i = 0; i < models.size(); ++i) { 1560 for (int i = 0; i < models.size(); ++i) {
1551 1561