From e6636490ec3f8909ba3642fcd13c037f0c45bbce Mon Sep 17 00:00:00 2001 From: Wilco Greven Date: Sat, 14 Sep 2002 14:45:53 +0000 Subject: [PATCH] Added the actions I'd like to implement first. svn path=/trunk/kdegraphics/kpdf/; revision=177766 --- kpdf/kpdf_part.cpp | 29 ++++++++++++++++++----------- kpdf/kpdf_part.h | 8 ++++++-- kpdf/kpdf_part.rc | 10 ++++++++-- 3 files changed, 32 insertions(+), 15 deletions(-) diff --git a/kpdf/kpdf_part.cpp b/kpdf/kpdf_part.cpp index b649119fe..e491cb3be 100644 --- a/kpdf/kpdf_part.cpp +++ b/kpdf/kpdf_part.cpp @@ -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::fitWidthToggled() +Part::slotFitToWidthToggled() { - m_zoomMode = m_fitWidth->isChecked() ? FitWidth : FixedFactor; + m_zoomMode = m_fitToWidth->isChecked() ? FitWidth : FixedFactor; displayPage(m_currentPage); } diff --git a/kpdf/kpdf_part.h b/kpdf/kpdf_part.h index c0c687aef..2c9dc4a43 100644 --- a/kpdf/kpdf_part.h +++ b/kpdf/kpdf_part.h @@ -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_fitToWidth; int m_currentPage; @@ -95,7 +99,7 @@ namespace KPDF float m_zoomFactor; private slots: - void fitWidthToggled(); + void slotFitToWidthToggled(); }; class BrowserExtension : public KParts::BrowserExtension diff --git a/kpdf/kpdf_part.rc b/kpdf/kpdf_part.rc index 8ebef1d8e..f35f7a51e 100644 --- a/kpdf/kpdf_part.rc +++ b/kpdf/kpdf_part.rc @@ -1,14 +1,20 @@ - + &Edit &View - + + + + &Go + + +