aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Boris Barbulovski <bbarbulovski@gmail.com>2014-01-14 18:36:07 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-01-15 06:28:01 +0700
commit7d741a0022a82cc68a484a9e050eff686ff8bc03 (patch)
tree1ebf1fccd0a8a2a6ec7e0b1b0c0d6c8cba162ee5 /qt-ui
parent349f3e9cdef4b05fa6bfd3171f59339fb18fe1d1 (diff)
downloadsubsurface-7d741a0022a82cc68a484a9e050eff686ff8bc03.tar.gz
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 <bbarbulovski@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/mainwindow.cpp10
-rw-r--r--qt-ui/mainwindow.h1
-rw-r--r--qt-ui/mainwindow.ui15
3 files changed, 26 insertions, 0 deletions
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 @@
<addaction name="actionPreviousDC"/>
<addaction name="actionNextDC"/>
<addaction name="separator"/>
+ <addaction name="actionFullScreen"/>
</widget>
<widget class="QMenu" name="menuFilter">
<property name="title">
@@ -465,6 +466,20 @@
<string>Import from Divelogs.de</string>
</property>
</action>
+ <action name="actionFullScreen">
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
+ <property name="text">
+ <string>&amp;Full Screen</string>
+ </property>
+ <property name="toolTip">
+ <string>Toggle Full Screen</string>
+ </property>
+ <property name="shortcut">
+ <string>F11</string>
+ </property>
+ </action>
</widget>
<customwidgets>
<customwidget>