Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Okular
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Andi Sardina Ramos
Okular
Commits
14ebfddd
Commit
14ebfddd
authored
Sep 14, 2003
by
Laurent Montel
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add show/hide scrollbar as in kghostview
svn path=/trunk/kdegraphics/kpdf/; revision=251084
parent
5c58b576
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
80 additions
and
41 deletions
+80
-41
kpdf/kpdf_pagewidget.cc
kpdf/kpdf_pagewidget.cc
+6
-0
kpdf/kpdf_pagewidget.h
kpdf/kpdf_pagewidget.h
+38
-38
kpdf/kpdf_part.cpp
kpdf/kpdf_part.cpp
+23
-0
kpdf/kpdf_part.h
kpdf/kpdf_part.h
+6
-1
kpdf/kpdf_part.rc
kpdf/kpdf_part.rc
+5
-1
kpdf/kpdf_shell.cpp
kpdf/kpdf_shell.cpp
+2
-1
No files found.
kpdf/kpdf_pagewidget.cc
View file @
14ebfddd
...
...
@@ -120,6 +120,12 @@ namespace KPDF
mutex
.
unlock
();
}
void
PageWidget
::
enableScrollBars
(
bool
b
)
{
setHScrollBarMode
(
b
?
Auto
:
AlwaysOff
);
setVScrollBarMode
(
b
?
Auto
:
AlwaysOff
);
}
void
PageWidget
::
updatePixmap
()
{
if
(
m_doc
)
...
...
kpdf/kpdf_pagewidget.h
View file @
14ebfddd
...
...
@@ -30,7 +30,7 @@ namespace KPDF
void
setPage
(
int
pagenum
);
int
getPage
()
const
{
return
m_currentPage
;
};
void
enableScrollBars
(
bool
b
);
public
slots
:
void
nextPage
();
void
previousPage
();
...
...
kpdf/kpdf_part.cpp
View file @
14ebfddd
...
...
@@ -59,6 +59,15 @@ Part::Part(QWidget *parentWidget, const char *widgetName,
setWidget
(
pdfpartview
);
m_showScrollBars
=
new
KToggleAction
(
i18n
(
"Show &Scrollbars"
),
0
,
actionCollection
(),
"show_scrollbars"
);
m_showPageList
=
new
KToggleAction
(
i18n
(
"Show &Page List"
),
0
,
actionCollection
(),
"show_page_list"
);
connect
(
m_showScrollBars
,
SIGNAL
(
toggled
(
bool
)
),
SLOT
(
showScrollBars
(
bool
)
)
);
connect
(
m_showPageList
,
SIGNAL
(
toggled
(
bool
)
),
SLOT
(
showMarkList
(
bool
)
)
);
// create our actions
KStdAction
::
find
(
this
,
SLOT
(
find
()),
actionCollection
(),
"find"
);
...
...
@@ -102,6 +111,20 @@ Part::~Part()
delete
globalParams
;
}
void
Part
::
showScrollBars
(
bool
show
)
{
m_outputDev
->
enableScrollBars
(
show
);
}
void
Part
::
showMarkList
(
bool
show
)
{
#if 0
_markList->setShown( show );
_scrollBox->setShown( show );
_divider->setShown( show );
#endif
}
void
Part
::
slotGotoEnd
()
{
if
(
m_doc
&&
m_doc
->
getNumPages
()
>
0
);
...
...
kpdf/kpdf_part.h
View file @
14ebfddd
...
...
@@ -95,6 +95,9 @@ namespace KPDF
void
executeAction
(
LinkAction
*
);
void
showScrollBars
(
bool
);
void
showMarkList
(
bool
);
private:
PDFDoc
*
m_doc
;
PageWidget
*
m_outputDev
;
...
...
@@ -103,6 +106,8 @@ namespace KPDF
KAction
*
m_lastPage
;
KAction
*
m_prevPage
;
KAction
*
m_nextPage
;
KToggleAction
*
m_showScrollBars
;
KToggleAction
*
m_showPageList
;
KToggleAction
*
m_fitToWidth
;
...
...
kpdf/kpdf_part.rc
View file @
14ebfddd
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
<kpartgui
name=
"kpdf_part"
version=
"
5
"
>
<kpartgui
name=
"kpdf_part"
version=
"
6
"
>
<MenuBar>
<Menu
name=
"edit"
><text>
&
Edit
</text>
<Action
name=
"find"
/>
...
...
@@ -18,6 +18,10 @@
<Action
name=
"previous_page"
/>
<Action
name=
"next_page"
/>
</Menu>
<Menu
name=
"settings"
><text>
&
Settings
</text>
<Action
name=
"show_scrollbars"
/>
<Action
name=
"show_page_list"
/>
</Menu>
</MenuBar>
<ToolBar
name=
"mainToolBar"
>
<Action
name=
"previous_page"
/>
...
...
kpdf/kpdf_shell.cpp
View file @
14ebfddd
...
...
@@ -17,6 +17,7 @@
#include <kstdaction.h>
#include <kurl.h>
#include <kdebug.h>
#include <klocale.h>
using
namespace
KPDF
;
...
...
@@ -53,7 +54,7 @@ Shell::Shell()
{
// if we couldn't find our Part, we exit since the Shell by
// itself can't do anything useful
KMessageBox
::
error
(
this
,
"Could not find our Part!"
);
KMessageBox
::
error
(
this
,
i18n
(
"Could not find our Part!"
)
);
kapp
->
quit
();
// we return here, cause kapp->quit() only means "exit the
// next time we enter the event loop...
...
...
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