Mercurial > hg > easaier-soundaccess
diff sv/main/MainWindow.cpp @ 263:63a485275ed6
Speech recognition is integrated
author | benoitrigolleau |
---|---|
date | Fri, 20 Jun 2008 14:06:54 +0000 |
parents | 3f41cb822166 |
children | ee047fc1a552 |
line wrap: on
line diff
--- a/sv/main/MainWindow.cpp Fri Jun 20 12:33:08 2008 +0000 +++ b/sv/main/MainWindow.cpp Fri Jun 20 14:06:54 2008 +0000 @@ -75,6 +75,8 @@ #include "filter/FilterStack.h" #include "filter/RealTimeFilterFactory.h" +#include "widgets/SpeechRecognitionUI.h" + // For version information #include "vamp/vamp.h" #include "vamp-sdk/PluginBase.h" @@ -737,6 +739,7 @@ action->setStatusTip(tr("Exit Sonic Visualiser")); connect(action, SIGNAL(triggered()), this, SLOT(exit())); menu->addAction(action); + } void @@ -787,7 +790,6 @@ action->setShortcut(tr("Ctrl+Q")); connect(action, SIGNAL(triggered()), this, SLOT(exit())); menu->addAction(action); - } void @@ -915,6 +917,7 @@ action = new QAction(tr("&Style setting"), this); connect(action, SIGNAL(triggered()), this, SLOT(styleSetting())); menu->addAction(action); + } void @@ -1410,6 +1413,8 @@ connect(this, SIGNAL(canDeleteCurrentLayer(bool)), action, SLOT(setEnabled(bool))); menu->addAction(action); m_rightButtonLayerMenu->addAction(action); + + } void @@ -1879,6 +1884,14 @@ addToolBar(connectionStatus); toolNavigateSelected(); + + toolbar->addSeparator(); + m_speechRecognitionUI = new SpeechRecognitionUI(); + QIcon icon = QIcon(":icons/new.png"); + action = new QAction(icon, tr("Speech Recognition..."), this); + action->setStatusTip(tr("Open speech recognition module")); + connect(action, SIGNAL(triggered()), this, SLOT(openSpeechQuery())); + toolbar->addAction(action); } void @@ -5585,4 +5598,13 @@ EasaierSessionManager *MainWindow::getEasaierSessionManager(){ return m_EasaierManager; +} + +SpeechRecognitionUI* MainWindow::getSpeechRecognitionUI(){ + return m_speechRecognitionUI; +} + +void MainWindow::openSpeechQuery(){ + m_speechRecognitionUI->show(); + m_speechRecognitionUI->topLevelWidget(); } \ No newline at end of file