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