| 1274 | } |
| 1275 | |
| 1276 | void QmitkExtWorkbenchWindowAdvisorHack::onFullScreen() |
| 1277 | { |
| 1278 | auto window = berry::PlatformUI::GetWorkbench()->GetActiveWorkbenchWindow(); |
| 1279 | auto* mainWindow = qobject_cast<QMainWindow*>(window->GetShell()->GetControl()); |
| 1280 | if (nullptr == mainWindow) |
| 1281 | return; |
| 1282 | |
| 1283 | #ifdef __APPLE__ |
| 1284 | mainWindow->isFullScreen() ? mainWindow->showNormal() : mainWindow->showFullScreen(); |
| 1285 | #else |
| 1286 | // Toggle borderless full-screen. See SetBorderlessFullScreen for why true |
| 1287 | // full-screen is avoided off macOS. The original flags are saved so the |
| 1288 | // decorations can be restored on exit. |
| 1289 | if (mainWindow->property("mitkBorderlessFullScreen").toBool()) |
| 1290 | { |
| 1291 | mainWindow->setProperty("mitkBorderlessFullScreen", false); |
| 1292 | mainWindow->setWindowFlags(Qt::WindowFlags(mainWindow->property("mitkWindowedFlags").toInt())); |
| 1293 | mainWindow->setGeometry(mainWindow->property("mitkWindowedGeometry").toRect()); |
| 1294 | } |
| 1295 | else |
| 1296 | { |
| 1297 | mainWindow->setProperty("mitkBorderlessFullScreen", true); |
| 1298 | mainWindow->setProperty("mitkWindowedFlags", static_cast<int>(mainWindow->windowFlags())); |
| 1299 | mainWindow->setProperty("mitkWindowedGeometry", mainWindow->geometry()); |
| 1300 | SetBorderlessFullScreen(mainWindow); |
| 1301 | } |
| 1302 | |
| 1303 | mainWindow->show(); // setWindowFlags() hides the window |
| 1304 | #endif |
| 1305 | } |
| 1306 | |
| 1307 | void QmitkExtWorkbenchWindowAdvisorHack::onIntro() |
| 1308 | { |
nothing calls this directly
no test coverage detected