Mercurial > hg > tony
changeset 365:fec4dafd9093
mergewq
author | matthiasm |
---|---|
date | Tue, 15 Jul 2014 15:42:46 +0100 |
parents | f5a4c4283b93 (diff) ca53880fa3ca (current diff) |
children | 6439ca6e7de1 |
files | .hgsubstate src/MainWindow.cpp src/main.cpp |
diffstat | 4 files changed, 19 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgsubstate Wed Jul 02 19:22:05 2014 +0100 +++ b/.hgsubstate Tue Jul 15 15:42:46 2014 +0100 @@ -1,6 +1,6 @@ e32a354434aa5fa7440efa17b716aacd761049fa chp d16f0fd6db6104d87882bc43788a3bb1b0f8c528 dataquay -e637cf9160029c6d429bf89fedca157619ca8da8 pyin +4cbbd87a8c7f95ccac8e7900eef4f08bbdbb032f pyin 553a5f65ef64811747a6613f759622d655db63c1 sv-dependency-builds d8bde801ebd40d722df379eee3b40729d3b78380 svapp 178ffa964096f32ace219b21e0fb2e7e71bde1a2 svcore
--- a/src/MainWindow.cpp Wed Jul 02 19:22:05 2014 +0100 +++ b/src/MainWindow.cpp Tue Jul 15 15:42:46 2014 +0100 @@ -88,7 +88,7 @@ using std::vector; -MainWindow::MainWindow(bool withAudioOutput) : +MainWindow::MainWindow(bool withAudioOutput, bool withSonification, bool withSpectrogram) : MainWindowBase(withAudioOutput, false), m_overview(0), m_mainMenusCreated(false), @@ -102,7 +102,9 @@ m_intelligentActionOn(true), //GF: !!! temporary m_activityLog(new ActivityLog()), m_keyReference(new KeyReference()), - m_selectionAnchor(0) + m_selectionAnchor(0), + m_withSonification(withSonification), + m_withSpectrogram(withSpectrogram) { setWindowTitle(QApplication::applicationName()); @@ -282,7 +284,7 @@ m_gainNotes->setFixedHeight(24); m_gainNotes->setNotchesVisible(true); m_gainNotes->setPageStep(10); - m_gainNotes->setObjectName(tr("Pitch Track Gain")); + m_gainNotes->setObjectName(tr("Note Gain")); m_gainNotes->setRangeMapper(new LinearRangeMapper(-50, 50, -25, 25, tr("dB"))); m_gainNotes->setShowToolTip(true); connect(m_gainNotes, SIGNAL(valueChanged(int)), @@ -339,7 +341,7 @@ m_panNotes->setFixedHeight(24); m_panNotes->setNotchesVisible(true); m_panNotes->setPageStep(10); - m_panNotes->setObjectName(tr("Notes Track Pan")); + m_panNotes->setObjectName(tr("Note Pan")); m_panNotes->setRangeMapper(new LinearRangeMapper(-100, 100, -100, 100, tr(""))); m_panNotes->setShowToolTip(true); connect(m_panNotes, SIGNAL(valueChanged(int)),
--- a/src/MainWindow.h Wed Jul 02 19:22:05 2014 +0100 +++ b/src/MainWindow.h Tue Jul 15 15:42:46 2014 +0100 @@ -27,7 +27,7 @@ Q_OBJECT public: - MainWindow(bool withAudioOutput = true); + MainWindow(bool withAudioOutput = true, bool withSonification = true, bool withSpectrogram = true); virtual ~MainWindow(); signals: @@ -233,6 +233,9 @@ int m_selectionAnchor; + bool m_withSonification; + bool m_withSpectrogram; + Analyser::FrequencyRange m_pendingConstraint; QString exportToSVL(QString path, Layer *layer);
--- a/src/main.cpp Wed Jul 02 19:22:05 2014 +0100 +++ b/src/main.cpp Tue Jul 15 15:42:46 2014 +0100 @@ -137,14 +137,7 @@ TonyApplication application(argc, argv); - // For some weird reason, Mac builds are crashing on startup when - // this line is present. Eliminate it on that platform for now. -#ifndef Q_OS_MAC QStringList args = application.arguments(); -#else - cerr << "NOTE: Command-line arguments are currently disabled on Mac, see comments in main.cpp" << endl; - QStringList args; -#endif signal(SIGINT, signalHandler); signal(SIGTERM, signalHandler); @@ -155,15 +148,21 @@ #endif bool audioOutput = true; + bool sonification = true; + bool spectrogram = true; if (args.contains("--help") || args.contains("-h") || args.contains("-?")) { std::cerr << QApplication::tr( - "\nTony is a program for interactive note and pitch analysis and annotation.\n\nUsage:\n\n %1 [--no-audio] [--no-osc] [<file> ...]\n\n --no-audio: Do not attempt to open an audio output device\n <file>: One or more Tony (.ton) and audio files may be provided.\n").arg(argv[0]).toStdString() << std::endl; + "\nTony is a program for interactive note and pitch analysis and annotation.\n\nUsage:\n\n %1 [--no-audio] [--no-sonification] [--no-spectrogram] [<file> ...]\n\n --no-audio: Do not attempt to open an audio output device\n <file>: One or more Tony (.ton) and audio files may be provided.\n --no-sonification: Disable and hide sonification of pitch tracks and notes.\n --no-spectrogram: Disable spectrogram.").arg(argv[0]).toStdString() << std::endl; exit(2); } if (args.contains("--no-audio")) audioOutput = false; + if (args.contains("--no-sonification")) sonification = false; + + if (args.contains("--no-spectrogram")) spectrogram = false; + QApplication::setOrganizationName("QMUL"); QApplication::setOrganizationDomain("qmul.ac.uk"); QApplication::setApplicationName("Tony"); @@ -204,7 +203,7 @@ qRegisterMetaType<size_t>("size_t"); qRegisterMetaType<PropertyContainer::PropertyName>("PropertyContainer::PropertyName"); - MainWindow *gui = new MainWindow(audioOutput); + MainWindow *gui = new MainWindow(audioOutput, sonification, spectrogram); application.setMainWindow(gui); if (splash) { QObject::connect(gui, SIGNAL(hideSplash()), splash, SLOT(hide()));