History

Merge branch 'master' into 20263

David Rowe committed 11 years ago

Commit 95efe982 parents ebe8007 89967fb109 files · +681 −487Browse files

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

Unified · Split

interface/src/Menu.cpp+8−8
@@ -475,7 +475,7 @@ Menu::Menu() : · 474 unmodified lines
475 addCheckableActionToQMenuAndActionHash(timingMenu, MenuOption::PipelineWarnings);475 addCheckableActionToQMenuAndActionHash(timingMenu, MenuOption::PipelineWarnings);
476 addCheckableActionToQMenuAndActionHash(timingMenu, MenuOption::SuppressShortTimings);476 addCheckableActionToQMenuAndActionHash(timingMenu, MenuOption::SuppressShortTimings);
477 477
478 Audio::SharedPointer audioIO = DependencyManager::get<Audio>();478 auto audioIO = DependencyManager::get<Audio>();
479 QMenu* audioDebugMenu = developerMenu->addMenu("Audio");479 QMenu* audioDebugMenu = developerMenu->addMenu("Audio");
480 addCheckableActionToQMenuAndActionHash(audioDebugMenu, MenuOption::AudioNoiseReduction,480 addCheckableActionToQMenuAndActionHash(audioDebugMenu, MenuOption::AudioNoiseReduction,
481 0,481 0,
@@ -524,7 +524,7 @@ Menu::Menu() : · 42 unmodified lines
524 audioSourceGroup->addAction(sine440);524 audioSourceGroup->addAction(sine440);
525 }525 }
526 526
527 AudioScope::SharedPointer scope = DependencyManager::get<AudioScope>();527 auto scope = DependencyManager::get<AudioScope>();
528 528
529 QMenu* audioScopeMenu = audioDebugMenu->addMenu("Audio Scope");529 QMenu* audioScopeMenu = audioDebugMenu->addMenu("Audio Scope");
530 addCheckableActionToQMenuAndActionHash(audioScopeMenu, MenuOption::AudioScope,530 addCheckableActionToQMenuAndActionHash(audioScopeMenu, MenuOption::AudioScope,
@@ -562,7 +562,7 @@ Menu::Menu() : · 31 unmodified lines
562 audioScopeFramesGroup->addAction(fiftyFrames);562 audioScopeFramesGroup->addAction(fiftyFrames);
563 }563 }
564 564
565 AudioIOStatsRenderer::SharedPointer statsRenderer = DependencyManager::get<AudioIOStatsRenderer>();565 auto statsRenderer = DependencyManager::get<AudioIOStatsRenderer>();
566 addCheckableActionToQMenuAndActionHash(audioDebugMenu, MenuOption::AudioStats,566 addCheckableActionToQMenuAndActionHash(audioDebugMenu, MenuOption::AudioStats,
567 Qt::CTRL | Qt::SHIFT | Qt::Key_A,567 Qt::CTRL | Qt::SHIFT | Qt::Key_A,
568 false,568 false,
@@ -600,7 +600,7 @@ void Menu::loadSettings(QSettings* settings) { · 31 unmodified lines
600 _receivedAudioStreamSettings._windowSecondsForDesiredReduction = settings->value("windowSecondsForDesiredReduction", DEFAULT_WINDOW_SECONDS_FOR_DESIRED_REDUCTION).toInt();600 _receivedAudioStreamSettings._windowSecondsForDesiredReduction = settings->value("windowSecondsForDesiredReduction", DEFAULT_WINDOW_SECONDS_FOR_DESIRED_REDUCTION).toInt();
601 _receivedAudioStreamSettings._repetitionWithFade = settings->value("repetitionWithFade", DEFAULT_REPETITION_WITH_FADE).toBool();601 _receivedAudioStreamSettings._repetitionWithFade = settings->value("repetitionWithFade", DEFAULT_REPETITION_WITH_FADE).toBool();
602 602
603 QSharedPointer<Audio> audio = DependencyManager::get<Audio>();603 auto audio = DependencyManager::get<Audio>();
604 audio->setOutputStarveDetectionEnabled(settings->value("audioOutputStarveDetectionEnabled", DEFAULT_AUDIO_OUTPUT_STARVE_DETECTION_ENABLED).toBool());604 audio->setOutputStarveDetectionEnabled(settings->value("audioOutputStarveDetectionEnabled", DEFAULT_AUDIO_OUTPUT_STARVE_DETECTION_ENABLED).toBool());
605 audio->setOutputStarveDetectionThreshold(settings->value("audioOutputStarveDetectionThreshold", DEFAULT_AUDIO_OUTPUT_STARVE_DETECTION_THRESHOLD).toInt());605 audio->setOutputStarveDetectionThreshold(settings->value("audioOutputStarveDetectionThreshold", DEFAULT_AUDIO_OUTPUT_STARVE_DETECTION_THRESHOLD).toInt());
606 audio->setOutputStarveDetectionPeriod(settings->value("audioOutputStarveDetectionPeriod", DEFAULT_AUDIO_OUTPUT_STARVE_DETECTION_PERIOD).toInt());606 audio->setOutputStarveDetectionPeriod(settings->value("audioOutputStarveDetectionPeriod", DEFAULT_AUDIO_OUTPUT_STARVE_DETECTION_PERIOD).toInt());
@@ -634,7 +634,7 @@ void Menu::loadSettings(QSettings* settings) { · 27 unmodified lines
634 Application::getInstance()->updateWindowTitle();634 Application::getInstance()->updateWindowTitle();
635 635
636 // notify that a settings has changed636 // notify that a settings has changed
637 connect(&NodeList::getInstance()->getDomainHandler(), &DomainHandler::hostnameChanged, this, &Menu::bumpSettings);637 connect(&DependencyManager::get<NodeList>()->getDomainHandler(), &DomainHandler::hostnameChanged, this, &Menu::bumpSettings);
638 638
639 // MyAvatar caches some menu options, so we have to update them whenever we load settings.639 // MyAvatar caches some menu options, so we have to update them whenever we load settings.
640 // TODO: cache more settings in MyAvatar that are checked with very high frequency.640 // TODO: cache more settings in MyAvatar that are checked with very high frequency.
@@ -665,7 +665,7 @@ void Menu::saveSettings(QSettings* settings) { · 24 unmodified lines
665 settings->setValue("windowSecondsForDesiredReduction", _receivedAudioStreamSettings._windowSecondsForDesiredReduction);665 settings->setValue("windowSecondsForDesiredReduction", _receivedAudioStreamSettings._windowSecondsForDesiredReduction);
666 settings->setValue("repetitionWithFade", _receivedAudioStreamSettings._repetitionWithFade);666 settings->setValue("repetitionWithFade", _receivedAudioStreamSettings._repetitionWithFade);
667 667
668 QSharedPointer<Audio> audio = DependencyManager::get<Audio>();668 auto audio = DependencyManager::get<Audio>();
669 settings->setValue("audioOutputStarveDetectionEnabled", audio->getOutputStarveDetectionEnabled());669 settings->setValue("audioOutputStarveDetectionEnabled", audio->getOutputStarveDetectionEnabled());
670 settings->setValue("audioOutputStarveDetectionThreshold", audio->getOutputStarveDetectionThreshold());670 settings->setValue("audioOutputStarveDetectionThreshold", audio->getOutputStarveDetectionThreshold());
671 settings->setValue("audioOutputStarveDetectionPeriod", audio->getOutputStarveDetectionPeriod());671 settings->setValue("audioOutputStarveDetectionPeriod", audio->getOutputStarveDetectionPeriod());
@@ -916,7 +916,7 @@ void Menu::bumpSettings() { · 244 unmodified lines
916 916
917void sendFakeEnterEvent() {917void sendFakeEnterEvent() {
918 QPoint lastCursorPosition = QCursor::pos();918 QPoint lastCursorPosition = QCursor::pos();
919 GLCanvas::SharedPointer glCanvas = DependencyManager::get<GLCanvas>();919 auto glCanvas = DependencyManager::get<GLCanvas>();
920 920
921 QPoint windowPosition = glCanvas->mapFromGlobal(lastCursorPosition);921 QPoint windowPosition = glCanvas->mapFromGlobal(lastCursorPosition);
922 QEnterEvent enterEvent = QEnterEvent(windowPosition, windowPosition, lastCursorPosition);922 QEnterEvent enterEvent = QEnterEvent(windowPosition, windowPosition, lastCursorPosition);
@@ -1183,7 +1183,7 @@ void Menu::nameLocation() { · 260 unmodified lines
1183 return;1183 return;
1184 }1184 }
1185 1185
1186 DomainHandler& domainHandler = NodeList::getInstance()->getDomainHandler();1186 DomainHandler& domainHandler = DependencyManager::get<NodeList>()->getDomainHandler();
1187 if (domainHandler.getUUID().isNull()) {1187 if (domainHandler.getUUID().isNull()) {
1188 const QString UNREGISTERED_DOMAIN_MESSAGE = "This domain is not registered with High Fidelity."1188 const QString UNREGISTERED_DOMAIN_MESSAGE = "This domain is not registered with High Fidelity."
1189 "\n\nYou cannot create a global location in an unregistered domain.";1189 "\n\nYou cannot create a global location in an unregistered domain.";