Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
System
KHelpCenter
Commits
9b681f6b
Commit
9b681f6b
authored
Apr 25, 2021
by
Yuri Chornoivan
Committed by
Albert Astals Cid
Apr 25, 2021
Browse files
Add the full screen mode
BUG: 119582
parent
1bd474d2
Changes
4
Hide whitespace changes
Inline
Side-by-side
doc/khelpcenter/index.docbook
View file @
9b681f6b
...
...
@@ -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>
...
...
khelpcenterui.rc
View file @
9b681f6b
<!DOCTYPE gui SYSTEM "kpartgui.dtd">
<gui
name=
"khelpcenter"
version=
"1
8
"
>
<gui
name=
"khelpcenter"
version=
"1
9
"
>
<MenuBar>
<Menu
name=
"edit"
noMerge=
"1"
>
<text>
&
Edit
</text>
...
...
@@ -13,6 +13,7 @@
<text>
&
View
</text>
<Action
name=
"viewDocumentSource"
/>
<Action
name=
"setEncoding"
/>
<Action
name=
"fullscreen"
/>
</Menu>
<Menu
name=
"go"
>
<text>
&
Go
</text>
...
...
mainwindow.cpp
View file @
9b681f6b
...
...
@@ -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
mainwindow.h
View file @
9b681f6b
...
...
@@ -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
;
};
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment