Showing the changes to interface/src/ui/HMDToolsDialog.cpp (1 of 37 files). Show all
Unified · Split
| @@ -78,11 +78,11 @@ HMDToolsDialog::HMDToolsDialog(QWidget* parent) : · 77 unmodified lines | |||
| 78 | // what screens we're allowed on | 78 | // what screens we're allowed on |
| 79 | watchWindow(windowHandle()); | 79 | watchWindow(windowHandle()); |
| 80 | auto dialogsManager = DependencyManager::get<DialogsManager>(); | 80 | auto dialogsManager = DependencyManager::get<DialogsManager>(); |
| 81 | if (Application::getInstance()->getRunningScriptsWidget()) { | 81 | if (qApp->getRunningScriptsWidget()) { |
| 82 | watchWindow(Application::getInstance()->getRunningScriptsWidget()->windowHandle()); | 82 | watchWindow(qApp->getRunningScriptsWidget()->windowHandle()); |
| 83 | } | 83 | } |
| 84 | if (Application::getInstance()->getToolWindow()) { | 84 | if (qApp->getToolWindow()) { |
| 85 | watchWindow(Application::getInstance()->getToolWindow()->windowHandle()); | 85 | watchWindow(qApp->getToolWindow()->windowHandle()); |
| 86 | } | 86 | } |
| 87 | if (dialogsManager->getBandwidthDialog()) { | 87 | if (dialogsManager->getBandwidthDialog()) { |
| 88 | watchWindow(dialogsManager->getBandwidthDialog()->windowHandle()); | 88 | watchWindow(dialogsManager->getBandwidthDialog()->windowHandle()); |
| @@ -110,7 +110,7 @@ HMDToolsDialog::HMDToolsDialog(QWidget* parent) : · 21 unmodified lines | |||
| 110 | }); | 110 | }); |
| 111 | 111 | ||
| 112 | // watch for our application window moving screens. If it does we want to update our screen details | 112 | // watch for our application window moving screens. If it does we want to update our screen details |
| 113 | QWindow* mainWindow = Application::getInstance()->getWindow()->windowHandle(); | 113 | QWindow* mainWindow = qApp->getWindow()->windowHandle(); |
| 114 | connect(mainWindow, &QWindow::screenChanged, [this]{ | 114 | connect(mainWindow, &QWindow::screenChanged, [this]{ |
| 115 | updateUi(); | 115 | updateUi(); |
| 116 | }); | 116 | }); |
| @@ -142,7 +142,7 @@ QString HMDToolsDialog::getDebugDetails() const { · 25 unmodified lines | |||
| 142 | results += "Desktop's Primary Screen: " + desktopPrimaryScreen->name() + "\n"; | 142 | results += "Desktop's Primary Screen: " + desktopPrimaryScreen->name() + "\n"; |
| 143 | 143 | ||
| 144 | results += "Application Primary Screen: " + QGuiApplication::primaryScreen()->name() + "\n"; | 144 | results += "Application Primary Screen: " + QGuiApplication::primaryScreen()->name() + "\n"; |
| 145 | QScreen* mainWindowScreen = Application::getInstance()->getWindow()->windowHandle()->screen(); | 145 | QScreen* mainWindowScreen = qApp->getWindow()->windowHandle()->screen(); |
| 146 | results += "Application Main Window Screen: " + mainWindowScreen->name() + "\n"; | 146 | results += "Application Main Window Screen: " + mainWindowScreen->name() + "\n"; |
| 147 | results += "Total Screens: " + QString::number(QApplication::desktop()->screenCount()) + "\n"; | 147 | results += "Total Screens: " + QString::number(QApplication::desktop()->screenCount()) + "\n"; |
| 148 | 148 | ||
| @@ -159,15 +159,15 @@ void HMDToolsDialog::toggleHMDMode() { · 10 unmodified lines | |||
| 159 | 159 | ||
| 160 | void HMDToolsDialog::enterHMDMode() { | 160 | void HMDToolsDialog::enterHMDMode() { |
| 161 | if (!qApp->isHMDMode()) { | 161 | if (!qApp->isHMDMode()) { |
| 162 | Application::getInstance()->setActiveDisplayPlugin(_hmdPluginName); | 162 | qApp->setActiveDisplayPlugin(_hmdPluginName); |
| 163 | Application::getInstance()->getWindow()->activateWindow(); | 163 | qApp->getWindow()->activateWindow(); |
| 164 | } | 164 | } |
| 165 | } | 165 | } |
| 166 | 166 | ||
| 167 | void HMDToolsDialog::leaveHMDMode() { | 167 | void HMDToolsDialog::leaveHMDMode() { |
| 168 | if (qApp->isHMDMode()) { | 168 | if (qApp->isHMDMode()) { |
| 169 | Application::getInstance()->setActiveDisplayPlugin(_defaultPluginName); | 169 | qApp->setActiveDisplayPlugin(_defaultPluginName); |
| 170 | Application::getInstance()->getWindow()->activateWindow(); | 170 | qApp->getWindow()->activateWindow(); |
| 171 | } | 171 | } |
| 172 | } | 172 | } |
| 173 | 173 | ||
| @@ -200,7 +200,7 @@ void HMDToolsDialog::showEvent(QShowEvent* event) { · 26 unmodified lines | |||
| 200 | 200 | ||
| 201 | void HMDToolsDialog::hideEvent(QHideEvent* event) { | 201 | void HMDToolsDialog::hideEvent(QHideEvent* event) { |
| 202 | // center the cursor on the main application window | 202 | // center the cursor on the main application window |
| 203 | centerCursorOnWidget(Application::getInstance()->getWindow()); | 203 | centerCursorOnWidget(qApp->getWindow()); |
| 204 | } | 204 | } |
| 205 | 205 | ||
| 206 | void HMDToolsDialog::screenCountChanged(int newCount) { | 206 | void HMDToolsDialog::screenCountChanged(int newCount) { |
| @@ -275,7 +275,7 @@ void HMDWindowWatcher::windowScreenChanged(QScreen* screen) { · 68 unmodified lines | |||
| 275 | QScreen* betterScreen = NULL; | 275 | QScreen* betterScreen = NULL; |
| 276 | 276 | ||
| 277 | QScreen* lastApplicationScreen = _hmdTools->getLastApplicationScreen(); | 277 | QScreen* lastApplicationScreen = _hmdTools->getLastApplicationScreen(); |
| 278 | QWindow* appWindow = Application::getInstance()->getWindow()->windowHandle(); | 278 | QWindow* appWindow = qApp->getWindow()->windowHandle(); |
| 279 | QScreen* appScreen = appWindow->screen(); | 279 | QScreen* appScreen = appWindow->screen(); |
| 280 | 280 | ||
| 281 | if (_previousScreen && _previousScreen != hmdScreen) { | 281 | if (_previousScreen && _previousScreen != hmdScreen) { |