Commit 9b681f6b authored by Yuri Chornoivan's avatar Yuri Chornoivan Committed by Albert Astals Cid
Browse files

Add the full screen mode

BUG: 119582
parent 1bd474d2
......@@ -686,6 +686,20 @@ you may need to choose a specific encoding in this menu.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><menuchoice><guimenu>View</guimenu>
<guisubmenu>Full Screen Mode</guisubmenu>
</menuchoice>
</term>
<listitem>
<para>
Changes &khelpcenter; to full screen mode, in which the &khelpcenter; window
takes up the whole screen, and does not have the usual window decorations. To
exit full screen mode, press <keycombo action="simul">&Ctrl;&Shift;
<keycap>F</keycap></keycombo>.
</para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>
......
<!DOCTYPE gui SYSTEM "kpartgui.dtd">
<gui name="khelpcenter" version="18">
<gui name="khelpcenter" version="19">
<MenuBar>
<Menu name="edit" noMerge="1">
<text>&amp;Edit</text>
......@@ -13,6 +13,7 @@
<text>&amp;View</text>
<Action name="viewDocumentSource" />
<Action name="setEncoding" />
<Action name="fullscreen" />
</Menu>
<Menu name="go">
<text>&amp;Go</text>
......
......@@ -37,6 +37,7 @@
#include <QDir>
#include <QIcon>
#include <QList>
#include <QMenuBar>
#include <QMimeDatabase>
#include <QPushButton>
#include <QSplitter>
......@@ -55,6 +56,7 @@
#include <KHTMLView>
#include <KStandardAction>
#include <KStartupInfo>
#include <KToolBar>
#include <KWindowConfig>
#include <kio_version.h>
......@@ -234,6 +236,8 @@ void MainWindow::setupActions()
nextPage->setWhatsThis( i18n( "Moves to the next page of the document" ) );
connect( nextPage, &QAction::triggered, mDoc, &View::nextPage );
KStandardAction::fullScreen( this, SLOT( slotFullScreen() ), this, actionCollection() );
QAction *home = KStandardAction::home( this, SLOT(slotShowHome()), this );
actionCollection()->addAction( home->objectName(), home );
home->setText(i18n("Table of &Contents"));
......@@ -518,5 +522,16 @@ void MainWindow::slotConfigureFonts()
}
}
void MainWindow::slotFullScreen()
{
if (!mFullScreen) {
KToggleFullScreenAction::setFullScreen(this, true);
mFullScreen = true;
} else {
KToggleFullScreenAction::setFullScreen(this, false);
mFullScreen = false;
}
}
// vim:ts=2:sw=2:et
......@@ -63,6 +63,7 @@ class MainWindow : public KXmlGuiWindow
void statusBarMessage(const QString &m);
void slotShowHome();
void slotLastSearch();
void slotFullScreen();
void showSearchStderr();
/**
Show document corresponding to given URL in viewer part.
......@@ -125,6 +126,7 @@ private:
QAction *mLastSearchAction = nullptr;
QAction *mCopyText = nullptr;
LogDialog *mLogDialog = nullptr;
bool mFullScreen = false;
};
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment