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>
This commit is contained in:
Boris Barbulovski 2014-01-14 18:36:07 +01:00 committed by Dirk Hohndel
parent 349f3e9cde
commit 7d741a0022
3 changed files with 26 additions and 0 deletions

View file

@ -469,6 +469,16 @@ void MainWindow::on_actionNextDC_triggered()
redrawProfile(); redrawProfile();
} }
void MainWindow::on_actionFullScreen_triggered(bool checked)
{
if (checked) {
setWindowState(windowState() | Qt::WindowFullScreen);
}
else {
setWindowState(windowState() & ~Qt::WindowFullScreen);
}
}
void MainWindow::on_actionSelectEvents_triggered() void MainWindow::on_actionSelectEvents_triggered()
{ {
qDebug("actionSelectEvents"); qDebug("actionSelectEvents");

View file

@ -87,6 +87,7 @@ private slots:
void on_actionViewAll_triggered(); void on_actionViewAll_triggered();
void on_actionPreviousDC_triggered(); void on_actionPreviousDC_triggered();
void on_actionNextDC_triggered(); void on_actionNextDC_triggered();
void on_actionFullScreen_triggered(bool checked);
/* other menu actions */ /* other menu actions */
void on_actionSelectEvents_triggered(); void on_actionSelectEvents_triggered();

View file

@ -178,6 +178,7 @@
<addaction name="actionPreviousDC"/> <addaction name="actionPreviousDC"/>
<addaction name="actionNextDC"/> <addaction name="actionNextDC"/>
<addaction name="separator"/> <addaction name="separator"/>
<addaction name="actionFullScreen"/>
</widget> </widget>
<widget class="QMenu" name="menuFilter"> <widget class="QMenu" name="menuFilter">
<property name="title"> <property name="title">
@ -465,6 +466,20 @@
<string>Import from Divelogs.de</string> <string>Import from Divelogs.de</string>
</property> </property>
</action> </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> </widget>
<customwidgets> <customwidgets>
<customwidget> <customwidget>