History

Merge branch 'master' into 21776

David Rowe committed 8 years ago

Commit b1bda282 parents 287ea8e b7ac07f239 files · +7281 −1767Browse files

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

Unified · Split

interface/src/Application.cpp+28−2
@@ -69,6 +69,7 @@ · 68 unmodified lines
69#include <AudioInjectorManager.h>69#include <AudioInjectorManager.h>
70#include <AvatarBookmarks.h>70#include <AvatarBookmarks.h>
71#include <CursorManager.h>71#include <CursorManager.h>
72#include <VirtualPadManager.h>
72#include <DebugDraw.h>73#include <DebugDraw.h>
73#include <DeferredLightingEffect.h>74#include <DeferredLightingEffect.h>
74#include <EntityScriptClient.h>75#include <EntityScriptClient.h>
@@ -137,6 +138,7 @@ · 62 unmodified lines
137#include <recording/Recorder.h>138#include <recording/Recorder.h>
138#include <shared/StringHelpers.h>139#include <shared/StringHelpers.h>
139#include <QmlWebWindowClass.h>140#include <QmlWebWindowClass.h>
141#include <QmlFragmentClass.h>
140#include <Preferences.h>142#include <Preferences.h>
141#include <display-plugins/CompositorHelper.h>143#include <display-plugins/CompositorHelper.h>
142#include <trackers/EyeTracker.h>144#include <trackers/EyeTracker.h>
@@ -777,6 +779,7 @@ bool setupEssentials(int& argc, char** argv, bool runningMarkerExisted) { · 634 unmodified lines
777 DependencyManager::set<PointerScriptingInterface>();779 DependencyManager::set<PointerScriptingInterface>();
778 DependencyManager::set<PickScriptingInterface>();780 DependencyManager::set<PickScriptingInterface>();
779 DependencyManager::set<Cursor::Manager>();781 DependencyManager::set<Cursor::Manager>();
782 DependencyManager::set<VirtualPad::Manager>();
780 DependencyManager::set<DesktopPreviewProvider>();783 DependencyManager::set<DesktopPreviewProvider>();
781 DependencyManager::set<AccountManager>(std::bind(&Application::getUserAgent, qApp));784 DependencyManager::set<AccountManager>(std::bind(&Application::getUserAgent, qApp));
782 DependencyManager::set<StatTracker>();785 DependencyManager::set<StatTracker>();
@@ -1522,12 +1525,15 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 739 unmodified lines
1522 return DependencyManager::get<OffscreenUi>()->navigationFocused() ? 1 : 0;1525 return DependencyManager::get<OffscreenUi>()->navigationFocused() ? 1 : 0;
1523 });1526 });
1524 1527
1525 // Setup the _keyboardMouseDevice, _touchscreenDevice and the user input mapper with the default bindings1528 // Setup the _keyboardMouseDevice, _touchscreenDevice, _touchscreenVirtualPadDevice and the user input mapper with the default bindings
1526 userInputMapper->registerDevice(_keyboardMouseDevice->getInputDevice());1529 userInputMapper->registerDevice(_keyboardMouseDevice->getInputDevice());
1527 // if the _touchscreenDevice is not supported it will not be registered1530 // if the _touchscreenDevice is not supported it will not be registered
1528 if (_touchscreenDevice) {1531 if (_touchscreenDevice) {
1529 userInputMapper->registerDevice(_touchscreenDevice->getInputDevice());1532 userInputMapper->registerDevice(_touchscreenDevice->getInputDevice());
1530 }1533 }
1534 if (_touchscreenVirtualPadDevice) {
1535 userInputMapper->registerDevice(_touchscreenVirtualPadDevice->getInputDevice());
1536 }
1531 1537
1532 // this will force the model the look at the correct directory (weird order of operations issue)1538 // this will force the model the look at the correct directory (weird order of operations issue)
1533 scriptEngines->reloadLocalFiles();1539 scriptEngines->reloadLocalFiles();
@@ -2611,6 +2617,9 @@ void Application::initializeUi() { · 1077 unmodified lines
2611 if (TouchscreenDevice::NAME == inputPlugin->getName()) {2617 if (TouchscreenDevice::NAME == inputPlugin->getName()) {
2612 _touchscreenDevice = std::dynamic_pointer_cast<TouchscreenDevice>(inputPlugin);2618 _touchscreenDevice = std::dynamic_pointer_cast<TouchscreenDevice>(inputPlugin);
2613 }2619 }
2620 if (TouchscreenVirtualPadDevice::NAME == inputPlugin->getName()) {
2621 _touchscreenVirtualPadDevice = std::dynamic_pointer_cast<TouchscreenVirtualPadDevice>(inputPlugin);
2622 }
2614 }2623 }
2615 2624
2616 auto compositorHelper = DependencyManager::get<CompositorHelper>();2625 auto compositorHelper = DependencyManager::get<CompositorHelper>();
@@ -3016,7 +3025,9 @@ void Application::handleSandboxStatus(QNetworkReply* reply) { · 399 unmodified lines
3016 3025
3017 // If this is a first run we short-circuit the address passed in3026 // If this is a first run we short-circuit the address passed in
3018 if (firstRun.get()) {3027 if (firstRun.get()) {
3028#if !defined(Q_OS_ANDROID)
3019 showHelp();3029 showHelp();
3030#endif
3020 if (sandboxIsRunning) {3031 if (sandboxIsRunning) {
3021 qCDebug(interfaceapp) << "Home sandbox appears to be running, going to Home.";3032 qCDebug(interfaceapp) << "Home sandbox appears to be running, going to Home.";
3022 DependencyManager::get<AddressManager>()->goToLocalSandbox();3033 DependencyManager::get<AddressManager>()->goToLocalSandbox();
@@ -3800,6 +3811,9 @@ void Application::touchUpdateEvent(QTouchEvent* event) { · 777 unmodified lines
3800 if (_touchscreenDevice && _touchscreenDevice->isActive()) {3811 if (_touchscreenDevice && _touchscreenDevice->isActive()) {
3801 _touchscreenDevice->touchUpdateEvent(event);3812 _touchscreenDevice->touchUpdateEvent(event);
3802 }3813 }
3814 if (_touchscreenVirtualPadDevice && _touchscreenVirtualPadDevice->isActive()) {
3815 _touchscreenVirtualPadDevice->touchUpdateEvent(event);
3816 }
3803}3817}
3804 3818
3805void Application::touchBeginEvent(QTouchEvent* event) {3819void Application::touchBeginEvent(QTouchEvent* event) {
@@ -3821,6 +3835,9 @@ void Application::touchBeginEvent(QTouchEvent* event) { · 15 unmodified lines
3821 if (_touchscreenDevice && _touchscreenDevice->isActive()) {3835 if (_touchscreenDevice && _touchscreenDevice->isActive()) {
3822 _touchscreenDevice->touchBeginEvent(event);3836 _touchscreenDevice->touchBeginEvent(event);
3823 }3837 }
3838 if (_touchscreenVirtualPadDevice && _touchscreenVirtualPadDevice->isActive()) {
3839 _touchscreenVirtualPadDevice->touchBeginEvent(event);
3840 }
3824 3841
3825}3842}
3826 3843
@@ -3841,7 +3858,9 @@ void Application::touchEndEvent(QTouchEvent* event) { · 14 unmodified lines
3841 if (_touchscreenDevice && _touchscreenDevice->isActive()) {3858 if (_touchscreenDevice && _touchscreenDevice->isActive()) {
3842 _touchscreenDevice->touchEndEvent(event);3859 _touchscreenDevice->touchEndEvent(event);
3843 }3860 }
3844 3861 if (_touchscreenVirtualPadDevice && _touchscreenVirtualPadDevice->isActive()) {
3862 _touchscreenVirtualPadDevice->touchEndEvent(event);
3863 }
3845 // put any application specific touch behavior below here..3864 // put any application specific touch behavior below here..
3846}3865}
3847 3866
@@ -3849,6 +3868,9 @@ void Application::touchGestureEvent(QGestureEvent* event) { · 1 unmodified line
3849 if (_touchscreenDevice && _touchscreenDevice->isActive()) {3868 if (_touchscreenDevice && _touchscreenDevice->isActive()) {
3850 _touchscreenDevice->touchGestureEvent(event);3869 _touchscreenDevice->touchGestureEvent(event);
3851 }3870 }
3871 if (_touchscreenVirtualPadDevice && _touchscreenVirtualPadDevice->isActive()) {
3872 _touchscreenVirtualPadDevice->touchGestureEvent(event);
3873 }
3852}3874}
3853 3875
3854void Application::wheelEvent(QWheelEvent* event) const {3876void Application::wheelEvent(QWheelEvent* event) const {
@@ -5318,7 +5340,9 @@ void Application::update(float deltaTime) { · 1463 unmodified lines
5318 bool showWarnings = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings);5340 bool showWarnings = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings);
5319 PerformanceWarning warn(showWarnings, "Application::update()");5341 PerformanceWarning warn(showWarnings, "Application::update()");
5320 5342
5343#if !defined(Q_OS_ANDROID)
5321 updateLOD(deltaTime);5344 updateLOD(deltaTime);
5345#endif
5322 5346
5323 // TODO: break these out into distinct perfTimers when they prove interesting5347 // TODO: break these out into distinct perfTimers when they prove interesting
5324 {5348 {
@@ -6047,6 +6071,7 @@ void Application::registerScriptEngineWithApplicationServices(ScriptEnginePointe · 722 unmodified lines
6047 scriptEngine->registerFunction("OverlayWebWindow", QmlWebWindowClass::constructor);6071 scriptEngine->registerFunction("OverlayWebWindow", QmlWebWindowClass::constructor);
6048#endif6072#endif
6049 scriptEngine->registerFunction("OverlayWindow", QmlWindowClass::constructor);6073 scriptEngine->registerFunction("OverlayWindow", QmlWindowClass::constructor);
6074 scriptEngine->registerFunction("QmlFragment", QmlFragmentClass::constructor);
6050 6075
6051 scriptEngine->registerGlobalObject("Menu", MenuScriptingInterface::getInstance());6076 scriptEngine->registerGlobalObject("Menu", MenuScriptingInterface::getInstance());
6052 scriptEngine->registerGlobalObject("DesktopPreviewProvider", DependencyManager::get<DesktopPreviewProvider>().data());6077 scriptEngine->registerGlobalObject("DesktopPreviewProvider", DependencyManager::get<DesktopPreviewProvider>().data());
@@ -6121,6 +6146,7 @@ void Application::registerScriptEngineWithApplicationServices(ScriptEnginePointe · 68 unmodified lines
6121 scriptEngine->registerGlobalObject("Selection", DependencyManager::get<SelectionScriptingInterface>().data());6146 scriptEngine->registerGlobalObject("Selection", DependencyManager::get<SelectionScriptingInterface>().data());
6122 scriptEngine->registerGlobalObject("ContextOverlay", DependencyManager::get<ContextOverlayInterface>().data());6147 scriptEngine->registerGlobalObject("ContextOverlay", DependencyManager::get<ContextOverlayInterface>().data());
6123 scriptEngine->registerGlobalObject("Wallet", DependencyManager::get<WalletScriptingInterface>().data());6148 scriptEngine->registerGlobalObject("Wallet", DependencyManager::get<WalletScriptingInterface>().data());
6149 scriptEngine->registerGlobalObject("AddressManager", DependencyManager::get<AddressManager>().data());
6124 6150
6125 qScriptRegisterMetaType(scriptEngine.data(), OverlayIDtoScriptValue, OverlayIDfromScriptValue);6151 qScriptRegisterMetaType(scriptEngine.data(), OverlayIDtoScriptValue, OverlayIDfromScriptValue);
6126 6152