Mercurial > hg > sonic-visualiser
diff main/MainWindow.cpp @ 891:c62c3e4825ee
Start work on unit converter
author | Chris Cannam |
---|---|
date | Mon, 01 Dec 2014 16:31:40 +0000 |
parents | ce4d9e149086 |
children | 509b4649b172 |
line wrap: on
line diff
--- a/main/MainWindow.cpp Mon Dec 01 15:42:58 2014 +0000 +++ b/main/MainWindow.cpp Mon Dec 01 16:31:40 2014 +0000 @@ -55,6 +55,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 +162,7 @@ m_preferencesDialog(0), m_layerTreeDialog(0), m_activityLog(new ActivityLog()), + m_unitConverter(new UnitConverter()), m_keyReference(new KeyReference()), m_templateWatcher(0) { @@ -296,6 +298,8 @@ connect(this, SIGNAL(replacedDocument()), this, SLOT(documentReplaced())); m_activityLog->hide(); + m_unitConverter->hide(); + newSession(); connect(m_midiInput, SIGNAL(eventsAvailable()), @@ -325,6 +329,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 +1030,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 +2952,7 @@ delete m_preferencesDialog.data(); m_activityLog->hide(); + m_unitConverter->hide(); m_keyReference->hide(); delete m_document; @@ -4361,6 +4372,13 @@ } void +MainWindow::showUnitConverter() +{ + m_unitConverter->show(); + m_unitConverter->raise(); +} + +void MainWindow::preferences() { bool goToTemplateTab =