Mercurial > hg > sonic-visualiser
diff main/OSCHandler.cpp @ 1150:5e6e1e074080 3.0-plus-imaf
Merge branches 3.0-integration and imaf_enc to 3.0-plus-imaf
author | Chris Cannam |
---|---|
date | Wed, 20 Apr 2016 12:06:28 +0100 |
parents | 28ccb621d1af bfd68cc71a25 |
children |
line wrap: on
line diff
--- a/main/OSCHandler.cpp Fri Apr 15 16:26:15 2016 +0100 +++ b/main/OSCHandler.cpp Wed Apr 20 12:06:28 2016 +0100 @@ -5,7 +5,7 @@ An audio file viewer and annotation editor. Centre for Digital Music, Queen Mary, University of London. This file copyright 2006-2007 Chris Cannam and QMUL. - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the @@ -36,7 +36,7 @@ void MainWindow::handleOSCMessage(const OSCMessage &message) { - SVDEBUG << "MainWindow::handleOSCMessage: thread id = " + SVDEBUG << "MainWindow::handleOSCMessage: thread id = " << QThread::currentThreadId() << endl; // This large function should really be abstracted out. @@ -155,7 +155,7 @@ if (play) { m_viewManager->setPlaySelectionMode(selection); - } + } if (selection) { MultiSelection::SelectionList sl = m_viewManager->getSelections(); @@ -200,7 +200,7 @@ } } else if (message.getMethod() == "stop") { - + if (m_playSource->isPlaying()) m_playSource->stop(); } else if (message.getMethod() == "loop") { @@ -242,7 +242,7 @@ if (message.getArgCount() == 2 && message.getArg(0).canConvert(QVariant::Double) && message.getArg(1).canConvert(QVariant::Double)) { - + double t0 = message.getArg(0).toDouble(); double t1 = message.getArg(1).toDouble(); if (t1 < t0) { double temp = t0; t0 = t1; t1 = temp; } @@ -251,7 +251,7 @@ f0 = lrint(t0 * getMainModel()->getSampleRate()); f1 = lrint(t1 * getMainModel()->getSampleRate()); - + Pane *pane = m_paneStack->getCurrentPane(); Layer *layer = 0; if (pane) layer = pane->getSelectedLayer(); @@ -302,7 +302,7 @@ } QString str = message.getArg(0).toString(); - + LayerFactory::LayerType type = LayerFactory::getInstance()->getLayerTypeForName(str); @@ -314,7 +314,7 @@ LayerConfiguration configuration(type, getMainModel(), channel); - + addPane(configuration, tr("Add %1 Pane") .arg(LayerFactory::getInstance()-> @@ -353,7 +353,7 @@ m_viewManager->setOverlayMode(ViewManager::StandardOverlays); } else { m_viewManager->setOverlayMode(ViewManager::AllOverlays); - } + } } else if (property == "zoomwheels") { m_viewManager->setZoomWheelsEnabled(value > 0.5); } else if (property == "propertyboxes") { @@ -361,7 +361,7 @@ (m_paneStack->getLayoutStyle() == PaneStack::NoPropertyStacks)); if (toggle) togglePropertyBoxes(); } - + } else { PropertyContainer *container = 0; Pane *pane = m_paneStack->getCurrentPane(); @@ -417,7 +417,7 @@ if (message.getArgCount() == 1 && message.getArg(0).canConvert(QVariant::String)) { - + QString target = message.getArg(0).toString(); if (target == "pane") { @@ -492,12 +492,12 @@ } } else if (message.getMethod() == "quit") { - + m_abandoning = true; close(); } else if (message.getMethod() == "resize") { - + if (message.getArgCount() == 2) { int width = 0, height = 0; @@ -531,9 +531,9 @@ TransformId transformId = message.getArg(0).toString(); - Transform transform = TransformFactory::getInstance()-> + Transform transform = TransformFactory::getInstance()-> getDefaultTransformFor(transformId); - + Layer *newLayer = m_document->createDerivedLayer (transform, getMainModel()); @@ -549,5 +549,5 @@ << "method \"" << message.getMethod() << "\"" << endl; } - + }