From e1a52ccdd9f581aa6f8bbd1f06925a54efd0ae2e Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Mon, 10 Apr 2006 18:50:27 +0000 Subject: [PATCH] adapt to new snapshot svn path=/branches/work/kde4/playground/graphics/okular/; revision=528321 --- part.cpp | 12 ++++++------ shell/CMakeLists.txt | 2 +- ui/newstuff.cpp | 4 ++-- ui/pageview.cpp | 12 ++++++------ 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/part.cpp b/part.cpp index f8afcd12f..42bff0969 100644 --- a/part.cpp +++ b/part.cpp @@ -206,19 +206,19 @@ Part::Part(QWidget *parentWidget, const char *widgetName, // Page Traversal actions m_gotoPage = KStdAction::gotoPage( this, SLOT( slotGoToPage() ), ac, "goto_page" ); - m_gotoPage->setShortcut( "CTRL+G" ); + m_gotoPage->setShortcut( QKeySequence(Qt::CTRL, Qt::Key_G) ); // dirty way to activate gotopage when pressing miniBar's button connect( m_miniBar, SIGNAL( gotoPage() ), m_gotoPage, SLOT( trigger() ) ); m_prevPage = KStdAction::prior(this, SLOT(slotPreviousPage()), ac, "previous_page"); m_prevPage->setWhatsThis( i18n( "Moves to the previous page of the document" ) ); - m_prevPage->setShortcut( "Backspace" ); + m_prevPage->setShortcut( Qt::Key_Backspace ); // dirty way to activate prev page when pressing miniBar's button connect( m_miniBar, SIGNAL( prevPage() ), m_prevPage, SLOT( trigger() ) ); m_nextPage = KStdAction::next(this, SLOT(slotNextPage()), ac, "next_page" ); m_nextPage->setWhatsThis( i18n( "Moves to the next page of the document" ) ); - m_nextPage->setShortcut( "Space" ); + m_nextPage->setShortcut( Qt::Key_Space ); // dirty way to activate next page when pressing miniBar's button connect( m_miniBar, SIGNAL( nextPage() ), m_nextPage, SLOT( trigger() ) ); @@ -258,7 +258,7 @@ Part::Part(QWidget *parentWidget, const char *widgetName, m_printPreview->setEnabled( false ); m_showLeftPanel = new KToggleAction( i18n( "Show &Navigation Panel"), "show_side_panel", 0, this, SLOT( slotShowLeftPanel() ), ac, "show_leftpanel" ); - m_showLeftPanel->setShortcut( "CTRL+L" ); + m_showLeftPanel->setShortcut( QKeySequence(Qt::CTRL, Qt::Key_L) ); m_showLeftPanel->setCheckedState( i18n( "Hide &Navigation Panel" ) ); m_showLeftPanel->setChecked( KpdfSettings::showLeftPanel() ); slotShowLeftPanel(); @@ -267,12 +267,12 @@ Part::Part(QWidget *parentWidget, const char *widgetName, if ( !app.isNull() ) KAction * importPS= new KAction(i18n("&Import Postscript as PDF..."), "psimport", 0, this, SLOT(slotImportPSFile()), ac, "import_ps"); KAction * ghns = new KAction(i18n("&Get Books From Internet..."), "knewstuff", 0, this, SLOT(slotGetNewStuff()), ac, "get_new_stuff"); - ghns->setShortcut( "G" ); // TEMP, REMOVE ME! + ghns->setShortcut( Qt::Key_G ); // TEMP, REMOVE ME! m_showProperties = new KAction(i18n("&Properties"), "info", 0, this, SLOT(slotShowProperties()), ac, "properties"); m_showProperties->setEnabled( false ); - m_showPresentation = new KAction( i18n("P&resentation"), "kpresenter_kpr", "Ctrl+Shift+P", this, SLOT(slotShowPresentation()), ac, "presentation"); + m_showPresentation = new KAction( i18n("P&resentation"), "kpresenter_kpr", QKeySequence(Qt::CTRL, Qt::SHIFT, Qt::Key_P), this, SLOT(slotShowPresentation()), ac, "presentation"); m_showPresentation->setEnabled( false ); // attach the actions of the children widgets too diff --git a/shell/CMakeLists.txt b/shell/CMakeLists.txt index 28f8c63e2..115e5750f 100644 --- a/shell/CMakeLists.txt +++ b/shell/CMakeLists.txt @@ -1,6 +1,6 @@ kde4_header() -include_directories( ${KDE4_INCLUDE_DIR} ${QT_INCLUDES} ) +include_directories( ${KDE4_INCLUDE_DIR} ${QT_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR} ) ########### next target ############### diff --git a/ui/newstuff.cpp b/ui/newstuff.cpp index d188ec5e5..076133d13 100644 --- a/ui/newstuff.cpp +++ b/ui/newstuff.cpp @@ -107,7 +107,7 @@ class AvailableItem : public Entry QString remoteUrl = payload().url(); QString fileName = remoteUrl.section( '/', -1, -1 ); QString extension = fileName.toLower().section( '.', -1, -1 ); - QString typeString = type(); + QString typeString = category(); // place books on the desktop if ( typeString == "kpdf/book" ) m_destinationFile = KGlobalSettings::desktopPath() + "/" + fileName; @@ -913,7 +913,7 @@ void NewStuffDialog::slotItemResult( KIO::Job * job ) displayMessage( i18n("Installed! %1 is yours now.").arg( item->name() ), Info ); // ... and any listening object - emit installedFile( item->name(), item->type() ); + emit installedFile( item->name(), item->category() ); } //END File(s) Transferring diff --git a/ui/pageview.cpp b/ui/pageview.cpp index d2fe46fc5..12afaa260 100644 --- a/ui/pageview.cpp +++ b/ui/pageview.cpp @@ -281,14 +281,14 @@ void PageView::setupActions( KActionCollection * ac ) d->aToggleAnnotator = new KToggleAction( i18n("&Review"), "pencil", 0, ac, "mouse_toggle_annotate" ); d->aToggleAnnotator->setCheckable( true ); connect( d->aToggleAnnotator, SIGNAL( toggled( bool ) ), SLOT( slotToggleAnnotator( bool ) ) ); - d->aToggleAnnotator->setShortcut( "F6" ); + d->aToggleAnnotator->setShortcut( Qt::Key_F6 ); // Other actions KAction * su = new KAction( i18n("Scroll Up"), 0, this, SLOT( slotScrollUp() ), ac, "view_scroll_up" ); - su->setShortcut( "Shift+Up" ); + su->setShortcut( QKeySequence(Qt::SHIFT, Qt::Key_Up) ); KAction * sd = new KAction( i18n("Scroll Down"), 0, this, SLOT( slotScrollDown() ), ac, "view_scroll_down" ); - sd->setShortcut( "Shift+Down" ); + sd->setShortcut( QKeySequence(Qt::SHIFT, Qt::Key_Down) ); } bool PageView::canFitPageWidth() @@ -383,7 +383,7 @@ void PageView::notifySetup( const QVector< KPDFPage * > & pageSet, bool document // OSD to display pages if ( documentChanged && pageSet.count() > 0 && KpdfSettings::showOSD() ) d->messageWindow->display( - i18n(" Loaded a one-page document.", + i18np(" Loaded a one-page document.", " Loaded a %n-page document.", pageSet.count() ), PageViewMessage::Info, 4000 ); @@ -764,7 +764,7 @@ if (d->document->handleEvent( e ) ) } } // F3: go to next occurrency - else if( e->key() == KStdAccel::findNext() ) + else if( e->key() == KStdAccel::findNext().keyQt() ) { // part doesn't get this key event because of the keyboard grab d->findTimeoutTimer->stop(); // restore normal operation during possible messagebox is displayed @@ -1327,7 +1327,7 @@ if (d->document->handleEvent( e ) ) QAction *textToClipboard = 0, *speakText = 0, *imageToClipboard = 0, *imageToFile = 0; if ( d->document->supportsSearching() && !selectedText->isEmpty() ) { - menu.addTitle( i18n( "Text (1 character)", "Text (%n characters)", selectedText->length() ) ); + menu.addTitle( i18np( "Text (1 character)", "Text (%n characters)", selectedText->length() ) ); textToClipboard = menu.addAction( SmallIconSet("editcopy"), i18n( "Copy to Clipboard" ) ); if ( !d->document->isAllowed( KPDFDocument::AllowCopy ) ) textToClipboard->setEnabled( false );