# HG changeset patch # User Chris Cannam # Date 1417451500 0 # Node ID c62c3e4825ee718004fc0f31b910d8012a1073eb # Parent 34587a06f6f03386bfc5c88c3fc7787177d8cf72 Start work on unit converter diff -r 34587a06f6f0 -r c62c3e4825ee .hgsubstate --- a/.hgsubstate Mon Dec 01 15:42:58 2014 +0000 +++ b/.hgsubstate Mon Dec 01 16:31:40 2014 +0000 @@ -2,4 +2,4 @@ 879bdc878826bebec67130326f99397c430419b1 sv-dependency-builds 7b2dd0d4c366057ce25547a4015f3a76981abedc svapp eecf544bed921d6e479490f2cd359e1f9affc902 svcore -33157c3f0e80015ae745bf2e3633a9e7a684cfc5 svgui +8be34e5ef7ff6311220ecce794cc03e9bd972de0 svgui diff -r 34587a06f6f0 -r c62c3e4825ee main/MainWindow.cpp --- 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 = diff -r 34587a06f6f0 -r c62c3e4825ee main/MainWindow.h --- a/main/MainWindow.h Mon Dec 01 15:42:58 2014 +0000 +++ b/main/MainWindow.h Mon Dec 01 16:31:40 2014 +0000 @@ -22,6 +22,7 @@ class Surveyer; class LayerTreeDialog; class ActivityLog; +class UnitConverter; class QFileSystemWatcher; class QScrollArea; @@ -136,6 +137,7 @@ virtual void showLayerTree(); virtual void showActivityLog(); + virtual void showUnitConverter(); virtual void mouseEnteredWidget(); virtual void mouseLeftWidget(); @@ -208,6 +210,7 @@ QPointer m_layerTreeDialog; ActivityLog *m_activityLog; + UnitConverter *m_unitConverter; KeyReference *m_keyReference; QFileSystemWatcher *m_templateWatcher;