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
60645dfd
Commit
60645dfd
authored
Aug 06, 2021
by
Simone Gaiarin
Browse files
Rename kcfg setting to primaryAnnotationToolBar
parent
f57e12e2
Pipeline
#74719
passed with stage
in 9 minutes and 40 seconds
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
conf/okular.kcfg
View file @
60645dfd
...
...
@@ -11,7 +11,7 @@
<signal
name=
"colorModesChanged2"
>
<label>
Same as colorModesChanged(), but kconfig_compiler does not allow to inherit signals, so appending a '2'.
</label>
</signal>
<signal
name=
"
default
AnnotationToolBarChanged"
/>
<signal
name=
"
primary
AnnotationToolBarChanged"
/>
<group
name=
"Dlg Performance"
>
<entry
key=
"EnableCompositing"
type=
"Bool"
>
<default>
true
</default>
...
...
@@ -322,13 +322,13 @@
<default>
true
</default>
<emit
signal=
"viewContinuousChanged"
/>
</entry>
<entry
key=
"
Default
AnnotationToolBar"
type=
"Enum"
>
<default>
AnnotationToolBar
</default>
<entry
key=
"
Primary
AnnotationToolBar"
type=
"Enum"
>
<default>
Full
AnnotationToolBar
</default>
<choices>
<choice
name=
"AnnotationToolBar"
/>
<choice
name=
"
Full
AnnotationToolBar"
/>
<choice
name=
"QuickAnnotationToolBar"
/>
</choices>
<emit
signal=
"
default
AnnotationToolBarChanged"
/>
<emit
signal=
"
primary
AnnotationToolBarChanged"
/>
</entry>
<entry
key=
"ViewMode"
type=
"Enum"
>
<default>
Single
</default>
...
...
part/annotationactionhandler.cpp
View file @
60645dfd
...
...
@@ -769,7 +769,7 @@ AnnotationActionHandler::AnnotationActionHandler(PageViewAnnotator *parent, KAct
ac
->
setDefaultShortcut
(
d
->
aAddToQuickTools
,
QKeySequence
(
Qt
::
CTRL
+
Qt
::
SHIFT
+
Qt
::
Key_B
));
d
->
updateConfigActions
();
connect
(
Okular
::
Settings
::
self
(),
&
Okular
::
Settings
::
default
AnnotationToolBarChanged
,
this
,
&
AnnotationActionHandler
::
setupAnnotationToolBarVisibilityAction
);
connect
(
Okular
::
Settings
::
self
(),
&
Okular
::
Settings
::
primary
AnnotationToolBarChanged
,
this
,
&
AnnotationActionHandler
::
setupAnnotationToolBarVisibilityAction
);
}
AnnotationActionHandler
::~
AnnotationActionHandler
()
...
...
@@ -797,16 +797,16 @@ void AnnotationActionHandler::setupAnnotationToolBarVisibilityAction()
// hide action
connect
(
d
->
aHideToolBar
,
&
QAction
::
triggered
,
annotationToolBar
,
&
KToolBar
::
hide
,
Qt
::
UniqueConnection
);
KToolBar
*
default
AnnotationToolBar
=
annotationToolBar
;
if
(
Okular
::
Settings
::
default
AnnotationToolBar
()
==
Okular
::
Settings
::
Enum
Default
AnnotationToolBar
::
QuickAnnotationToolBar
)
{
default
AnnotationToolBar
=
mw
->
toolBar
(
QStringLiteral
(
"quickAnnotationToolBar"
));
KToolBar
*
primary
AnnotationToolBar
=
annotationToolBar
;
if
(
Okular
::
Settings
::
primary
AnnotationToolBar
()
==
Okular
::
Settings
::
Enum
Primary
AnnotationToolBar
::
QuickAnnotationToolBar
)
{
primary
AnnotationToolBar
=
mw
->
toolBar
(
QStringLiteral
(
"quickAnnotationToolBar"
));
}
d
->
aToolBarVisibility
->
setChecked
(
false
);
d
->
aToolBarVisibility
->
disconnect
();
d
->
aToolBarVisibility
->
setChecked
(
default
AnnotationToolBar
->
isVisible
());
connect
(
default
AnnotationToolBar
,
&
QToolBar
::
visibilityChanged
,
d
->
aToolBarVisibility
,
&
QAction
::
setChecked
,
Qt
::
UniqueConnection
);
connect
(
d
->
aToolBarVisibility
,
&
QAction
::
toggled
,
default
AnnotationToolBar
,
&
KToolBar
::
setVisible
,
Qt
::
UniqueConnection
);
d
->
aShowToolBar
->
setEnabled
(
!
default
AnnotationToolBar
->
isVisible
());
d
->
aToolBarVisibility
->
setChecked
(
primary
AnnotationToolBar
->
isVisible
());
connect
(
primary
AnnotationToolBar
,
&
QToolBar
::
visibilityChanged
,
d
->
aToolBarVisibility
,
&
QAction
::
setChecked
,
Qt
::
UniqueConnection
);
connect
(
d
->
aToolBarVisibility
,
&
QAction
::
toggled
,
primary
AnnotationToolBar
,
&
KToolBar
::
setVisible
,
Qt
::
UniqueConnection
);
d
->
aShowToolBar
->
setEnabled
(
!
primary
AnnotationToolBar
->
isVisible
());
}
void
AnnotationActionHandler
::
reparseBuiltinToolsConfig
()
...
...
part/dlgannotations.cpp
View file @
60645dfd
...
...
@@ -20,12 +20,13 @@ DlgAnnotations::DlgAnnotations(QWidget *parent)
{
QFormLayout
*
layout
=
new
QFormLayout
(
this
);
// Combobox: default annotation toolbar associated to annotation action in tool menu
QComboBox
*
annotationToolBar
=
new
QComboBox
(
this
);
annotationToolBar
->
addItem
(
i18nc
(
"item:inlistbox Config dialog, general page"
,
"Full Annotation Toobar"
));
annotationToolBar
->
addItem
(
i18nc
(
"item:inlistbox Config dialog, general page"
,
"Quick Annotation Toolbar"
));
annotationToolBar
->
setObjectName
(
QStringLiteral
(
"kcfg_AnnotationToolBar"
));
layout
->
addRow
(
i18nc
(
"label:listbox Config dialog, general page"
,
"Annotation toolbar:"
),
annotationToolBar
);
// BEGIN Annotation toolbar: Combo box to set the annotation toolbar associated to annotation action in tool menu
QComboBox
*
primaryAnnotationToolBar
=
new
QComboBox
(
this
);
primaryAnnotationToolBar
->
addItem
(
i18nc
(
"item:inlistbox Config dialog, general page"
,
"Full Annotation Toobar"
));
primaryAnnotationToolBar
->
addItem
(
i18nc
(
"item:inlistbox Config dialog, general page"
,
"Quick Annotation Toolbar"
));
primaryAnnotationToolBar
->
setObjectName
(
QStringLiteral
(
"kcfg_PrimaryAnnotationToolBar"
));
layout
->
addRow
(
i18nc
(
"label:listbox Config dialog, general page"
,
"Annotation toolbar:"
),
primaryAnnotationToolBar
);
// END Annotation toolbar
// BEGIN Author row: Line edit to set the annotation’s default author value.
QLineEdit
*
authorLineEdit
=
new
QLineEdit
(
this
);
...
...
Write
Preview
Supports
Markdown
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