# HG changeset patch # User Chris Cannam # Date 1423477867 0 # Node ID 6d3220e7ecef19cd5ccc35384243d1711458224e # Parent 93a770ecfc988ef90d9123580dc079b934e53b62# Parent 35ce47084c845698f3f4f4fb091b5b0e4aa3f8b7 Merge from default branch diff -r 93a770ecfc98 -r 6d3220e7ecef .hgsubstate --- a/.hgsubstate Mon Nov 17 15:31:08 2014 +0000 +++ b/.hgsubstate Mon Feb 09 10:31:07 2015 +0000 @@ -1,5 +1,5 @@ d16f0fd6db6104d87882bc43788a3bb1b0f8c528 dataquay 879bdc878826bebec67130326f99397c430419b1 sv-dependency-builds 7a671befc76df9b87b00c9eea4bb603c773966ec svapp -dbb7f0ab011e7cc6f634e9623b956bf50174caad svcore -899c4d7e7e6395928e1e26a41504c2b22963dbf1 svgui +ce1077bd663a337219375ed92b7f5564df7aa553 svcore +2be9753651c8df0fd499a294811a30278a6e5ea2 svgui diff -r 93a770ecfc98 -r 6d3220e7ecef main/MainWindow.cpp --- a/main/MainWindow.cpp Mon Nov 17 15:31:08 2014 +0000 +++ b/main/MainWindow.cpp Mon Feb 09 10:31:07 2015 +0000 @@ -24,6 +24,7 @@ #include "data/model/SparseOneDimensionalModel.h" #include "data/model/RangeSummarisableTimeValueModel.h" #include "data/model/NoteModel.h" +#include "data/model/AggregateWaveModel.h" #include "data/model/Labeller.h" #include "data/osc/OSCQueue.h" #include "framework/Document.h" @@ -55,6 +56,7 @@ #include "widgets/TransformFinder.h" #include "widgets/LabelCounterInputDialog.h" #include "widgets/ActivityLog.h" +#include "widgets/UnitConverter.h" #include "audioio/AudioCallbackPlaySource.h" #include "audioio/AudioCallbackPlayTarget.h" #include "audioio/AudioTargetFactory.h" @@ -161,6 +163,7 @@ m_preferencesDialog(0), m_layerTreeDialog(0), m_activityLog(new ActivityLog()), + m_unitConverter(new UnitConverter()), m_keyReference(new KeyReference()), m_templateWatcher(0) { @@ -296,6 +299,8 @@ connect(this, SIGNAL(replacedDocument()), this, SLOT(documentReplaced())); m_activityLog->hide(); + m_unitConverter->hide(); + newSession(); connect(m_midiInput, SIGNAL(eventsAvailable()), @@ -325,6 +330,7 @@ // SVDEBUG << "MainWindow::~MainWindow" << endl; delete m_keyReference; delete m_activityLog; + delete m_unitConverter; delete m_preferencesDialog; delete m_layerTreeDialog; delete m_versionTester; @@ -1025,6 +1031,11 @@ connect(action, SIGNAL(triggered()), this, SLOT(showActivityLog())); menu->addAction(action); + action = new QAction(tr("Show &Unit Converter"), this); + action->setStatusTip(tr("Open a window of pitch and timing conversion utilities")); + connect(action, SIGNAL(triggered()), this, SLOT(showUnitConverter())); + menu->addAction(action); + menu->addSeparator(); action = new QAction(tr("Go Full-Screen"), this); @@ -2942,6 +2953,7 @@ delete m_preferencesDialog.data(); m_activityLog->hide(); + m_unitConverter->hide(); m_keyReference->hide(); delete m_document; @@ -3388,7 +3400,7 @@ QMessageBox::critical(this, tr("Failed to save file"), tr("Save failed
Session file \"%1\" could not be saved.").arg(path));
} else {
- setWindowTitle(tr("%1: %1")
+ setWindowTitle(tr("%1: %2")
.arg(QApplication::applicationName())
.arg(QFileInfo(path).fileName()));
m_sessionFile = path;
@@ -3694,22 +3706,46 @@
m_document->getTransformInputModels();
Model *defaultInputModel = 0;
+
for (int j = 0; j < pane->getLayerCount(); ++j) {
+
Layer *layer = pane->getLayer(j);
if (!layer) continue;
+
if (LayerFactory::getInstance()->getLayerType(layer) !=
LayerFactory::Waveform &&
!layer->isLayerOpaque()) continue;
+
Model *model = layer->getModel();
if (!model) continue;
+
for (size_t k = 0; k < candidateInputModels.size(); ++k) {
if (candidateInputModels[k] == model) {
defaultInputModel = model;
break;
}
}
+
if (defaultInputModel) break;
}
+
+ if (candidateInputModels.size() > 1) {
+ // Add an aggregate model as another option
+ AggregateWaveModel::ChannelSpecList sl;
+ foreach (Model *m, candidateInputModels) {
+ RangeSummarisableTimeValueModel *r =
+ qobject_cast