OSC: implement fullscreen and quit

This commit is contained in:
Alexandre Quessy
2015-01-11 19:16:59 -05:00
parent 5141672ffc
commit 9878e8a878
3 changed files with 37 additions and 2 deletions
+26 -2
View File
@@ -319,14 +319,24 @@ bool MainWindow::eventFilter(QObject *obj, QEvent *event)
outputWindow->setVisible(true);
break;
case Qt::Key_P:
if (_isPlaying) pause(); else play();
if (_isPlaying)
{
pause();
}
else
{
play();
}
break;
case Qt::Key_R:
rewind();
break;
}
}
else if (keyEvent->key() == Qt::Key_Escape) outputWindow->setFullScreen(false);
else if (keyEvent->key() == Qt::Key_Escape)
{
outputWindow->setFullScreen(false);
}
eventKey = false;
return eventKey;
@@ -338,6 +348,14 @@ bool MainWindow::eventFilter(QObject *obj, QEvent *event)
}
}
void MainWindow::setOutputWindowFullScreen(bool enable)
{
outputWindow->setFullScreen(false);
// setCheckState
outputWindowFullScreen->setChecked(enable);
displayCanvasControls->setChecked(enable);
}
void MainWindow::newFile()
{
// Stop video playback to avoid lags. XXX Hack
@@ -2438,3 +2456,9 @@ bool MainWindow::setTextureRate(int texture_id, double rate)
}
return true;
}
void MainWindow::quitMapMap()
{
close();
}