Commit f9f65979 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Normalize signals/slots

parent e001fbab
......@@ -28,7 +28,7 @@ DlgAccessibility::DlgAccessibility( QWidget * parent )
page->hide();
m_color_pages[ m_selected ]->show();
connect( m_dlg->kcfg_RenderMode, SIGNAL( currentIndexChanged( int ) ), this, SLOT( slotColorMode( int ) ) );
connect( m_dlg->kcfg_RenderMode, SIGNAL(currentIndexChanged(int)), this, SLOT(slotColorMode(int)) );
}
DlgAccessibility::~DlgAccessibility()
......
......@@ -23,7 +23,7 @@ DlgEditor::DlgEditor( QWidget * parent )
m_editors = Okular::buildEditorsMap();
connect( m_dlg->kcfg_ExternalEditor, SIGNAL( currentIndexChanged( int ) ), this, SLOT( editorChanged( int ) ) );
connect( m_dlg->kcfg_ExternalEditor, SIGNAL(currentIndexChanged(int)), this, SLOT(editorChanged(int)) );
m_dlg->kcfg_ExternalEditor->addItem( i18nc( "Text editor", "Custom Text Editor" ) );
m_dlg->kcfg_ExternalEditor->addItem( i18nc( "Text editor", "Kate" ), 1 );
......
......@@ -27,7 +27,7 @@ DlgPerformance::DlgPerformance( QWidget * parent )
m_dlg->cpuLabel->setPixmap( BarIcon( "cpu", 32 ) );
// m_dlg->memoryLabel->setPixmap( BarIcon( "kcmmemory", 32 ) ); // TODO: enable again when proper icon is available
connect( m_dlg->kcfg_MemoryLevel, SIGNAL( changed( int ) ), this, SLOT( radioGroup_changed( int ) ) );
connect( m_dlg->kcfg_MemoryLevel, SIGNAL(changed(int)), this, SLOT(radioGroup_changed(int)) );
}
DlgPerformance::~DlgPerformance()
......
......@@ -47,7 +47,7 @@ DlgPresentation::DlgPresentation( QWidget * parent )
m_dlg->kcfg_SlidesAdvanceTime->setSuffix(ki18ncp("Advance every %1 seconds", " second", " seconds"));
connect( m_dlg->screenCombo, SIGNAL( activated( int ) ), this, SLOT( screenComboChanged( int ) ) );
connect( m_dlg->screenCombo, SIGNAL(activated(int)), this, SLOT(screenComboChanged(int)) );
}
DlgPresentation::~DlgPresentation()
......
......@@ -87,7 +87,7 @@ public:
AudioPlayerPrivate::AudioPlayerPrivate( AudioPlayer * qq )
: q( qq )
{
QObject::connect( &m_mapper, SIGNAL( mapped( int ) ), q, SLOT( finished( int ) ) );
QObject::connect( &m_mapper, SIGNAL(mapped(int)), q, SLOT(finished(int)) );
}
AudioPlayerPrivate::~AudioPlayerPrivate()
......@@ -170,7 +170,7 @@ bool AudioPlayerPrivate::play( const SoundInfo& si )
}
if ( data )
{
QObject::connect( data->m_mediaobject, SIGNAL( finished() ), &m_mapper, SLOT( map() ) );
QObject::connect( data->m_mediaobject, SIGNAL(finished()), &m_mapper, SLOT(map()) );
kDebug(OkularDebug) << "PLAY";
data->play();
}
......
......@@ -110,8 +110,8 @@ BookmarkManager::BookmarkManager( DocumentPrivate * document )
d->manager = KBookmarkManager::managerForFile( d->file, "okular" );
d->manager->setEditorOptions( KGlobal::caption(), false );
d->manager->setUpdate( true );
connect( d->manager, SIGNAL( changed( const QString &, const QString & ) ),
this, SLOT( _o_changed( const QString &, const QString & ) ) );
connect( d->manager, SIGNAL(changed(QString,QString)),
this, SLOT(_o_changed(QString,QString)) );
}
BookmarkManager::~BookmarkManager()
......
......@@ -663,9 +663,9 @@ bool DocumentPrivate::openDocumentInternal( const KService::Ptr& offer, bool iss
m_generator->d_func()->m_document = this;
// connect error reporting signals
QObject::connect( m_generator, SIGNAL( error( const QString&, int ) ), m_parent, SIGNAL( error( const QString&, int ) ) );
QObject::connect( m_generator, SIGNAL( warning( const QString&, int ) ), m_parent, SIGNAL( warning( const QString&, int ) ) );
QObject::connect( m_generator, SIGNAL( notice( const QString&, int ) ), m_parent, SIGNAL( notice( const QString&, int ) ) );
QObject::connect( m_generator, SIGNAL(error(QString,int)), m_parent, SIGNAL(error(QString,int)) );
QObject::connect( m_generator, SIGNAL(warning(QString,int)), m_parent, SIGNAL(warning(QString,int)) );
QObject::connect( m_generator, SIGNAL(notice(QString,int)), m_parent, SIGNAL(notice(QString,int)) );
QApplication::setOverrideCursor( Qt::WaitCursor );
bool openOk = false;
......@@ -1489,9 +1489,9 @@ Document::Document( QWidget *widget )
d->m_bookmarkManager = new BookmarkManager( d );
d->m_viewportIterator = d->m_viewportHistory.insert( d->m_viewportHistory.end(), DocumentViewport() );
connect( PageController::self(), SIGNAL( rotationFinished( int, Okular::Page * ) ),
this, SLOT( rotationFinished( int, Okular::Page * ) ) );
connect( Settings::self(), SIGNAL( configChanged() ), this, SLOT( _o_configChanged() ) );
connect( PageController::self(), SIGNAL(rotationFinished(int,Okular::Page*)),
this, SLOT(rotationFinished(int,Okular::Page*)) );
connect( Settings::self(), SIGNAL(configChanged()), this, SLOT(_o_configChanged()) );
qRegisterMetaType<Okular::FontInfo>();
}
......@@ -1685,7 +1685,7 @@ bool Document::openDocument( const QString & docFile, const KUrl& url, const KMi
if ( !d->m_saveBookmarksTimer )
{
d->m_saveBookmarksTimer = new QTimer( this );
connect( d->m_saveBookmarksTimer, SIGNAL( timeout() ), this, SLOT( saveDocumentInfo() ) );
connect( d->m_saveBookmarksTimer, SIGNAL(timeout()), this, SLOT(saveDocumentInfo()) );
}
d->m_saveBookmarksTimer->start( 5 * 60 * 1000 );
......@@ -1693,7 +1693,7 @@ bool Document::openDocument( const QString & docFile, const KUrl& url, const KMi
if ( !d->m_memCheckTimer )
{
d->m_memCheckTimer = new QTimer( this );
connect( d->m_memCheckTimer, SIGNAL( timeout() ), this, SLOT( slotTimedMemoryCheck() ) );
connect( d->m_memCheckTimer, SIGNAL(timeout()), this, SLOT(slotTimedMemoryCheck()) );
}
d->m_memCheckTimer->start( 2000 );
......@@ -2033,8 +2033,8 @@ void Document::startFontReading()
}
d->m_fontThread = new FontExtractionThread( d->m_generator, pages() );
connect( d->m_fontThread, SIGNAL( gotFont( const Okular::FontInfo& ) ), this, SLOT( fontReadingGotFont( const Okular::FontInfo& ) ) );
connect( d->m_fontThread, SIGNAL( progress( int ) ), this, SLOT( fontReadingProgress( int ) ) );
connect( d->m_fontThread, SIGNAL(gotFont(Okular::FontInfo)), this, SLOT(fontReadingGotFont(Okular::FontInfo)) );
connect( d->m_fontThread, SIGNAL(progress(int)), this, SLOT(fontReadingProgress(int)) );
d->m_fontThread->startExtraction( /*d->m_generator->hasFeature( Generator::Threaded )*/true );
}
......@@ -2567,8 +2567,8 @@ void Document::searchText( int searchID, const QString & text, bool fromStart, Q
searchDialog->setMainWidget( searchLabel );
QTimer::singleShot(500, searchDialog, SLOT(show()));
connect(this, SIGNAL( searchFinished(int, Okular::Document::SearchStatus) ), searchDialog, SLOT(deleteLater()));
connect(searchDialog, SIGNAL( finished() ), this, SLOT(cancelSearch()));
connect(this, SIGNAL(searchFinished(int,Okular::Document::SearchStatus)), searchDialog, SLOT(deleteLater()));
connect(searchDialog, SIGNAL(finished()), this, SLOT(cancelSearch()));
#endif
}
......@@ -3175,8 +3175,8 @@ void Document::fillConfigDialog( KConfigDialog * dialog )
}
if ( pagesAdded )
{
connect( dialog, SIGNAL( settingsChanged( const QString& ) ),
this, SLOT( slotGeneratorConfigChanged( const QString& ) ) );
connect( dialog, SIGNAL(settingsChanged(QString)),
this, SLOT(slotGeneratorConfigChanged(QString)) );
}
}
......
......@@ -57,8 +57,8 @@ PixmapGenerationThread* GeneratorPrivate::pixmapGenerationThread()
Q_Q( Generator );
mPixmapGenerationThread = new PixmapGenerationThread( q );
QObject::connect( mPixmapGenerationThread, SIGNAL( finished() ),
q, SLOT( pixmapGenerationFinished() ),
QObject::connect( mPixmapGenerationThread, SIGNAL(finished()),
q, SLOT(pixmapGenerationFinished()),
Qt::QueuedConnection );
return mPixmapGenerationThread;
......@@ -71,8 +71,8 @@ TextPageGenerationThread* GeneratorPrivate::textPageGenerationThread()
Q_Q( Generator );
mTextPageGenerationThread = new TextPageGenerationThread( q );
QObject::connect( mTextPageGenerationThread, SIGNAL( finished() ),
q, SLOT( textpageGenerationFinished() ),
QObject::connect( mTextPageGenerationThread, SIGNAL(finished()),
q, SLOT(textpageGenerationFinished()),
Qt::QueuedConnection );
return mTextPageGenerationThread;
......
......@@ -113,7 +113,7 @@ void FontExtractionThread::startExtraction( bool async )
{
if ( async )
{
connect( this, SIGNAL( finished() ), this, SLOT( deleteLater() ) );
connect( this, SIGNAL(finished()), this, SLOT(deleteLater()) );
start( QThread::InheritPriority );
}
else
......
......@@ -64,8 +64,8 @@ void PageController::initWeaver()
if ( weaverInited )
return;
connect( ThreadWeaver::Weaver::instance(), SIGNAL( jobDone(ThreadWeaver::Job*) ),
this, SLOT( imageRotationDone(ThreadWeaver::Job*) ) );
connect( ThreadWeaver::Weaver::instance(), SIGNAL(jobDone(ThreadWeaver::Job*)),
this, SLOT(imageRotationDone(ThreadWeaver::Job*)) );
weaverInited = true;
}
......
......@@ -47,10 +47,10 @@ static void createConsoleWindow()
g_jsConsoleLog->setReadOnly( true );
mainLay->addWidget( g_jsConsoleLog );
QObject::connect( g_jsConsoleWindow, SIGNAL( closeClicked() ),
g_jsConsoleWindow, SLOT( close() ) );
QObject::connect( g_jsConsoleWindow, SIGNAL( user1Clicked() ),
g_jsConsoleLog, SLOT( clear() ) );
QObject::connect( g_jsConsoleWindow, SIGNAL(closeClicked()),
g_jsConsoleWindow, SLOT(close()) );
QObject::connect( g_jsConsoleWindow, SIGNAL(user1Clicked()),
g_jsConsoleLog, SLOT(clear()) );
}
static void showConsole()
......
......@@ -226,23 +226,23 @@ TextDocumentGenerator::TextDocumentGenerator( TextDocumentConverter *converter,
setFeature( Threaded );
#endif
connect( converter, SIGNAL( addAction( Action*, int, int ) ),
this, SLOT( addAction( Action*, int, int ) ) );
connect( converter, SIGNAL( addAnnotation( Annotation*, int, int ) ),
this, SLOT( addAnnotation( Annotation*, int, int ) ) );
connect( converter, SIGNAL( addTitle( int, const QString&, const QTextBlock& ) ),
this, SLOT( addTitle( int, const QString&, const QTextBlock& ) ) );
connect( converter, SIGNAL( addMetaData( const QString&, const QString&, const QString& ) ),
this, SLOT( addMetaData( const QString&, const QString&, const QString& ) ) );
connect( converter, SIGNAL( addMetaData( DocumentInfo::Key, const QString& ) ),
this, SLOT( addMetaData( DocumentInfo::Key, const QString& ) ) );
connect( converter, SIGNAL( error( const QString&, int ) ),
this, SIGNAL( error( const QString&, int ) ) );
connect( converter, SIGNAL( warning( const QString&, int ) ),
this, SIGNAL( warning( const QString&, int ) ) );
connect( converter, SIGNAL( notice( const QString&, int ) ),
this, SIGNAL( notice( const QString&, int ) ) );
connect( converter, SIGNAL(addAction(Action*,int,int)),
this, SLOT(addAction(Action*,int,int)) );
connect( converter, SIGNAL(addAnnotation(Annotation*,int,int)),
this, SLOT(addAnnotation(Annotation*,int,int)) );
connect( converter, SIGNAL(addTitle(int,QString,QTextBlock)),
this, SLOT(addTitle(int,QString,QTextBlock)) );
connect( converter, SIGNAL(addMetaData(QString,QString,QString)),
this, SLOT(addMetaData(QString,QString,QString)) );
connect( converter, SIGNAL(addMetaData(DocumentInfo::Key,QString)),
this, SLOT(addMetaData(DocumentInfo::Key,QString)) );
connect( converter, SIGNAL(error(QString,int)),
this, SIGNAL(error(QString,int)) );
connect( converter, SIGNAL(warning(QString,int)),
this, SIGNAL(warning(QString,int)) );
connect( converter, SIGNAL(notice(QString,int)),
this, SIGNAL(notice(QString,int)) );
}
TextDocumentGenerator::~TextDocumentGenerator()
......
......@@ -154,8 +154,8 @@ bool CHMGenerator::loadDocument( const QString & fileName, QVector< Okular::Page
m_syncGen->view()->contentsHeight(), Okular::Rotation0 );
}
connect( m_syncGen, SIGNAL( completed() ), this, SLOT( slotCompleted() ) );
connect( m_syncGen, SIGNAL( canceled( QString ) ), this, SLOT( slotCompleted() ) );
connect( m_syncGen, SIGNAL(completed()), this, SLOT(slotCompleted()) );
connect( m_syncGen, SIGNAL(canceled(QString)), this, SLOT(slotCompleted()) );
return true;
}
......@@ -188,8 +188,8 @@ void CHMGenerator::preparePageForSyncOperation( int zoom , const QString & url)
m_syncGen->view()->layout();
QEventLoop loop;
connect( m_syncGen, SIGNAL( completed() ), &loop, SLOT( quit() ) );
connect( m_syncGen, SIGNAL( canceled( QString ) ), &loop, SLOT( quit() ) );
connect( m_syncGen, SIGNAL(completed()), &loop, SLOT(quit()) );
connect( m_syncGen, SIGNAL(canceled(QString)), &loop, SLOT(quit()) );
// discard any user input, otherwise it breaks the "synchronicity" of this
// function
loop.exec( QEventLoop::ExcludeUserInputEvents );
......
......@@ -219,9 +219,9 @@ int Unrar::startSyncProcess( const QStringList &args )
mProcess->setOutputChannelMode( KProcess::SeparateChannels );
#endif
connect( mProcess, SIGNAL( readyReadStandardOutput() ), SLOT( readFromStdout() ) );
connect( mProcess, SIGNAL( readyReadStandardError() ), SLOT( readFromStderr() ) );
connect( mProcess, SIGNAL( finished( int, QProcess::ExitStatus ) ), SLOT( finished( int, QProcess::ExitStatus ) ) );
connect( mProcess, SIGNAL(readyReadStandardOutput()), SLOT(readFromStdout()) );
connect( mProcess, SIGNAL(readyReadStandardError()), SLOT(readFromStderr()) );
connect( mProcess, SIGNAL(finished(int,QProcess::ExitStatus)), SLOT(finished(int,QProcess::ExitStatus)) );
#if defined(Q_OS_WIN)
mProcess->start( helper->unrarPath, args, QIODevice::ReadWrite | QIODevice::Unbuffered );
......
......@@ -73,10 +73,10 @@ dviRenderer::dviRenderer(bool useFontHinting)
//kDebug(kvs::dvi) << "dviRenderer( parent=" << par << " )";
#endif
// connect(&font_pool, SIGNAL( setStatusBarText( const QString& ) ), this, SIGNAL( setStatusBarText( const QString& ) ) );
// connect(&font_pool, SIGNAL(setStatusBarText(QString)), this, SIGNAL(setStatusBarText(QString)) );
// connect( &clearStatusBarTimer, SIGNAL(timeout()), this, SLOT(clearStatusBar()) );
// pass status bar messages through
// connect(PS_interface, SIGNAL( setStatusBarText( const QString& ) ), this, SIGNAL( setStatusBarText( const QString& ) ) );
// connect(PS_interface, SIGNAL(setStatusBarText(QString)), this, SIGNAL(setStatusBarText(QString)) );
}
......
......@@ -61,7 +61,7 @@ KIMGIOGenerator::KIMGIOGenerator( QObject *parent, const QVariantList &args )
KAction * kimgio_test = new KAction( this );
kimgio_test->setText( "Image test" );
kimgio_test->setIcon( KIcon( "smiley" ) );
connect( kimgio_test, SIGNAL( triggered( bool ) ), this, SLOT( slotTest() ) );
connect( kimgio_test, SIGNAL(triggered(bool)), this, SLOT(slotTest()) );
actionCollection()->addAction( "kimgio_test", kimgio_test );
*/
}
......
......@@ -62,8 +62,8 @@ GSGenerator::GSGenerator( QObject *parent, const QVariantList &args ) :
GSRendererThread *renderer = GSRendererThread::getCreateRenderer();
if (!renderer->isRunning()) renderer->start();
connect(renderer, SIGNAL(imageDone(QImage *, Okular::PixmapRequest *)),
SLOT(slotImageGenerated(QImage *, Okular::PixmapRequest *)),
connect(renderer, SIGNAL(imageDone(QImage*,Okular::PixmapRequest*)),
SLOT(slotImageGenerated(QImage*,Okular::PixmapRequest*)),
Qt::QueuedConnection);
}
......
......@@ -255,11 +255,11 @@ m_cliPresentation(false), m_embedMode(detectEmbedMode(parentWidget, parent, args
// connect the started signal to tell the job the mimetypes we like,
// and get some more information from it
connect(this, SIGNAL(started(KIO::Job *)), this, SLOT(slotJobStarted(KIO::Job *)));
connect(this, SIGNAL(started(KIO::Job*)), this, SLOT(slotJobStarted(KIO::Job*)));
// connect the completed signal so we can put the window caption when loading remote files
connect(this, SIGNAL(completed()), this, SLOT(setWindowTitleFromDocument()));
connect(this, SIGNAL(canceled(const QString &)), this, SLOT(loadCancelled(const QString &)));
connect(this, SIGNAL(canceled(QString)), this, SLOT(loadCancelled(QString)));
// create browser extension (for printing when embedded into browser)
m_bExtension = new BrowserExtension(this);
......@@ -276,18 +276,18 @@ m_cliPresentation(false), m_embedMode(detectEmbedMode(parentWidget, parent, args
// build the document
m_document = new Okular::Document(widget());
connect( m_document, SIGNAL( linkFind() ), this, SLOT( slotFind() ) );
connect( m_document, SIGNAL( linkGoToPage() ), this, SLOT( slotGoToPage() ) );
connect( m_document, SIGNAL( linkPresentation() ), this, SLOT( slotShowPresentation() ) );
connect( m_document, SIGNAL( linkEndPresentation() ), this, SLOT( slotHidePresentation() ) );
connect( m_document, SIGNAL( openUrl(const KUrl &) ), this, SLOT( openUrlFromDocument(const KUrl &) ) );
connect( m_document->bookmarkManager(), SIGNAL( openUrl(const KUrl &) ), this, SLOT( openUrlFromBookmarks(const KUrl &) ) );
connect( m_document, SIGNAL( close() ), this, SLOT( close() ) );
connect( m_document, SIGNAL(linkFind()), this, SLOT(slotFind()) );
connect( m_document, SIGNAL(linkGoToPage()), this, SLOT(slotGoToPage()) );
connect( m_document, SIGNAL(linkPresentation()), this, SLOT(slotShowPresentation()) );
connect( m_document, SIGNAL(linkEndPresentation()), this, SLOT(slotHidePresentation()) );
connect( m_document, SIGNAL(openUrl(KUrl)), this, SLOT(openUrlFromDocument(KUrl)) );
connect( m_document->bookmarkManager(), SIGNAL(openUrl(KUrl)), this, SLOT(openUrlFromBookmarks(KUrl)) );
connect( m_document, SIGNAL(close()), this, SLOT(close()) );
if ( parent && parent->metaObject()->indexOfSlot( QMetaObject::normalizedSignature( "slotQuit()" ) ) != -1 )
connect( m_document, SIGNAL( quit() ), parent, SLOT( slotQuit() ) );
connect( m_document, SIGNAL(quit()), parent, SLOT(slotQuit()) );
else
connect( m_document, SIGNAL( quit() ), this, SLOT( cannotQuit() ) );
connect( m_document, SIGNAL(quit()), this, SLOT(cannotQuit()) );
// widgets: ^searchbar (toolbar containing label and SearchWidget)
// m_searchToolBar = new KToolBar( parentWidget, "searchBar" );
// m_searchToolBar->boxLayout()->setSpacing( KDialog::spacingHint() );
......@@ -299,7 +299,7 @@ m_cliPresentation(false), m_embedMode(detectEmbedMode(parentWidget, parent, args
int tbIndex;
// [left toolbox: Table of Contents] | []
m_toc = new TOC( 0, m_document );
connect( m_toc, SIGNAL( hasTOC( bool ) ), this, SLOT( enableTOC( bool ) ) );
connect( m_toc, SIGNAL(hasTOC(bool)), this, SLOT(enableTOC(bool)) );
tbIndex = m_sidebar->addItem( m_toc, KIcon(QApplication::isLeftToRight() ? "format-justify-left" : "format-justify-right"), i18n("Contents") );
enableTOC( false );
......@@ -309,8 +309,8 @@ m_cliPresentation(false), m_embedMode(detectEmbedMode(parentWidget, parent, args
m_searchWidget = new SearchWidget( thumbsBox, m_document );
m_thumbnailList = new ThumbnailList( thumbsBox, m_document );
// ThumbnailController * m_tc = new ThumbnailController( thumbsBox, m_thumbnailList );
connect( m_thumbnailList, SIGNAL( urlDropped( const KUrl& ) ), SLOT( openUrlFromDocument( const KUrl & )) );
connect( m_thumbnailList, SIGNAL( rightClick(const Okular::Page *, const QPoint &) ), this, SLOT( slotShowMenu(const Okular::Page *, const QPoint &) ) );
connect( m_thumbnailList, SIGNAL(urlDropped(KUrl)), SLOT(openUrlFromDocument(KUrl)) );
connect( m_thumbnailList, SIGNAL(rightClick(const Okular::Page*,QPoint)), this, SLOT(slotShowMenu(const Okular::Page*,QPoint)) );
tbIndex = m_sidebar->addItem( thumbsBox, KIcon( "view-preview" ), i18n("Thumbnails") );
m_sidebar->setCurrentIndex( tbIndex );
......@@ -353,7 +353,7 @@ m_cliPresentation(false), m_embedMode(detectEmbedMode(parentWidget, parent, args
// rightLayout->addWidget( rtb );
m_topMessage = new PageViewTopMessage( rightContainer );
m_topMessage->setup( i18n( "This document has embedded files. <a href=\"okular:/embeddedfiles\">Click here to see them</a> or go to File -> Embedded Files." ), KIcon( "mail-attachment" ) );
connect( m_topMessage, SIGNAL( action() ), this, SLOT( slotShowEmbeddedFiles() ) );
connect( m_topMessage, SIGNAL(action()), this, SLOT(slotShowEmbeddedFiles()) );
rightLayout->addWidget( m_topMessage );
m_formsMessage = new PageViewTopMessage( rightContainer );
m_formsMessage->setup( i18n( "This document has forms. Click on the button to interact with them, or use View -> Show Forms." ) );
......@@ -361,11 +361,11 @@ m_cliPresentation(false), m_embedMode(detectEmbedMode(parentWidget, parent, args
m_pageView = new PageView( rightContainer, m_document );
m_pageView->setFocus(); //usability setting
// m_splitter->setFocusProxy(m_pageView);
connect( m_pageView, SIGNAL( urlDropped( const KUrl& ) ), SLOT( openUrlFromDocument( const KUrl & )));
connect( m_pageView, SIGNAL( rightClick(const Okular::Page *, const QPoint &) ), this, SLOT( slotShowMenu(const Okular::Page *, const QPoint &) ) );
connect( m_document, SIGNAL( error( const QString&, int ) ), m_pageView, SLOT( errorMessage( const QString&, int ) ) );
connect( m_document, SIGNAL( warning( const QString&, int ) ), m_pageView, SLOT( warningMessage( const QString&, int ) ) );
connect( m_document, SIGNAL( notice( const QString&, int ) ), m_pageView, SLOT( noticeMessage( const QString&, int ) ) );
connect( m_pageView, SIGNAL(urlDropped(KUrl)), SLOT(openUrlFromDocument(KUrl)));
connect( m_pageView, SIGNAL(rightClick(const Okular::Page*,QPoint)), this, SLOT(slotShowMenu(const Okular::Page*,QPoint)) );
connect( m_document, SIGNAL(error(QString,int)), m_pageView, SLOT(errorMessage(QString,int)) );
connect( m_document, SIGNAL(warning(QString,int)), m_pageView, SLOT(warningMessage(QString,int)) );
connect( m_document, SIGNAL(notice(QString,int)), m_pageView, SLOT(noticeMessage(QString,int)) );
rightLayout->addWidget( m_pageView );
m_findBar = new FindBar( m_document, rightContainer );
rightLayout->addWidget( m_findBar );
......@@ -382,13 +382,13 @@ m_cliPresentation(false), m_embedMode(detectEmbedMode(parentWidget, parent, args
bottomBarLayout->addWidget( m_pageSizeLabel );
rightLayout->addWidget( m_bottomBar );
connect( m_findBar, SIGNAL( forwardKeyPressEvent( QKeyEvent* )), m_pageView, SLOT( externalKeyPressEvent( QKeyEvent* ) ));
connect( m_miniBar, SIGNAL( forwardKeyPressEvent( QKeyEvent* )), m_pageView, SLOT( externalKeyPressEvent( QKeyEvent* ) ));
connect( m_findBar, SIGNAL(forwardKeyPressEvent(QKeyEvent*)), m_pageView, SLOT(externalKeyPressEvent(QKeyEvent*)));
connect( m_miniBar, SIGNAL(forwardKeyPressEvent(QKeyEvent*)), m_pageView, SLOT(externalKeyPressEvent(QKeyEvent*)));
connect( m_reviewsWidget, SIGNAL( setAnnotationWindow( Okular::Annotation* ) ),
m_pageView, SLOT( setAnnotationWindow( Okular::Annotation* ) ) );
connect( m_reviewsWidget, SIGNAL( removeAnnotationWindow( Okular::Annotation* ) ),
m_pageView, SLOT( removeAnnotationWindow( Okular::Annotation* ) ) );
connect( m_reviewsWidget, SIGNAL(setAnnotationWindow(Okular::Annotation*)),
m_pageView, SLOT(setAnnotationWindow(Okular::Annotation*)) );
connect( m_reviewsWidget, SIGNAL(removeAnnotationWindow(Okular::Annotation*)),
m_pageView, SLOT(removeAnnotationWindow(Okular::Annotation*)) );
// add document observers
m_document->addObserver( this );
......@@ -404,17 +404,17 @@ m_cliPresentation(false), m_embedMode(detectEmbedMode(parentWidget, parent, args
m_document->addObserver( m_pageSizeLabel );
m_document->addObserver( m_bookmarkList );
connect( m_document->bookmarkManager(), SIGNAL( saved() ),
this, SLOT( slotRebuildBookmarkMenu() ) );
connect( m_document->bookmarkManager(), SIGNAL(saved()),
this, SLOT(slotRebuildBookmarkMenu()) );
// ACTIONS
KActionCollection * ac = actionCollection();
// Page Traversal actions
m_gotoPage = KStandardAction::gotoPage( this, SLOT( slotGoToPage() ), ac );
m_gotoPage = KStandardAction::gotoPage( this, SLOT(slotGoToPage()), ac );
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() ) );
connect( m_miniBar, SIGNAL(gotoPage()), m_gotoPage, SLOT(trigger()) );
m_prevPage = KStandardAction::prior(this, SLOT(slotPreviousPage()), ac);
m_prevPage->setIconText( i18nc( "Previous page", "Previous" ) );
......@@ -422,9 +422,9 @@ m_cliPresentation(false), m_embedMode(detectEmbedMode(parentWidget, parent, args
m_prevPage->setWhatsThis( i18n( "Moves to the previous page of the document" ) );
m_prevPage->setShortcut( 0 );
// dirty way to activate prev page when pressing miniBar's button
connect( m_miniBar, SIGNAL( prevPage() ), m_prevPage, SLOT( trigger() ) );
connect( m_miniBar, SIGNAL(prevPage()), m_prevPage, SLOT(trigger()) );
#ifdef OKULAR_ENABLE_MINIBAR
connect( m_progressWidget, SIGNAL( prevPage() ), m_prevPage, SLOT( trigger() ) );
connect( m_progressWidget, SIGNAL(prevPage()), m_prevPage, SLOT(trigger()) );
#endif
m_nextPage = KStandardAction::next(this, SLOT(slotNextPage()), ac );
......@@ -433,17 +433,17 @@ m_cliPresentation(false), m_embedMode(detectEmbedMode(parentWidget, parent, args
m_nextPage->setWhatsThis( i18n( "Moves to the next page of the document" ) );
m_nextPage->setShortcut( 0 );
// dirty way to activate next page when pressing miniBar's button
connect( m_miniBar, SIGNAL( nextPage() ), m_nextPage, SLOT( trigger() ) );
connect( m_miniBar, SIGNAL(nextPage()), m_nextPage, SLOT(trigger()) );
#ifdef OKULAR_ENABLE_MINIBAR
connect( m_progressWidget, SIGNAL( nextPage() ), m_nextPage, SLOT( trigger() ) );
connect( m_progressWidget, SIGNAL(nextPage()), m_nextPage, SLOT(trigger()) );
#endif
m_beginningOfDocument = KStandardAction::firstPage( this, SLOT( slotGotoFirst() ), ac );
m_beginningOfDocument = KStandardAction::firstPage( this, SLOT(slotGotoFirst()), ac );
ac->addAction("first_page", m_beginningOfDocument);
m_beginningOfDocument->setText(i18n( "Beginning of the document"));
m_beginningOfDocument->setWhatsThis( i18n( "Moves to the beginning of the document" ) );
m_endOfDocument = KStandardAction::lastPage( this, SLOT( slotGotoLast() ), ac );
m_endOfDocument = KStandardAction::lastPage( this, SLOT(slotGotoLast()), ac );
ac->addAction("last_page",m_endOfDocument);
m_endOfDocument->setText(i18n( "End of the document"));
m_endOfDocument->setWhatsThis( i18n( "Moves to the end of the document" ) );
......@@ -452,7 +452,7 @@ m_cliPresentation(false), m_embedMode(detectEmbedMode(parentWidget, parent, args
m_historyBack = 0;
m_historyNext = 0;
m_addBookmark = KStandardAction::addBookmark( this, SLOT( slotAddBookmark() ), ac );
m_addBookmark = KStandardAction::addBookmark( this, SLOT(slotAddBookmark()), ac );
m_addBookmarkText = m_addBookmark->text();
m_addBookmarkIcon = m_addBookmark->icon();
......@@ -460,40 +460,40 @@ m_cliPresentation(false), m_embedMode(detectEmbedMode(parentWidget, parent, args
m_prevBookmark->setText(i18n( "Previous Bookmark" ));
m_prevBookmark->setIcon(KIcon( "go-up-search" ));
m_prevBookmark->setWhatsThis( i18n( "Go to the previous bookmarked page" ) );
connect( m_prevBookmark, SIGNAL( triggered() ), this, SLOT( slotPreviousBookmark() ) );
connect( m_prevBookmark, SIGNAL(triggered()), this, SLOT(slotPreviousBookmark()) );
m_nextBookmark = ac->addAction("next_bookmark");
m_nextBookmark->setText(i18n( "Next Bookmark" ));
m_nextBookmark->setIcon(KIcon( "go-down-search" ));
m_nextBookmark->setWhatsThis( i18n( "Go to the next bookmarked page" ) );
connect( m_nextBookmark, SIGNAL( triggered() ), this, SLOT( slotNextBookmark() ) );
connect( m_nextBookmark, SIGNAL(triggered()), this, SLOT(slotNextBookmark()) );
m_copy = KStandardAction::create( KStandardAction::Copy, m_pageView, SLOT( copyTextSelection() ), ac );
m_copy = KStandardAction::create( KStandardAction::Copy, m_pageView, SLOT(copyTextSelection()), ac );
m_selectAll = KStandardAction::selectAll( m_pageView, SLOT( selectAll() ), ac );
m_selectAll = KStandardAction::selectAll( m_pageView, SLOT(selectAll()), ac );
// Find and other actions
m_find = KStandardAction::find( this, SLOT( slotShowFindBar() ), ac );
m_find = KStandardAction::find( this, SLOT(slotShowFindBar()), ac );
QList<QKeySequence> s = m_find->shortcuts();
s.append( QKeySequence( Qt::Key_Slash ) );
m_find->setShortcuts( s );
m_find->setEnabled( false );
m_findNext = KStandardAction::findNext( this, SLOT( slotFindNext() ), ac);
m_findNext = KStandardAction::findNext( this, SLOT(slotFindNext()), ac);
m_findNext->setEnabled( false );
m_findPrev = KStandardAction::findPrev( this, SLOT( slotFindPrev() ), ac );
m_findPrev = KStandardAction::findPrev( this, SLOT(slotFindPrev()), ac );
m_findPrev->setEnabled( false );
m_saveCopyAs = KStandardAction::saveAs( this, SLOT( slotSaveCopyAs() ), ac );
m_saveCopyAs = KStandardAction::saveAs( this, SLOT(slotSaveCopyAs()), ac );
m_saveCopyAs->setText( i18n( "Save &Copy As..." ) );
ac->addAction( "file_save_copy", m_saveCopyAs );
m_saveCopyAs->setEnabled( false );
m_saveAs = KStandardAction::saveAs( this, SLOT( slotSaveFileAs() ), ac );
m_saveAs = KStandardAction::saveAs( this, SLOT(slotSaveFileAs()), ac );
m_saveAs->setEnabled( false );
QAction * prefs = KStandardAction::preferences( this, SLOT( slotPreferences() ), ac);
QAction * prefs = KStandardAction::preferences( this, SLOT(slotPreferences()), ac);
if ( m_embedMode == NativeShellMode )
{
prefs->setText( i18n( "Configure Okular..." ) );
......@@ -509,22 +509,22 @@ m_cliPresentation(false), m_embedMode(detectEmbedMode(parentWidget, parent, args
genPrefs->setText( i18n( "Configure Backends..." ) );
genPrefs->setIcon( KIcon( "configure" ) );
genPrefs->setEnabled( m_document->configurableGenerators() > 0 );
connect( genPrefs, SIGNAL( triggered( bool ) ), this, SLOT( slotGeneratorPreferences() ) );
connect( genPrefs, SIGNAL(triggered(bool)), this, SLOT(slotGeneratorPreferences()) );
m_printPreview = KStandardAction::printPreview( this, SLOT( slotPrintPreview() ), ac );
m_printPreview = KStandardAction::printPreview( this, SLOT(slotPrintPreview()), ac );
m_printPreview->setEnabled( false );
m_showLeftPanel = ac->add<KToggleAction>("show_leftpanel");
m_showLeftPanel->setText(i18n( "Show &Navigation Panel"));
m_showLeftPanel->setIcon(KIcon( "view-sidetree" ));
connect( m_showLeftPanel, SIGNAL( toggled( bool ) ), this, SLOT( slotShowLeftPanel() )