comparison main/MainWindow.cpp @ 290:8e13520c9078

* Much more sensible pane layouts, etc., when loading RDF; also offer choice of adding to current session or starting new session if RDF references audio (needs some refinement)
author Chris Cannam
date Fri, 28 Nov 2008 15:45:20 +0000
parents ee96e37a3cbb
children f262f283a655
comparison
equal deleted inserted replaced
289:ee96e37a3cbb 290:8e13520c9078
2715 return true; 2715 return true;
2716 } 2716 }
2717 2717
2718 // else cancel 2718 // else cancel
2719 return false; 2719 return false;
2720 }
2721
2722 bool
2723 MainWindow::shouldCreateNewSessionForRDFAudio()
2724 {
2725 QMessageBox mb;
2726 mb.setWindowTitle("Open as new session?");
2727 mb.setText("<b>RDF refers to audio files</b><p>This RDF document refers to one or more audio files.<br>Do you want to load it as a new session, or as a set of additional panes in the existing session?");
2728 QPushButton *a = mb.addButton(tr("Create new session"), QMessageBox::AcceptRole);
2729 QPushButton *b = mb.addButton(tr("Add to current session"), QMessageBox::RejectRole);
2730 mb.setDefaultButton(a);
2731 mb.exec();
2732 if (mb.clickedButton() == a) {
2733 return true;
2734 } else {
2735 return false;
2736 }
2720 } 2737 }
2721 2738
2722 void 2739 void
2723 MainWindow::saveSession() 2740 MainWindow::saveSession()
2724 { 2741 {