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
e6636490
Commit
e6636490
authored
Sep 14, 2002
by
Wilco Greven
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added the actions I'd like to implement first.
svn path=/trunk/kdegraphics/kpdf/; revision=177766
parent
2958797b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
15 deletions
+32
-15
kpdf/kpdf_part.cpp
kpdf/kpdf_part.cpp
+18
-11
kpdf/kpdf_part.h
kpdf/kpdf_part.h
+6
-2
kpdf/kpdf_part.rc
kpdf/kpdf_part.rc
+8
-2
No files found.
kpdf/kpdf_part.cpp
View file @
e6636490
...
...
@@ -65,15 +65,22 @@ Part::Part(QWidget *parentWidget, const char *widgetName,
KStdAction
::
findNext
(
this
,
SLOT
(
findNext
()),
actionCollection
(),
"find_next"
);
m_fitWidth
=
new
KToggleAction
(
i18n
(
"Fit Width"
),
0
,
this
,
SLOT
(
fitWidthToggled
()),
actionCollection
(),
"fit_width"
);
KStdAction
::
prior
(
this
,
SLOT
(
displayPreviousPage
()),
actionCollection
(),
"previous_page"
);
KStdAction
::
next
(
this
,
SLOT
(
displayNextPage
()),
actionCollection
(),
"next_page"
);
m_fitToWidth
=
new
KToggleAction
(
i18n
(
"Fit To Page &Width"
),
0
,
this
,
SLOT
(
slotFitToWidthToggled
()),
actionCollection
(),
"fit_to_width"
);
KStdAction
::
zoomIn
(
this
,
SLOT
(
zoomIn
()),
actionCollection
(),
"zoom_in"
);
KStdAction
::
zoomOut
(
this
,
SLOT
(
zoomOut
()),
actionCollection
(),
"zoom_out"
);
KStdAction
::
back
(
this
,
SLOT
(
back
()),
actionCollection
(),
"back"
);
KStdAction
::
forward
(
this
,
SLOT
(
forward
()),
actionCollection
(),
"forward"
);
KStdAction
::
prior
(
this
,
SLOT
(
displayPreviousPage
()),
actionCollection
(),
"previous_page"
);
KStdAction
::
next
(
this
,
SLOT
(
displayNextPage
()),
actionCollection
(),
"next_page"
);
// set our XML-UI resource file
setXMLFile
(
"kpdf_part.rc"
);
...
...
@@ -383,9 +390,9 @@ Part::executeAction(LinkAction* action)
}
void
Part
::
fit
WidthToggled
()
Part
::
slotFitTo
WidthToggled
()
{
m_zoomMode
=
m_fitWidth
->
isChecked
()
?
FitWidth
:
FixedFactor
;
m_zoomMode
=
m_fit
To
Width
->
isChecked
()
?
FitWidth
:
FixedFactor
;
displayPage
(
m_currentPage
);
}
...
...
kpdf/kpdf_part.h
View file @
e6636490
...
...
@@ -74,6 +74,10 @@ namespace KPDF
protected
slots
:
void
find
()
{
/* stub */
};
void
findNext
()
{
/* stub */
};
void
zoomIn
()
{
/* stub */
};
void
zoomOut
()
{
/* stub */
};
void
back
()
{
/* stub */
};
void
forward
()
{
/* stub */
};
void
displayNextPage
();
void
displayPreviousPage
();
...
...
@@ -87,7 +91,7 @@ namespace KPDF
PDFDoc
*
m_doc
;
XOutputDev
*
m_outputDev
;
KToggleAction
*
m_fitWidth
;
KToggleAction
*
m_fit
To
Width
;
int
m_currentPage
;
...
...
@@ -95,7 +99,7 @@ namespace KPDF
float
m_zoomFactor
;
private
slots
:
void
fit
WidthToggled
();
void
slotFitTo
WidthToggled
();
};
class
BrowserExtension
:
public
KParts
::
BrowserExtension
...
...
kpdf/kpdf_part.rc
View file @
e6636490
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
<kpartgui
name=
"kpdf_part"
version=
"
3
"
>
<kpartgui
name=
"kpdf_part"
version=
"
4
"
>
<MenuBar>
<Menu
name=
"edit"
><text>
&
Edit
</text>
<Action
name=
"find"
/>
<Action
name=
"find_next"
/>
</Menu>
<Menu
name=
"view"
><text>
&
View
</text>
<Action
name=
"fit_width"
/>
<Action
name=
"fit_to_width"
/>
<Separator/>
<Action
name=
"zoom_in"
/>
<Action
name=
"zoom_out"
/>
</Menu>
<Menu
name=
"go"
><text>
&
Go
</text>
<Action
name=
"back"
/>
<Action
name=
"forward"
/>
<Separator/>
<Action
name=
"previous_page"
/>
<Action
name=
"next_page"
/>
</Menu>
...
...
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