KDEUI
Go to the documentation of this file.
30 #include <QtCore/QEvent>
36 class KToggleFullScreenAction::Private
45 void updateTextsAndIcon()
47 if ( q->isChecked() ) {
48 q->setText(
i18nc(
"@action:inmenu",
"Exit F&ull Screen Mode" ) );
49 q->setIconText(
i18nc(
"@action:intoolbar",
"Exit Full Screen" ) );
50 q->setToolTip(
i18nc(
"@info:tooltip",
"Exit full screen mode" ) );
51 q->setIcon(
KIcon(
"view-restore" ) );
53 q->setText(
i18nc(
"@action:inmenu",
"F&ull Screen Mode" ) );
54 q->setIconText(
i18nc(
"@action:intoolbar",
"Full Screen" ) );
55 q->setToolTip(
i18nc(
"@info:tooltip",
"Display the window in full screen" ) );
56 q->setIcon(
KIcon(
"view-fullscreen" ) );
66 d( new Private( this ) )
68 d->updateTextsAndIcon();
73 d( new Private( this ) )
75 d->updateTextsAndIcon();
87 d->window->removeEventFilter(
this );
92 d->window->installEventFilter(
this );
95 void KToggleFullScreenAction::slotToggled(
bool checked )
98 d->updateTextsAndIcon();
103 if (
object == d->window )
104 if ( event->type() == QEvent::WindowStateChange ) {
105 if ( d->window->isFullScreen() != isChecked() )
106 activate( QAction::Trigger );
115 window->setWindowState( window->windowState() | Qt::WindowFullScreen );
117 window->setWindowState( window->windowState() & ~Qt::WindowFullScreen );
120 #include "ktogglefullscreenaction.moc"
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Wed Jun 5 2013 18:37:35 by
doxygen 1.8.3.1 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.