From 7d741a0022a82cc68a484a9e050eff686ff8bc03 Mon Sep 17 00:00:00 2001 From: Boris Barbulovski Date: Tue, 14 Jan 2014 18:36:07 +0100 Subject: Add-main-window-full-screen-feature This patch enables main window full screen mode by menu toggle or pressing F11. [Dirk Hohndel: whitespace cleanup] Signed-off-by: Boris Barbulovski Signed-off-by: Dirk Hohndel --- qt-ui/mainwindow.cpp | 10 ++++++++++ qt-ui/mainwindow.h | 1 + qt-ui/mainwindow.ui | 15 +++++++++++++++ 3 files changed, 26 insertions(+) (limited to 'qt-ui') diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index acbd13046..389df3def 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -469,6 +469,16 @@ void MainWindow::on_actionNextDC_triggered() redrawProfile(); } +void MainWindow::on_actionFullScreen_triggered(bool checked) +{ + if (checked) { + setWindowState(windowState() | Qt::WindowFullScreen); + } + else { + setWindowState(windowState() & ~Qt::WindowFullScreen); + } +} + void MainWindow::on_actionSelectEvents_triggered() { qDebug("actionSelectEvents"); diff --git a/qt-ui/mainwindow.h b/qt-ui/mainwindow.h index 7d14fc7fe..7da4dbceb 100644 --- a/qt-ui/mainwindow.h +++ b/qt-ui/mainwindow.h @@ -87,6 +87,7 @@ private slots: void on_actionViewAll_triggered(); void on_actionPreviousDC_triggered(); void on_actionNextDC_triggered(); + void on_actionFullScreen_triggered(bool checked); /* other menu actions */ void on_actionSelectEvents_triggered(); diff --git a/qt-ui/mainwindow.ui b/qt-ui/mainwindow.ui index 3748f5950..854c9cdd3 100644 --- a/qt-ui/mainwindow.ui +++ b/qt-ui/mainwindow.ui @@ -178,6 +178,7 @@ + @@ -465,6 +466,20 @@ Import from Divelogs.de + + + true + + + &Full Screen + + + Toggle Full Screen + + + F11 + + -- cgit v1.2.3-70-g09d2