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
Graphics
Okular
Commits
2845db76
Commit
2845db76
authored
Jun 14, 2019
by
Katarina Behrens
Committed by
Albert Astals Cid
Dec 13, 2020
Browse files
Add 'Sign' menu entry
parent
35590a27
Changes
2
Hide whitespace changes
Inline
Side-by-side
part/pageview.cpp
View file @
2845db76
...
...
@@ -232,6 +232,7 @@ public:
QAction
*
aMouseTableSelect
;
QAction
*
aMouseMagnifier
;
KToggleAction
*
aTrimToSelection
;
KToggleAction
*
aToggleSignature
;
KSelectAction
*
aZoom
;
QAction
*
aZoomIn
;
QAction
*
aZoomOut
;
...
...
@@ -363,6 +364,7 @@ PageView::PageView(QWidget *parent, Okular::Document *document)
d
->
aMouseNormal
=
nullptr
;
d
->
aMouseSelect
=
nullptr
;
d
->
aMouseTextSelect
=
nullptr
;
d
->
aToggleSignature
=
nullptr
;
d
->
aZoomFitWidth
=
nullptr
;
d
->
aZoomFitPage
=
nullptr
;
d
->
aZoomAutoFit
=
nullptr
;
...
...
@@ -715,6 +717,10 @@ void PageView::setupActions(KActionCollection *ac)
d
->
aMouseModeMenu
->
setText
(
i18nc
(
"@action"
,
"Selection Tools"
));
ac
->
addAction
(
QStringLiteral
(
"mouse_selecttools"
),
d
->
aMouseModeMenu
);
d
->
aToggleSignature
=
new
KToggleAction
(
QIcon
::
fromTheme
(
QStringLiteral
(
"application-pkcs7-signature"
)
),
i18n
(
"&Sign"
),
this
);
ac
->
addAction
(
QStringLiteral
(
"mouse_toggle_sign"
),
d
->
aToggleSignature
);
d
->
aToggleSignature
->
setCheckable
(
true
);
// speak actions
#ifdef HAVE_SPEECH
d
->
aSpeakDoc
=
new
QAction
(
QIcon
::
fromTheme
(
QStringLiteral
(
"text-speak"
)),
i18n
(
"Speak Whole Document"
),
this
);
...
...
@@ -1210,6 +1216,10 @@ void PageView::updateActionState(bool haspages, bool hasformwidgets)
d
->
annotator
->
setToolsEnabled
(
allowTools
);
d
->
annotator
->
setTextToolsEnabled
(
allowTools
&&
d
->
document
->
supportsSearching
());
}
if
(
d
->
aToggleSignature
)
d
->
aToggleSignature
->
setEnabled
(
haspages
);
#ifdef HAVE_SPEECH
if
(
d
->
aSpeakDoc
)
{
const
bool
enablettsactions
=
haspages
?
Okular
::
Settings
::
useTTS
()
:
false
;
...
...
part/part.rc
View file @
2845db76
...
...
@@ -79,6 +79,7 @@
<Action
name=
"mouse_magnifier"
/>
<Separator/>
<Action
name=
"mouse_toggle_annotate"
/>
<Action
name=
"mouse_toggle_sign"
/>
<Separator/>
<Action
name=
"speak_document"
/>
<Action
name=
"speak_current_page"
/>
...
...
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