History

Merge pull request #3652 from ctrlaltdavid/19976

CR for Job #19976 - Microsoft Speech API: allow me to control my avatar with voice

Brad Hefta-Gaub committed 12 years ago

Commit e314fa12 parents 6b4b0bc 627dad86 files · +292 −30Browse files

Showing the changes to interface/src/Menu.cpp (1 of 6 files). Show all

Unified · Split

interface/src/Menu.cpp+4−4
@@ -99,7 +99,7 @@ Menu::Menu() : · 98 unmodified lines
99 _lodToolsDialog(NULL),99 _lodToolsDialog(NULL),
100 _newLocationDialog(NULL),100 _newLocationDialog(NULL),
101 _userLocationsDialog(NULL),101 _userLocationsDialog(NULL),
102#ifdef Q_OS_MAC102#if defined(Q_OS_MAC) || defined(Q_OS_WIN)
103 _speechRecognizer(),103 _speechRecognizer(),
104#endif104#endif
105 _maxVoxels(DEFAULT_MAX_VOXELS_PER_SYSTEM),105 _maxVoxels(DEFAULT_MAX_VOXELS_PER_SYSTEM),
@@ -225,7 +225,7 @@ Menu::Menu() : · 119 unmodified lines
225 addActionToQMenuAndActionHash(toolsMenu, MenuOption::MetavoxelEditor, 0, this, SLOT(showMetavoxelEditor()));225 addActionToQMenuAndActionHash(toolsMenu, MenuOption::MetavoxelEditor, 0, this, SLOT(showMetavoxelEditor()));
226 addActionToQMenuAndActionHash(toolsMenu, MenuOption::ScriptEditor, Qt::ALT | Qt::Key_S, this, SLOT(showScriptEditor()));226 addActionToQMenuAndActionHash(toolsMenu, MenuOption::ScriptEditor, Qt::ALT | Qt::Key_S, this, SLOT(showScriptEditor()));
227 227
228#ifdef Q_OS_MAC228#if defined(Q_OS_MAC) || defined(Q_OS_WIN)
229 QAction* speechRecognizerAction = addCheckableActionToQMenuAndActionHash(toolsMenu, MenuOption::ControlWithSpeech,229 QAction* speechRecognizerAction = addCheckableActionToQMenuAndActionHash(toolsMenu, MenuOption::ControlWithSpeech,
230 Qt::CTRL | Qt::SHIFT | Qt::Key_C, _speechRecognizer.getEnabled(), &_speechRecognizer, SLOT(setEnabled(bool)));230 Qt::CTRL | Qt::SHIFT | Qt::Key_C, _speechRecognizer.getEnabled(), &_speechRecognizer, SLOT(setEnabled(bool)));
231 connect(&_speechRecognizer, SIGNAL(enabledUpdated(bool)), speechRecognizerAction, SLOT(setChecked(bool)));231 connect(&_speechRecognizer, SIGNAL(enabledUpdated(bool)), speechRecognizerAction, SLOT(setChecked(bool)));
@@ -769,7 +769,7 @@ void Menu::loadSettings(QSettings* settings) { · 537 unmodified lines
769 QStandardPaths::writableLocation(QStandardPaths::DesktopLocation)).toString();769 QStandardPaths::writableLocation(QStandardPaths::DesktopLocation)).toString();
770 setScriptsLocation(settings->value("scriptsLocation", QString()).toString());770 setScriptsLocation(settings->value("scriptsLocation", QString()).toString());
771 771
772#ifdef Q_OS_MAC772#if defined(Q_OS_MAC) || defined(Q_OS_WIN)
773 _speechRecognizer.setEnabled(settings->value("speechRecognitionEnabled", false).toBool());773 _speechRecognizer.setEnabled(settings->value("speechRecognitionEnabled", false).toBool());
774#endif774#endif
775 775
@@ -835,7 +835,7 @@ void Menu::saveSettings(QSettings* settings) { · 59 unmodified lines
835 settings->setValue("boundaryLevelAdjust", _boundaryLevelAdjust);835 settings->setValue("boundaryLevelAdjust", _boundaryLevelAdjust);
836 settings->setValue("snapshotsLocation", _snapshotsLocation);836 settings->setValue("snapshotsLocation", _snapshotsLocation);
837 settings->setValue("scriptsLocation", _scriptsLocation);837 settings->setValue("scriptsLocation", _scriptsLocation);
838#ifdef Q_OS_MAC838#if defined(Q_OS_MAC) || defined(Q_OS_WIN)
839 settings->setValue("speechRecognitionEnabled", _speechRecognizer.getEnabled());839 settings->setValue("speechRecognitionEnabled", _speechRecognizer.getEnabled());
840#endif840#endif
841 settings->beginGroup("View Frustum Offset Camera");841 settings->beginGroup("View Frustum Offset Camera");