mirror of
https://github.com/mapmapteam/mapmap.git
synced 2026-06-16 12:33:19 +02:00
OSC: implement fullscreen and quit
This commit is contained in:
+26
-2
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user