bool Basic2DWindowOpenGLDisplayPlugin::internalActivate() { _framerateActions.clear(); #if defined(Q_OS_ANDROID) _container->setFullscreen(nullptr, true); #endif _container->addMenuItem(PluginType::DISPLAY_PLUGIN, MENU_PATH(), FULLSCREEN, [this](bool clicked) { if (clicked) { _container->setFullscreen(getFullscreenTarget()); } else { _container->unsetFullscreen(); } }, true, false); return Parent::internalActivate(); }
void StereoDisplayPlugin::activate() { auto screens = qApp->screens(); _screenActions.resize(screens.size()); for (int i = 0; i < screens.size(); ++i) { auto screen = screens.at(i); QString name = QString("Screen %1: %2").arg(i + 1).arg(screen->name()); bool checked = false; if (screen == qApp->primaryScreen()) { checked = true; } auto action = CONTAINER->addMenuItem(MENU_PATH(), name, [this](bool clicked) { updateScreen(); }, true, checked, "Screens"); _screenActions[i] = action; } CONTAINER->setFullscreen(qApp->primaryScreen()); WindowOpenGLDisplayPlugin::activate(); }
bool StereoDisplayPlugin::internalActivate() { auto screens = qApp->screens(); _screenActions.resize(screens.size()); for (int i = 0; i < screens.size(); ++i) { auto screen = screens.at(i); QString name = QString("Screen %1: %2").arg(i + 1).arg(screen->name()); bool checked = false; if (screen == qApp->primaryScreen()) { checked = true; } auto action = _container->addMenuItem(PluginType::DISPLAY_PLUGIN, MENU_PATH(), name, [this](bool clicked) { updateScreen(); }, true, checked, "Screens"); _screenActions[i] = action; } _container->removeMenu(FRAMERATE); _screen = qApp->primaryScreen(); _container->setFullscreen(_screen); return Parent::internalActivate(); }