Example #1
0
void Window::toggleMode()
{
    switch (m_mode)
    {
        case FullScreenMode:
            windowed();
            return;
        case WindowMode:
            fullScreen();
            return;
    }
}
Example #2
0
std::pair<QRect, QRect> GameUIConfig::vid_ResolutionPair() {
    // returns a pair of both the fullscreen and the windowed resolution
    QRect full(0, 0, 640, 480);
    QRect windowed(0, 0, 640, 480);
    QStringList wh = Form->ui.pageOptions->CBResolution->currentText().split('x');
    if (wh.size() == 2)
    {
        full.setWidth(wh[0].toInt());
        full.setHeight(wh[1].toInt());
    }
    windowed.setWidth(Form->ui.pageOptions->windowWidthEdit->text().toInt());
    windowed.setHeight(Form->ui.pageOptions->windowHeightEdit->text().toInt());
    return std::make_pair(full, windowed);
}