MCPcopy Create free account
hub / github.com/CE-Programming/CEmu / setFullscreen

Method setFullscreen

gui/qt/settings.cpp:931–965  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

929}
930
931void MainWindow::setFullscreen(int value) {
932 static QWidget *parentPtr = Q_NULLPTR;
933 if (parentPtr == Q_NULLPTR) {
934 parentPtr = ui->lcd->parentWidget();
935 }
936 switch (value) {
937 default:
938 case FULLSCREEN_NONE:
939 showNormal();
940 ui->lcd->setParent(parentPtr);
941 ui->lcd->showNormal();
942 lcdAdjust();
943 if (m_fullscreen == FULLSCREEN_LCD) {
944 activateWindow();
945 raise();
946 }
947 m_fullscreen = FULLSCREEN_NONE;
948 break;
949 case FULLSCREEN_ALL:
950 showFullScreen();
951 m_fullscreen = FULLSCREEN_ALL;
952 break;
953 case FULLSCREEN_LCD:
954 ui->lcd->setParent(this);
955 ui->lcd->setFixedSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX);
956 // The order here is important, must move to the new screen before setting window flags
957 ui->lcd->setGeometry(windowHandle()->screen()->availableGeometry());
958 ui->lcd->setWindowFlags(Qt::Tool | Qt::FramelessWindowHint | Qt::CustomizeWindowHint);
959 ui->lcd->showFullScreen();
960 ui->lcd->installEventFilter(keypadBridge);
961 ui->lcd->setFocus();
962 m_fullscreen = FULLSCREEN_LCD;
963 break;
964 }
965}
966
967void MainWindow::setTop(bool state) {
968 if (state) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected