summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVishesh Handa <me@vhanda.in>2014-08-13 09:54:49 (GMT)
committerVishesh Handa <me@vhanda.in>2014-08-13 09:54:49 (GMT)
commite038950f50d186dcdc94746da5a7545aa89c27c8 (patch)
tree59dd14cd6dcd8fd7ec831a335c3bcda809211ad0
parentfb330dd45c0af77510e38a0f8e385c1ab68a1978 (diff)
KIcon -> QIcon
-rw-r--r--conf/widgetannottools.cpp10
-rw-r--r--core/generator.cpp16
-rw-r--r--core/generator.h6
-rw-r--r--generators/kimgio/generator_kimgio.cpp2
-rw-r--r--part.cpp54
-rw-r--r--shell/shell.cpp2
-rw-r--r--ui/annotationmodel.cpp4
-rw-r--r--ui/annotationpopup.cpp16
-rw-r--r--ui/annotationpropertiesdialog.cpp2
-rw-r--r--ui/annotationproxymodels.cpp2
-rw-r--r--ui/annotationwidgets.cpp2
-rw-r--r--ui/bookmarklist.cpp16
-rw-r--r--ui/data/CMakeLists.txt2
-rw-r--r--ui/embeddedfilesdialog.cpp4
-rw-r--r--ui/findbar.cpp6
-rw-r--r--ui/minibar.cpp4
-rw-r--r--ui/pageview.cpp56
-rw-r--r--ui/pageviewutils.h2
-rw-r--r--ui/presentationsearchbar.cpp4
-rw-r--r--ui/presentationwidget.cpp12
-rw-r--r--ui/propertiesdialog.cpp4
-rw-r--r--ui/searchwidget.cpp2
-rw-r--r--ui/side_reviews.cpp6
-rw-r--r--ui/thumbnaillist.cpp2
-rw-r--r--ui/tocmodel.cpp2
-rw-r--r--ui/videowidget.cpp8
26 files changed, 123 insertions, 123 deletions
diff --git a/conf/widgetannottools.cpp b/conf/widgetannottools.cpp
index 309245b..4b5a29f 100644
--- a/conf/widgetannottools.cpp
+++ b/conf/widgetannottools.cpp
@@ -46,22 +46,22 @@ WidgetAnnotTools::WidgetAnnotTools( QWidget * parent )
QVBoxLayout *vBoxLayout = new QVBoxLayout();
m_btnAdd = new KPushButton( i18n("&Add..."), this );
- m_btnAdd->setIcon( KIcon("list-add") );
+ m_btnAdd->setIcon( QIcon::fromTheme("list-add") );
vBoxLayout->addWidget( m_btnAdd );
m_btnEdit = new KPushButton( i18n("&Edit..."), this );
- m_btnEdit->setIcon( KIcon("edit-rename") );
+ m_btnEdit->setIcon( QIcon::fromTheme("edit-rename") );
m_btnEdit->setEnabled( false );
vBoxLayout->addWidget( m_btnEdit );
m_btnRemove = new KPushButton( i18n("&Remove"), this );
- m_btnRemove->setIcon( KIcon("list-remove") );
+ m_btnRemove->setIcon( QIcon::fromTheme("list-remove") );
m_btnRemove->setEnabled( false );
vBoxLayout->addWidget( m_btnRemove );
m_btnMoveUp = new KPushButton( i18n("Move &Up"), this );
- m_btnMoveUp->setIcon( KIcon("arrow-up") );
+ m_btnMoveUp->setIcon( QIcon::fromTheme("arrow-up") );
m_btnMoveUp->setEnabled( false );
vBoxLayout->addWidget( m_btnMoveUp );
m_btnMoveDown = new KPushButton( i18n("Move &Down"), this );
- m_btnMoveDown->setIcon( KIcon("arrow-down") );
+ m_btnMoveDown->setIcon( QIcon::fromTheme("arrow-down") );
m_btnMoveDown->setEnabled( false );
vBoxLayout->addWidget( m_btnMoveDown );
vBoxLayout->addStretch();
diff --git a/core/generator.cpp b/core/generator.cpp
index 451188e..924193d 100644
--- a/core/generator.cpp
+++ b/core/generator.cpp
@@ -553,7 +553,7 @@ void PixmapRequestPrivate::swap()
class Okular::ExportFormatPrivate : public QSharedData
{
public:
- ExportFormatPrivate( const QString &description, const KMimeType::Ptr &mimeType, const KIcon &icon = KIcon() )
+ ExportFormatPrivate( const QString &description, const KMimeType::Ptr &mimeType, const QIcon &icon = QIcon() )
: QSharedData(), mDescription( description ), mMimeType( mimeType ), mIcon( icon )
{
}
@@ -563,7 +563,7 @@ class Okular::ExportFormatPrivate : public QSharedData
QString mDescription;
KMimeType::Ptr mMimeType;
- KIcon mIcon;
+ QIcon mIcon;
};
ExportFormat::ExportFormat()
@@ -576,7 +576,7 @@ ExportFormat::ExportFormat( const QString &description, const KMimeType::Ptr &mi
{
}
-ExportFormat::ExportFormat( const KIcon &icon, const QString &description, const KMimeType::Ptr &mimeType )
+ExportFormat::ExportFormat( const QIcon &icon, const QString &description, const KMimeType::Ptr &mimeType )
: d( new ExportFormatPrivate( description, mimeType, icon ) )
{
}
@@ -610,7 +610,7 @@ KMimeType::Ptr ExportFormat::mimeType() const
return d->mMimeType;
}
-KIcon ExportFormat::icon() const
+QIcon ExportFormat::icon() const
{
return d->mIcon;
}
@@ -625,19 +625,19 @@ ExportFormat ExportFormat::standardFormat( StandardExportFormat type )
switch ( type )
{
case PlainText:
- return ExportFormat( KIcon( "text-x-generic" ), i18n( "Plain &Text..." ), KMimeType::mimeType( "text/plain" ) );
+ return ExportFormat( QIcon::fromTheme( "text-x-generic" ), i18n( "Plain &Text..." ), KMimeType::mimeType( "text/plain" ) );
break;
case PDF:
- return ExportFormat( KIcon( "application-pdf" ), i18n( "PDF" ), KMimeType::mimeType( "application/pdf" ) );
+ return ExportFormat( QIcon::fromTheme( "application-pdf" ), i18n( "PDF" ), KMimeType::mimeType( "application/pdf" ) );
break;
case OpenDocumentText:
return ExportFormat(
- KIcon( "application-vnd.oasis.opendocument.text" ),
+ QIcon::fromTheme( "application-vnd.oasis.opendocument.text" ),
i18nc( "This is the document format", "OpenDocument Text" ),
KMimeType::mimeType( "application/vnd.oasis.opendocument.text" ) );
break;
case HTML:
- return ExportFormat( KIcon( "text-html" ), i18nc( "This is the document format", "HTML" ), KMimeType::mimeType( "text/html" ) );
+ return ExportFormat( QIcon::fromTheme( "text-html" ), i18nc( "This is the document format", "HTML" ), KMimeType::mimeType( "text/html" ) );
break;
}
return ExportFormat();
diff --git a/core/generator.h b/core/generator.h
index c8f1015..dbf840e 100644
--- a/core/generator.h
+++ b/core/generator.h
@@ -37,7 +37,7 @@ class QByteArray;
class QMutex;
class QPrinter;
class QPrintDialog;
-class KIcon;
+class QIcon;
namespace Okular {
@@ -100,7 +100,7 @@ class OKULAR_EXPORT ExportFormat
* @param description The i18n'ed description of the format.
* @param mimeType The supported mime type of the format.
*/
- ExportFormat( const KIcon &icon, const QString &description, const KMimeType::Ptr &mimeType );
+ ExportFormat( const QIcon &icon, const QString &description, const KMimeType::Ptr &mimeType );
/**
* Destroys the export format.
@@ -130,7 +130,7 @@ class OKULAR_EXPORT ExportFormat
/**
* Returns the icon for GUI representations of the format.
*/
- KIcon icon() const;
+ QIcon icon() const;
/**
* Returns whether the export format is null/valid.
diff --git a/generators/kimgio/generator_kimgio.cpp b/generators/kimgio/generator_kimgio.cpp
index f856434..3972ab6 100644
--- a/generators/kimgio/generator_kimgio.cpp
+++ b/generators/kimgio/generator_kimgio.cpp
@@ -63,7 +63,7 @@ KIMGIOGenerator::KIMGIOGenerator( QObject *parent, const QVariantList &args )
setXMLFile( "gui.rc" );
KAction * kimgio_test = new KAction( this );
kimgio_test->setText( "Image test" );
- kimgio_test->setIcon( KIcon( "smiley" ) );
+ kimgio_test->setIcon( QIcon::fromTheme( "smiley" ) );
connect( kimgio_test, SIGNAL(triggered(bool)), this, SLOT(slotTest()) );
actionCollection()->addAction( "kimgio_test", kimgio_test );
*/
diff --git a/part.cpp b/part.cpp
index d3e9a27..a41d9dc 100644
--- a/part.cpp
+++ b/part.cpp
@@ -360,7 +360,7 @@ m_cliPresentation(false), m_cliPrint(false), m_embedMode(detectEmbedMode(parentW
// [left toolbox: Table of Contents] | []
m_toc = new TOC( 0, m_document );
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") );
+ tbIndex = m_sidebar->addItem( m_toc, QIcon::fromTheme(QApplication::isLeftToRight() ? "format-justify-left" : "format-justify-right"), i18n("Contents") );
enableTOC( false );
// [left toolbox: Thumbnails and Bookmarks] | []
@@ -370,17 +370,17 @@ m_cliPresentation(false), m_cliPrint(false), m_embedMode(detectEmbedMode(parentW
m_thumbnailList = new ThumbnailList( thumbsBox, m_document );
// ThumbnailController * m_tc = new ThumbnailController( thumbsBox, m_thumbnailList );
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") );
+ tbIndex = m_sidebar->addItem( thumbsBox, QIcon::fromTheme( "view-preview" ), i18n("Thumbnails") );
m_sidebar->setCurrentIndex( tbIndex );
// [left toolbox: Reviews] | []
m_reviewsWidget = new Reviews( 0, m_document );
- m_sidebar->addItem( m_reviewsWidget, KIcon("draw-freehand"), i18n("Reviews") );
+ m_sidebar->addItem( m_reviewsWidget, QIcon::fromTheme("draw-freehand"), i18n("Reviews") );
m_sidebar->setItemEnabled( 2, false );
// [left toolbox: Bookmarks] | []
m_bookmarkList = new BookmarkList( m_document, 0 );
- m_sidebar->addItem( m_bookmarkList, KIcon("bookmarks"), i18n("Bookmarks") );
+ m_sidebar->addItem( m_bookmarkList, QIcon::fromTheme("bookmarks"), i18n("Bookmarks") );
m_sidebar->setItemEnabled( 3, false );
// widgets: [../miniBarContainer] | []
@@ -415,7 +415,7 @@ m_cliPresentation(false), m_cliPrint(false), m_embedMode(detectEmbedMode(parentW
m_topMessage->setWordWrap( true );
m_topMessage->setMessageType( KMessageWidget::Information );
m_topMessage->setText( i18n( "This document has embedded files. <a href=\"okular:/embeddedfiles\">Click here to see them</a> or go to File -> Embedded Files." ) );
- m_topMessage->setIcon( KIcon( "mail-attachment" ) );
+ m_topMessage->setIcon( QIcon::fromTheme( "mail-attachment" ) );
connect( m_topMessage, SIGNAL(linkActivated(QString)), this, SLOT(slotShowEmbeddedFiles()) );
rightLayout->addWidget( m_topMessage );
m_formsMessage = new KMessageWidget( rightContainer );
@@ -605,19 +605,19 @@ void Part::setupViewerActions()
m_renameBookmark = ac->addAction("rename_bookmark");
m_renameBookmark->setText(i18n( "Rename Bookmark" ));
- m_renameBookmark->setIcon(KIcon( "edit-rename" ));
+ m_renameBookmark->setIcon(QIcon::fromTheme( "edit-rename" ));
m_renameBookmark->setWhatsThis( i18n( "Rename the current bookmark" ) );
connect( m_renameBookmark, SIGNAL(triggered()), this, SLOT(slotRenameCurrentViewportBookmark()) );
m_prevBookmark = ac->addAction("previous_bookmark");
m_prevBookmark->setText(i18n( "Previous Bookmark" ));
- m_prevBookmark->setIcon(KIcon( "go-up-search" ));
+ m_prevBookmark->setIcon(QIcon::fromTheme( "go-up-search" ));
m_prevBookmark->setWhatsThis( i18n( "Go to the previous bookmark" ) );
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->setIcon(QIcon::fromTheme( "go-down-search" ));
m_nextBookmark->setWhatsThis( i18n( "Go to the next bookmark" ) );
connect( m_nextBookmark, SIGNAL(triggered()), this, SLOT(slotNextBookmark()) );
@@ -662,7 +662,7 @@ void Part::setupViewerActions()
{
genPrefs->setText( i18n( "Configure Backends..." ) );
}
- genPrefs->setIcon( KIcon( "configure" ) );
+ genPrefs->setIcon( QIcon::fromTheme( "configure" ) );
genPrefs->setEnabled( m_document->configurableGenerators() > 0 );
connect( genPrefs, SIGNAL(triggered(bool)), this, SLOT(slotGeneratorPreferences()) );
@@ -674,7 +674,7 @@ void Part::setupViewerActions()
m_showProperties = ac->addAction("properties");
m_showProperties->setText(i18n("&Properties"));
- m_showProperties->setIcon(KIcon("document-properties"));
+ m_showProperties->setIcon(QIcon::fromTheme("document-properties"));
connect(m_showProperties, SIGNAL(triggered()), this, SLOT(slotShowProperties()));
m_showProperties->setEnabled( false );
@@ -693,7 +693,7 @@ void Part::setupViewerActions()
KAction *reload = ac->add<KAction>( "file_reload" );
reload->setText( i18n( "Reloa&d" ) );
- reload->setIcon( KIcon( "view-refresh" ) );
+ reload->setIcon( QIcon::fromTheme( "view-refresh" ) );
reload->setWhatsThis( i18n( "Reload the current document from disk." ) );
connect( reload, SIGNAL(triggered()), this, SLOT(slotReload()) );
reload->setShortcut( QKeySequence(QKeySequence::Refresh) );
@@ -747,7 +747,7 @@ void Part::setupActions()
m_showLeftPanel = ac->add<KToggleAction>("show_leftpanel");
m_showLeftPanel->setText(i18n( "Show &Navigation Panel"));
- m_showLeftPanel->setIcon(KIcon( "view-sidetree" ));
+ m_showLeftPanel->setIcon(QIcon::fromTheme( "view-sidetree" ));
connect( m_showLeftPanel, SIGNAL(toggled(bool)), this, SLOT(slotShowLeftPanel()) );
m_showLeftPanel->setShortcut( Qt::Key_F7 );
m_showLeftPanel->setChecked( Okular::Settings::showLeftPanel() );
@@ -761,13 +761,13 @@ void Part::setupActions()
m_showEmbeddedFiles = ac->addAction("embedded_files");
m_showEmbeddedFiles->setText(i18n("&Embedded Files"));
- m_showEmbeddedFiles->setIcon( KIcon( "mail-attachment" ) );
+ m_showEmbeddedFiles->setIcon( QIcon::fromTheme( "mail-attachment" ) );
connect(m_showEmbeddedFiles, SIGNAL(triggered()), this, SLOT(slotShowEmbeddedFiles()));
m_showEmbeddedFiles->setEnabled( false );
m_exportAs = ac->addAction("file_export_as");
m_exportAs->setText(i18n("E&xport As"));
- m_exportAs->setIcon( KIcon( "document-export" ) );
+ m_exportAs->setIcon( QIcon::fromTheme( "document-export" ) );
m_exportAsMenu = new QMenu();
connect(m_exportAsMenu, SIGNAL(triggered(QAction*)), this, SLOT(slotExportAs(QAction*)));
m_exportAs->setMenu( m_exportAsMenu );
@@ -783,19 +783,19 @@ void Part::setupActions()
m_showPresentation = ac->addAction("presentation");
m_showPresentation->setText(i18n("P&resentation"));
- m_showPresentation->setIcon( KIcon( "view-presentation" ) );
+ m_showPresentation->setIcon( QIcon::fromTheme( "view-presentation" ) );
connect(m_showPresentation, SIGNAL(triggered()), this, SLOT(slotShowPresentation()));
m_showPresentation->setShortcut( QKeySequence( Qt::CTRL + Qt::SHIFT + Qt::Key_P ) );
m_showPresentation->setEnabled( false );
QAction * importPS = ac->addAction("import_ps");
importPS->setText(i18n("&Import PostScript as PDF..."));
- importPS->setIcon(KIcon("document-import"));
+ importPS->setIcon(QIcon::fromTheme("document-import"));
connect(importPS, SIGNAL(triggered()), this, SLOT(slotImportPSFile()));
#if 0
QAction * ghns = ac->addAction("get_new_stuff");
ghns->setText(i18n("&Get Books From Internet..."));
- ghns->setIcon(KIcon("get-hot-new-stuff"));
+ ghns->setIcon(QIcon::fromTheme("get-hot-new-stuff"));
connect(ghns, SIGNAL(triggered()), this, SLOT(slotGetNewStuff()));
// TEMP, REMOVE ME!
ghns->setShortcut( Qt::Key_G );
@@ -804,22 +804,22 @@ void Part::setupActions()
KToggleAction *blackscreenAction = new KToggleAction( i18n( "Switch Blackscreen Mode" ), ac );
ac->addAction( "switch_blackscreen_mode", blackscreenAction );
blackscreenAction->setShortcut( QKeySequence( Qt::Key_B ) );
- blackscreenAction->setIcon( KIcon( "view-presentation" ) );
+ blackscreenAction->setIcon( QIcon::fromTheme( "view-presentation" ) );
blackscreenAction->setEnabled( false );
KToggleAction *drawingAction = new KToggleAction( i18n( "Toggle Drawing Mode" ), ac );
ac->addAction( "presentation_drawing_mode", drawingAction );
- drawingAction->setIcon( KIcon( "draw-freehand" ) );
+ drawingAction->setIcon( QIcon::fromTheme( "draw-freehand" ) );
drawingAction->setEnabled( false );
KAction *eraseDrawingAction = new KAction( i18n( "Erase Drawings" ), ac );
ac->addAction( "presentation_erase_drawings", eraseDrawingAction );
- eraseDrawingAction->setIcon( KIcon( "draw-eraser" ) );
+ eraseDrawingAction->setIcon( QIcon::fromTheme( "draw-eraser" ) );
eraseDrawingAction->setEnabled( false );
KAction *configureAnnotations = new KAction( i18n( "Configure Annotations..." ), ac );
ac->addAction( "options_configure_annotations", configureAnnotations );
- configureAnnotations->setIcon( KIcon( "configure" ) );
+ configureAnnotations->setIcon( QIcon::fromTheme( "configure" ) );
connect(configureAnnotations, SIGNAL(triggered()), this, SLOT(slotAnnotationPreferences()));
KAction *playPauseAction = new KAction( i18n( "Play/Pause Presentation" ), ac );
@@ -1338,7 +1338,7 @@ bool Part::openFile()
if ( ok && m_document->metaData( "HasUnsupportedXfaForm" ).toBool() == true )
{
m_formsMessage->setText( i18n( "This document has XFA forms, which are currently <b>unsupported</b>." ) );
- m_formsMessage->setIcon( KIcon( "dialog-warning" ) );
+ m_formsMessage->setIcon( QIcon::fromTheme( "dialog-warning" ) );
m_formsMessage->setMessageType( KMessageWidget::Warning );
m_formsMessage->setVisible( true );
}
@@ -1847,7 +1847,7 @@ void Part::updateBookmarksActions()
if ( m_document->bookmarkManager()->isBookmarked( m_document->viewport() ) )
{
m_addBookmark->setText( i18n( "Remove Bookmark" ) );
- m_addBookmark->setIcon( KIcon( "edit-delete-bookmark" ) );
+ m_addBookmark->setIcon( QIcon::fromTheme( "edit-delete-bookmark" ) );
m_renameBookmark->setEnabled( true );
}
else
@@ -2055,7 +2055,7 @@ void Part::slotAboutToShowContextMenu(KMenu * /*menu*/, QAction *action, QMenu *
{
QAction *separatorAction = contextMenu->addSeparator();
separatorAction->setObjectName("OkularPrivateRenameBookmarkActions");
- QAction *renameAction = contextMenu->addAction( KIcon( "edit-rename" ), i18n( "Rename this Bookmark" ), this, SLOT(slotRenameBookmarkFromMenu()) );
+ QAction *renameAction = contextMenu->addAction( QIcon::fromTheme( "edit-rename" ), i18n( "Rename this Bookmark" ), this, SLOT(slotRenameBookmarkFromMenu()) );
renameAction->setData(ba->property("htmlRef").toString());
renameAction->setObjectName("OkularPrivateRenameBookmarkActions");
}
@@ -2401,11 +2401,11 @@ void Part::slotShowMenu(const Okular::Page *page, const QPoint &point)
popup->addTitle( i18n( "Page %1", page->number() + 1 ) );
if ( ( !currentPage && m_document->bookmarkManager()->isBookmarked( page->number() ) ) ||
( currentPage && m_document->bookmarkManager()->isBookmarked( m_document->viewport() ) ) )
- removeBookmark = popup->addAction( KIcon("edit-delete-bookmark"), i18n("Remove Bookmark") );
+ removeBookmark = popup->addAction( QIcon::fromTheme("edit-delete-bookmark"), i18n("Remove Bookmark") );
else
- addBookmark = popup->addAction( KIcon("bookmark-new"), i18n("Add Bookmark") );
+ addBookmark = popup->addAction( QIcon::fromTheme("bookmark-new"), i18n("Add Bookmark") );
if ( m_pageView->canFitPageWidth() )
- fitPageWidth = popup->addAction( KIcon("zoom-fit-best"), i18n("Fit Width") );
+ fitPageWidth = popup->addAction( QIcon::fromTheme("zoom-fit-best"), i18n("Fit Width") );
popup->addAction( m_prevBookmark );
popup->addAction( m_nextBookmark );
reallyShow = true;
diff --git a/shell/shell.cpp b/shell/shell.cpp
index 006366b..a1f826f 100644
--- a/shell/shell.cpp
+++ b/shell/shell.cpp
@@ -619,7 +619,7 @@ void Shell::setTabIcon( KMimeType::Ptr mimeType )
int i = findTabIndex( sender() );
if( i != -1 )
{
- m_tabWidget->setTabIcon( i, KIcon(mimeType->iconName()) );
+ m_tabWidget->setTabIcon( i, QIcon::fromTheme(mimeType->iconName()) );
}
}
diff --git a/ui/annotationmodel.cpp b/ui/annotationmodel.cpp
index 3dea374..f9516d6 100644
--- a/ui/annotationmodel.cpp
+++ b/ui/annotationmodel.cpp
@@ -304,7 +304,7 @@ QVariant AnnotationModel::data( const QModelIndex &index, int role ) const
if ( role == Qt::DisplayRole )
return i18n( "Page %1", item->page + 1 );
else if ( role == Qt::DecorationRole )
- return KIcon( "text-plain" );
+ return QIcon::fromTheme( "text-plain" );
else if ( role == PageRole )
return item->page;
@@ -316,7 +316,7 @@ QVariant AnnotationModel::data( const QModelIndex &index, int role ) const
return GuiUtils::captionForAnnotation( item->annotation );
break;
case Qt::DecorationRole:
- return KIcon( "okular" );
+ return QIcon::fromTheme( "okular" );
break;
case Qt::ToolTipRole:
return GuiUtils::prettyToolTip( item->annotation );
diff --git a/ui/annotationpopup.cpp b/ui/annotationpopup.cpp
index 153599d..5857436 100644
--- a/ui/annotationpopup.cpp
+++ b/ui/annotationpopup.cpp
@@ -60,12 +60,12 @@ void AnnotationPopup::exec( const QPoint &point )
menu.addTitle( i18np( "Annotation", "%1 Annotations", mAnnotations.count() ) );
- action = menu.addAction( KIcon( "comment" ), i18n( "&Open Pop-up Note" ) );
+ action = menu.addAction( QIcon::fromTheme( "comment" ), i18n( "&Open Pop-up Note" ) );
action->setData( QVariant::fromValue( pair ) );
action->setEnabled( onlyOne );
action->setProperty( actionTypeId, openId );
- action = menu.addAction( KIcon( "list-remove" ), i18n( "&Delete" ) );
+ action = menu.addAction( QIcon::fromTheme( "list-remove" ), i18n( "&Delete" ) );
action->setEnabled( mDocument->isAllowed( Okular::AllowNotes ) );
action->setProperty( actionTypeId, deleteAllId );
@@ -75,7 +75,7 @@ void AnnotationPopup::exec( const QPoint &point )
action->setEnabled( false );
}
- action = menu.addAction( KIcon( "configure" ), i18n( "&Properties" ) );
+ action = menu.addAction( QIcon::fromTheme( "configure" ), i18n( "&Properties" ) );
action->setData( QVariant::fromValue( pair ) );
action->setEnabled( onlyOne );
action->setProperty( actionTypeId, propertiesId );
@@ -86,7 +86,7 @@ void AnnotationPopup::exec( const QPoint &point )
fileAttachAnnot = static_cast< Okular::FileAttachmentAnnotation * >( pair.annotation );
const QString saveText = i18nc( "%1 is the name of the file to save", "&Save '%1'...", fileAttachAnnot->embeddedFile()->name() );
- action = menu.addAction( KIcon( "document-save" ), saveText );
+ action = menu.addAction( QIcon::fromTheme( "document-save" ), saveText );
action->setData( QVariant::fromValue( pair ) );
action->setProperty( actionTypeId, saveId );
}
@@ -97,17 +97,17 @@ void AnnotationPopup::exec( const QPoint &point )
{
menu.addTitle( GuiUtils::captionForAnnotation( pair.annotation ) );
- action = menu.addAction( KIcon( "comment" ), i18n( "&Open Pop-up Note" ) );
+ action = menu.addAction( QIcon::fromTheme( "comment" ), i18n( "&Open Pop-up Note" ) );
action->setData( QVariant::fromValue( pair ) );
action->setProperty( actionTypeId, openId );
- action = menu.addAction( KIcon( "list-remove" ), i18n( "&Delete" ) );
+ action = menu.addAction( QIcon::fromTheme( "list-remove" ), i18n( "&Delete" ) );
action->setEnabled( mDocument->isAllowed( Okular::AllowNotes ) &&
mDocument->canRemovePageAnnotation( pair.annotation ) );
action->setData( QVariant::fromValue( pair ) );
action->setProperty( actionTypeId, deleteId );
- action = menu.addAction( KIcon( "configure" ), i18n( "&Properties" ) );
+ action = menu.addAction( QIcon::fromTheme( "configure" ), i18n( "&Properties" ) );
action->setData( QVariant::fromValue( pair ) );
action->setProperty( actionTypeId, propertiesId );
@@ -117,7 +117,7 @@ void AnnotationPopup::exec( const QPoint &point )
fileAttachAnnot = static_cast< Okular::FileAttachmentAnnotation * >( pair.annotation );
const QString saveText = i18nc( "%1 is the name of the file to save", "&Save '%1'...", fileAttachAnnot->embeddedFile()->name() );
- action = menu.addAction( KIcon( "document-save" ), saveText );
+ action = menu.addAction( QIcon::fromTheme( "document-save" ), saveText );
action->setData( QVariant::fromValue( pair ) );
action->setProperty( actionTypeId, saveId );
}
diff --git a/ui/annotationpropertiesdialog.cpp b/ui/annotationpropertiesdialog.cpp
index 5bf3d0d..5c0526f 100644
--- a/ui/annotationpropertiesdialog.cpp
+++ b/ui/annotationpropertiesdialog.cpp
@@ -61,7 +61,7 @@ AnnotsPropertiesDialog::AnnotsPropertiesDialog( QWidget *parent, Okular::Documen
//BEGIN tab 2
QFrame* page = new QFrame( this );
addPage( page, i18n( "&General" ) );
-// m_tabitem[1]->setIcon( KIcon( "fonts" ) );
+// m_tabitem[1]->setIcon( QIcon::fromTheme( "fonts" ) );
QGridLayout* gridlayout = new QGridLayout( page );
tmplabel = new QLabel( i18n( "&Author:" ), page );
AuthorEdit = new KLineEdit( ann->author(), page );
diff --git a/ui/annotationproxymodels.cpp b/ui/annotationproxymodels.cpp
index b2c70b6..a3fbf9a 100644
--- a/ui/annotationproxymodels.cpp
+++ b/ui/annotationproxymodels.cpp
@@ -478,7 +478,7 @@ QVariant AuthorGroupProxyModel::data( const QModelIndex &proxyIndex, int role )
if ( role == Qt::DisplayRole )
return item->author();
else if ( role == Qt::DecorationRole )
- return KIcon( item->author().isEmpty() ? "user-away" : "user-identity" );
+ return QIcon::fromTheme( item->author().isEmpty() ? "user-away" : "user-identity" );
else
return QVariant();
} else {
diff --git a/ui/annotationwidgets.cpp b/ui/annotationwidgets.cpp
index 6cd48f8..c823bf1 100644
--- a/ui/annotationwidgets.cpp
+++ b/ui/annotationwidgets.cpp
@@ -685,7 +685,7 @@ QWidget * FileAttachmentAnnotationWidget::createExtraWidget()
if ( mime )
{
tmplabel = new QLabel( widget );
- tmplabel->setPixmap( KIcon( mime->iconName() ).pixmap( FILEATTACH_ICONSIZE, FILEATTACH_ICONSIZE ) );
+ tmplabel->setPixmap( QIcon::fromTheme( mime->iconName() ).pixmap( FILEATTACH_ICONSIZE, FILEATTACH_ICONSIZE ) );
tmplabel->setFixedSize( FILEATTACH_ICONSIZE, FILEATTACH_ICONSIZE );
lay->addWidget( tmplabel, 0, 1, 3, 1, Qt::AlignTop );
}
diff --git a/ui/bookmarklist.cpp b/ui/bookmarklist.cpp
index 0e8df24..2b3ca14 100644
--- a/ui/bookmarklist.cpp
+++ b/ui/bookmarklist.cpp
@@ -152,7 +152,7 @@ BookmarkList::BookmarkList( Okular::Document *document, QWidget *parent )
sp.setVerticalPolicy( QSizePolicy::Minimum );
bookmarkController->setSizePolicy( sp );
// insert a togglebutton [show only bookmarks in the current document]
- m_showBoomarkOnlyAction = bookmarkController->addAction( KIcon( "bookmarks" ), i18n( "Current document only" ) );
+ m_showBoomarkOnlyAction = bookmarkController->addAction( QIcon::fromTheme( "bookmarks" ), i18n( "Current document only" ) );
m_showBoomarkOnlyAction->setCheckable( true );
connect( m_showBoomarkOnlyAction, SIGNAL(toggled(bool)), this, SLOT(slotFilterBookmarks(bool)) );
@@ -189,7 +189,7 @@ void BookmarkList::notifySetup( const QVector< Okular::Page * > & pages, int set
m_currentDocumentItem = itemForUrl( m_document->currentDocument() );
if ( m_currentDocumentItem && m_currentDocumentItem != m_tree->invisibleRootItem() )
{
- m_currentDocumentItem->setIcon( 0, KIcon( "bookmarks" ) );
+ m_currentDocumentItem->setIcon( 0, QIcon::fromTheme( "bookmarks" ) );
m_currentDocumentItem->setExpanded( true );
}
connect( m_tree, SIGNAL(itemChanged(QTreeWidgetItem*,int)), this, SLOT(slotChanged(QTreeWidgetItem*)) );
@@ -246,8 +246,8 @@ void BookmarkList::contextMenuForBookmarkItem( const QPoint& p, BookmarkItem* bm
KMenu menu( this );
QAction * gotobm = menu.addAction( i18n( "Go to This Bookmark" ) );
- QAction * editbm = menu.addAction( KIcon( "edit-rename" ), i18n( "Rename Bookmark" ) );
- QAction * removebm = menu.addAction( KIcon( "list-remove" ), i18n( "Remove Bookmark" ) );
+ QAction * editbm = menu.addAction( QIcon::fromTheme( "edit-rename" ), i18n( "Rename Bookmark" ) );
+ QAction * removebm = menu.addAction( QIcon::fromTheme( "list-remove" ), i18n( "Remove Bookmark" ) );
QAction * res = menu.exec( QCursor::pos() );
if ( !res )
return;
@@ -273,8 +273,8 @@ void BookmarkList::contextMenuForFileItem( const QPoint& p, FileItem* fItem )
QAction * open = 0;
if ( !thisdoc )
open = menu.addAction( i18nc( "Opens the selected document", "Open Document" ) );
- QAction * editbm = menu.addAction( KIcon( "edit-rename" ), i18n( "Rename Bookmark" ) );
- QAction * removebm = menu.addAction( KIcon( "list-remove" ), i18n( "Remove Bookmarks" ) );
+ QAction * editbm = menu.addAction( QIcon::fromTheme( "edit-rename" ), i18n( "Rename Bookmark" ) );
+ QAction * removebm = menu.addAction( QIcon::fromTheme( "list-remove" ), i18n( "Remove Bookmarks" ) );
QAction * res = menu.exec( QCursor::pos() );
if ( !res )
return;
@@ -374,7 +374,7 @@ void BookmarkList::rebuildTree( bool filter )
if ( currenturlitem )
{
currenturlitem->setExpanded( true );
- currenturlitem->setIcon( 0, KIcon( "bookmarks" ) );
+ currenturlitem->setIcon( 0, QIcon::fromTheme( "bookmarks" ) );
m_tree->scrollToItem( currenturlitem, QAbstractItemView::PositionAtTop );
m_currentDocumentItem = currenturlitem;
}
@@ -436,7 +436,7 @@ void BookmarkList::selectiveUrlUpdate( const KUrl& url, QTreeWidgetItem*& item )
}
if ( m_document->isOpened() && url == m_document->currentDocument() )
{
- item->setIcon( 0, KIcon( "bookmarks" ) );
+ item->setIcon( 0, QIcon::fromTheme( "bookmarks" ) );
item->setExpanded( true );
}
item->addChildren( createItems( url, urlbookmarks ) );
diff --git a/ui/data/CMakeLists.txt b/ui/data/CMakeLists.txt
index 491b993..55b1ca4 100644
--- a/ui/data/CMakeLists.txt
+++ b/ui/data/CMakeLists.txt
@@ -1,4 +1,4 @@
-# an own directory for multi-size icons retrieved by KIconLoader
+# an own directory for multi-size icons retrieved by KIconThemeLoader
add_subdirectory(icons)
# install annotator xml tools description
diff --git a/ui/embeddedfilesdialog.cpp b/ui/embeddedfilesdialog.cpp
index 00b516c..1a85ec7 100644
--- a/ui/embeddedfilesdialog.cpp
+++ b/ui/embeddedfilesdialog.cpp
@@ -63,7 +63,7 @@ EmbeddedFilesDialog::EmbeddedFilesDialog(QWidget *parent, const Okular::Document
KMimeType::Ptr mime = KMimeType::findByPath( ef->name(), 0, true );
if (mime)
{
- twi->setIcon(0, KIcon(mime->iconName()));
+ twi->setIcon(0, QIcon::fromTheme(mime->iconName()));
}
twi->setText(1, ef->description());
twi->setText(2, ef->size() <= 0 ? i18nc("Not available size", "N/A") : KGlobal::locale()->formatByteSize(ef->size()));
@@ -111,7 +111,7 @@ void EmbeddedFilesDialog::attachViewContextMenu( const QPoint& /*pos*/ )
return;
QMenu menu( this );
- QAction* saveAsAct = menu.addAction( KIcon( "document-save-as" ), i18nc( "@action:inmenu", "&Save As..." ) );
+ QAction* saveAsAct = menu.addAction( QIcon::fromTheme( "document-save-as" ), i18nc( "@action:inmenu", "&Save As..." ) );
QAction* act = menu.exec( QCursor::pos() );
if ( !act )
diff --git a/ui/findbar.cpp b/ui/findbar.cpp
index bf50b7e..53d78da 100644
--- a/ui/findbar.cpp
+++ b/ui/findbar.cpp
@@ -32,7 +32,7 @@ FindBar::FindBar( Okular::Document * document, QWidget * parent )
lay->setMargin( 2 );
QToolButton * closeBtn = new QToolButton( this );
- closeBtn->setIcon( KIcon( "dialog-close" ) );
+ closeBtn->setIcon( QIcon::fromTheme( "dialog-close" ) );
closeBtn->setToolTip( i18n( "Close" ) );
closeBtn->setAutoRaise( true );
lay->addWidget( closeBtn );
@@ -52,11 +52,11 @@ FindBar::FindBar( Okular::Document * document, QWidget * parent )
label->setBuddy( m_search->lineEdit() );
lay->addWidget( m_search );
- QPushButton * findNextBtn = new QPushButton( KIcon( "go-down-search" ), i18nc( "Find and go to the next search match", "Next" ), this );
+ QPushButton * findNextBtn = new QPushButton( QIcon::fromTheme( "go-down-search" ), i18nc( "Find and go to the next search match", "Next" ), this );
findNextBtn->setToolTip( i18n( "Jump to next match" ) );
lay->addWidget( findNextBtn );
- QPushButton * findPrevBtn = new QPushButton( KIcon( "go-up-search" ), i18nc( "Find and go to the previous search match", "Previous" ), this );
+ QPushButton * findPrevBtn = new QPushButton( QIcon::fromTheme( "go-up-search" ), i18nc( "Find and go to the previous search match", "Previous" ), this );
findPrevBtn->setToolTip( i18n( "Jump to previous match" ) );
lay->addWidget( findPrevBtn );
diff --git a/ui/minibar.cpp b/ui/minibar.cpp
index adecff7..352702e 100644
--- a/ui/minibar.cpp
+++ b/ui/minibar.cpp
@@ -169,7 +169,7 @@ MiniBar::MiniBar( QWidget * parent, MiniBarLogic * miniBarLogic )
QSize buttonSize( KIconLoader::SizeSmallMedium, KIconLoader::SizeSmallMedium );
// bottom: left prev_page button
m_prevButton = new HoverButton( this );
- m_prevButton->setIcon( KIcon( layoutDirection() == Qt::RightToLeft ? "arrow-right" : "arrow-left" ) );
+ m_prevButton->setIcon( QIcon::fromTheme( layoutDirection() == Qt::RightToLeft ? "arrow-right" : "arrow-left" ) );
m_prevButton->setIconSize( buttonSize );
horLayout->addWidget( m_prevButton );
// bottom: left lineEdit (current page box)
@@ -192,7 +192,7 @@ MiniBar::MiniBar( QWidget * parent, MiniBarLogic * miniBarLogic )
horLayout->addWidget( m_pagesButton );
// bottom: right next_page button
m_nextButton = new HoverButton( this );
- m_nextButton->setIcon( KIcon( layoutDirection() == Qt::RightToLeft ? "arrow-left" : "arrow-right" ) );
+ m_nextButton->setIcon( QIcon::fromTheme( layoutDirection() == Qt::RightToLeft ? "arrow-left" : "arrow-right" ) );
m_nextButton->setIconSize( buttonSize );
horLayout->addWidget( m_nextButton );
diff --git a/ui/pageview.cpp b/ui/pageview.cpp
index 16dd66c..cdc7259 100644
--- a/ui/pageview.cpp
+++ b/ui/pageview.cpp
@@ -430,7 +430,7 @@ void PageView::setupBaseActions( KActionCollection * ac )
d->actionCollection = ac;
// Zoom actions ( higher scales takes lots of memory! )
- d->aZoom = new KSelectAction(KIcon( "page-zoom" ), i18n("Zoom"), this);
+ d->aZoom = new KSelectAction(QIcon::fromTheme( "page-zoom" ), i18n("Zoom"), this);
ac->addAction("zoom_to", d->aZoom );
d->aZoom->setEditable( true );
d->aZoom->setMaxComboViewCount( 14 );
@@ -450,12 +450,12 @@ void PageView::setupViewerActions( KActionCollection * ac )
d->aZoomOut->setShortcut( QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_Minus) );
// orientation menu actions
- d->aRotateClockwise = new KAction( KIcon( "object-rotate-right" ), i18n( "Rotate &Right" ), this );
+ d->aRotateClockwise = new KAction( QIcon::fromTheme( "object-rotate-right" ), i18n( "Rotate &Right" ), this );
d->aRotateClockwise->setIconText( i18nc( "Rotate right", "Right" ) );
ac->addAction( "view_orientation_rotate_cw", d->aRotateClockwise );
d->aRotateClockwise->setEnabled( false );
connect( d->aRotateClockwise, SIGNAL(triggered()), this, SLOT(slotRotateClockwise()) );
- d->aRotateCounterClockwise = new KAction( KIcon( "object-rotate-left" ), i18n( "Rotate &Left" ), this );
+ d->aRotateCounterClockwise = new KAction( QIcon::fromTheme( "object-rotate-left" ), i18n( "Rotate &Left" ), this );
d->aRotateCounterClockwise->setIconText( i18nc( "Rotate left", "Left" ) );
ac->addAction( "view_orientation_rotate_ccw", d->aRotateCounterClockwise );
d->aRotateCounterClockwise->setEnabled( false );
@@ -477,20 +477,20 @@ void PageView::setupViewerActions( KActionCollection * ac )
connect( d->aTrimMargins, SIGNAL(toggled(bool)), SLOT(slotTrimMarginsToggled(bool)) );
d->aTrimMargins->setChecked( Okular::Settings::trimMargins() );
- d->aZoomFitWidth = new KToggleAction(KIcon( "zoom-fit-width" ), i18n("Fit &Width"), this);
+ d->aZoomFitWidth = new KToggleAction(QIcon::fromTheme( "zoom-fit-width" ), i18n("Fit &Width"), this);
ac->addAction("view_fit_to_width", d->aZoomFitWidth );
connect( d->aZoomFitWidth, SIGNAL(toggled(bool)), SLOT(slotFitToWidthToggled(bool)) );
- d->aZoomFitPage = new KToggleAction(KIcon( "zoom-fit-best" ), i18n("Fit &Page"), this);
+ d->aZoomFitPage = new KToggleAction(QIcon::fromTheme( "zoom-fit-best" ), i18n("Fit &Page"), this);
ac->addAction("view_fit_to_page", d->aZoomFitPage );
connect( d->aZoomFitPage, SIGNAL(toggled(bool)), SLOT(slotFitToPageToggled(bool)) );
- d->aZoomAutoFit = new KToggleAction(KIcon( "zoom-fit-best" ), i18n("&Auto Fit"), this);
+ d->aZoomAutoFit = new KToggleAction(QIcon::fromTheme( "zoom-fit-best" ), i18n("&Auto Fit"), this);
ac->addAction("view_auto_fit", d->aZoomAutoFit );
connect( d->aZoomAutoFit, SIGNAL(toggled(bool)), SLOT(slotAutoFitToggled(bool)) );
// View-Layout actions
- d->aViewMode = new KActionMenu( KIcon( "view-split-left-right" ), i18n( "&View Mode" ), this );
+ d->aViewMode = new KActionMenu( QIcon::fromTheme( "view-split-left-right" ), i18n( "&View Mode" ), this );
d->aViewMode->setDelayed( false );
#define ADD_VIEWMODE_ACTION( text, name, id ) \
do { \
@@ -518,7 +518,7 @@ do { \
connect( vmGroup, SIGNAL(triggered(QAction*)), this, SLOT(slotViewMode(QAction*)) );
#undef ADD_VIEWMODE_ACTION
- d->aViewContinuous = new KToggleAction(KIcon( "view-list-text" ), i18n("&Continuous"), this);
+ d->aViewContinuous = new KToggleAction(QIcon::fromTheme( "view-list-text" ), i18n("&Continuous"), this);
ac->addAction("view_continuous", d->aViewContinuous );
connect( d->aViewContinuous, SIGNAL(toggled(bool)), SLOT(slotContinuousToggled(bool)) );
d->aViewContinuous->setChecked( Okular::Settings::viewContinuous() );
@@ -526,7 +526,7 @@ do { \
// Mouse mode actions for viewer mode
d->mouseModeActionGroup = new QActionGroup( this );
d->mouseModeActionGroup->setExclusive( true );
- d->aMouseNormal = new KAction( KIcon( "input-mouse" ), i18n( "&Browse Tool" ), this );
+ d->aMouseNormal = new KAction( QIcon::fromTheme( "input-mouse" ), i18n( "&Browse Tool" ), this );
ac->addAction("mouse_drag", d->aMouseNormal );
connect( d->aMouseNormal, SIGNAL(triggered()), this, SLOT(slotSetMouseNormal()) );
d->aMouseNormal->setIconText( i18nc( "Browse Tool", "Browse" ) );
@@ -535,7 +535,7 @@ do { \
d->aMouseNormal->setActionGroup( d->mouseModeActionGroup );
d->aMouseNormal->setChecked( Okular::Settings::mouseMode() == Okular::Settings::EnumMouseMode::Browse );
- KAction * mz = new KAction(KIcon( "page-zoom" ), i18n("&Zoom Tool"), this);
+ KAction * mz = new KAction(QIcon::fromTheme( "page-zoom" ), i18n("&Zoom Tool"), this);
ac->addAction("mouse_zoom", mz );
connect( mz, SIGNAL(triggered()), this, SLOT(slotSetMouseZoom()) );
mz->setIconText( i18nc( "Zoom Tool", "Zoom" ) );
@@ -558,7 +558,7 @@ void PageView::setupActions( KActionCollection * ac )
d->aZoomOut->setShortcut( QKeySequence(QKeySequence::ZoomOut) );
// Mouse-Mode actions
- d->aMouseSelect = new KAction(KIcon( "select-rectangular" ), i18n("&Selection Tool"), this);
+ d->aMouseSelect = new KAction(QIcon::fromTheme( "select-rectangular" ), i18n("&Selection Tool"), this);
ac->addAction("mouse_select", d->aMouseSelect );
connect( d->aMouseSelect, SIGNAL(triggered()), this, SLOT(slotSetMouseSelect()) );
d->aMouseSelect->setIconText( i18nc( "Select Tool", "Selection" ) );
@@ -567,7 +567,7 @@ void PageView::setupActions( KActionCollection * ac )
d->aMouseSelect->setActionGroup( d->mouseModeActionGroup );
d->aMouseSelect->setChecked( Okular::Settings::mouseMode() == Okular::Settings::EnumMouseMode::RectSelect );
- d->aMouseTextSelect = new KAction(KIcon( "draw-text" ), i18n("&Text Selection Tool"), this);
+ d->aMouseTextSelect = new KAction(QIcon::fromTheme( "draw-text" ), i18n("&Text Selection Tool"), this);
ac->addAction("mouse_textselect", d->aMouseTextSelect );
connect( d->aMouseTextSelect, SIGNAL(triggered()), this, SLOT(slotSetMouseTextSelect()) );
d->aMouseTextSelect->setIconText( i18nc( "Text Selection Tool", "Text Selection" ) );
@@ -576,7 +576,7 @@ void PageView::setupActions( KActionCollection * ac )
d->aMouseTextSelect->setActionGroup( d->mouseModeActionGroup );
d->aMouseTextSelect->setChecked( Okular::Settings::mouseMode() == Okular::Settings::EnumMouseMode::TextSelect );
- d->aMouseTableSelect = new KAction(KIcon( "table" ), i18n("T&able Selection Tool"), this);
+ d->aMouseTableSelect = new KAction(QIcon::fromTheme( "table" ), i18n("T&able Selection Tool"), this);
ac->addAction("mouse_tableselect", d->aMouseTableSelect );
connect( d->aMouseTableSelect, SIGNAL( triggered() ), this, SLOT( slotSetMouseTableSelect() ) );
d->aMouseTableSelect->setIconText( i18nc( "Table Selection Tool", "Table Selection" ) );
@@ -585,7 +585,7 @@ void PageView::setupActions( KActionCollection * ac )
d->aMouseTableSelect->setActionGroup( d->mouseModeActionGroup );
d->aMouseTableSelect->setChecked( Okular::Settings::mouseMode() == Okular::Settings::EnumMouseMode::TableSelect );
- d->aMouseMagnifier = new KAction(KIcon( "document-preview" ), i18n("&Magnifier"), this);
+ d->aMouseMagnifier = new KAction(QIcon::fromTheme( "document-preview" ), i18n("&Magnifier"), this);
ac->addAction("mouse_magnifier", d->aMouseMagnifier );
connect( d->aMouseMagnifier, SIGNAL(triggered()), this, SLOT(slotSetMouseMagnifier()) );
d->aMouseMagnifier->setIconText( i18nc( "Magnifier Tool", "Magnifier" ) );
@@ -594,7 +594,7 @@ void PageView::setupActions( KActionCollection * ac )
d->aMouseMagnifier->setActionGroup( d->mouseModeActionGroup );
d->aMouseMagnifier->setChecked( Okular::Settings::mouseMode() == Okular::Settings::EnumMouseMode::Magnifier );
- d->aToggleAnnotator = new KToggleAction(KIcon( "draw-freehand" ), i18n("&Review"), this);
+ d->aToggleAnnotator = new KToggleAction(QIcon::fromTheme( "draw-freehand" ), i18n("&Review"), this);
ac->addAction("mouse_toggle_annotate", d->aToggleAnnotator );
d->aToggleAnnotator->setCheckable( true );
connect( d->aToggleAnnotator, SIGNAL(toggled(bool)), SLOT(slotToggleAnnotator(bool)) );
@@ -607,17 +607,17 @@ void PageView::setupActions( KActionCollection * ac )
ta->addAction( d->aMouseTableSelect );
// speak actions
- d->aSpeakDoc = new KAction( KIcon( "text-speak" ), i18n( "Speak Whole Document" ), this );
+ d->aSpeakDoc = new KAction( QIcon::fromTheme( "text-speak" ), i18n( "Speak Whole Document" ), this );
ac->addAction( "speak_document", d->aSpeakDoc );
d->aSpeakDoc->setEnabled( false );
connect( d->aSpeakDoc, SIGNAL(triggered()), SLOT(slotSpeakDocument()) );
- d->aSpeakPage = new KAction( KIcon( "text-speak" ), i18n( "Speak Current Page" ), this );
+ d->aSpeakPage = new KAction( QIcon::fromTheme( "text-speak" ), i18n( "Speak Current Page" ), this );
ac->addAction( "speak_current_page", d->aSpeakPage );
d->aSpeakPage->setEnabled( false );
connect( d->aSpeakPage, SIGNAL(triggered()), SLOT(slotSpeakCurrentPage()) );
- d->aSpeakStop = new KAction( KIcon( "media-playback-stop" ), i18n( "Stop Speaking" ), this );
+ d->aSpeakStop = new KAction( QIcon::fromTheme( "media-playback-stop" ), i18n( "Stop Speaking" ), this );
ac->addAction( "speak_stop_all", d->aSpeakStop );
d->aSpeakStop->setEnabled( false );
connect( d->aSpeakStop, SIGNAL(triggered()), SLOT(slotStopSpeaks()) );
@@ -2428,7 +2428,7 @@ void PageView::mouseReleaseEvent( QMouseEvent * e )
actStopSound = menu.addAction( i18n( "Stop Sound" ) );
QAction * actCopyLinkLocation = 0;
if ( dynamic_cast< const Okular::BrowseAction * >( link ) )
- actCopyLinkLocation = menu.addAction( KIcon( "edit-copy" ), i18n( "Copy Link Address" ) );
+ actCopyLinkLocation = menu.addAction( QIcon::fromTheme( "edit-copy" ), i18n( "Copy Link Address" ) );
QAction * res = menu.exec( e->globalPos() );
if ( res )
{
@@ -2578,7 +2578,7 @@ void PageView::mouseReleaseEvent( QMouseEvent * e )
if ( d->document->supportsSearching() && !selectedText.isEmpty() )
{
menu.addTitle( i18np( "Text (1 character)", "Text (%1 characters)", selectedText.length() ) );
- textToClipboard = menu.addAction( KIcon("edit-copy"), i18n( "Copy to Clipboard" ) );
+ textToClipboard = menu.addAction( QIcon::fromTheme("edit-copy"), i18n( "Copy to Clipboard" ) );
bool copyAllowed = d->document->isAllowed( Okular::AllowCopy );
if ( !copyAllowed )
{
@@ -2586,15 +2586,15 @@ void PageView::mouseReleaseEvent( QMouseEvent * e )
textToClipboard->setText( i18n("Copy forbidden by DRM") );
}
if ( Okular::Settings::useKTTSD() )
- speakText = menu.addAction( KIcon("text-speak"), i18n( "Speak Text" ) );
+ speakText = menu.addAction( QIcon::fromTheme("text-speak"), i18n( "Speak Text" ) );
if ( copyAllowed )
{
addWebShortcutsMenu( &menu, selectedText );
}
}
menu.addTitle( i18n( "Image (%1 by %2 pixels)", selectionRect.width(), selectionRect.height() ) );
- imageToClipboard = menu.addAction( KIcon("image-x-generic"), i18n( "Copy to Clipboard" ) );
- imageToFile = menu.addAction( KIcon("document-save"), i18n( "Save to File..." ) );
+ imageToClipboard = menu.addAction( QIcon::fromTheme("image-x-generic"), i18n( "Copy to Clipboard" ) );
+ imageToFile = menu.addAction( QIcon::fromTheme("document-save"), i18n( "Save to File..." ) );
QAction *choice = menu.exec( e->globalPos() );
// check if the user really selected an action
if ( choice )
@@ -2833,11 +2833,11 @@ void PageView::mouseReleaseEvent( QMouseEvent * e )
if (item && (page = item->page())->textSelection())
{
KMenu menu( this );
- QAction *textToClipboard = menu.addAction( KIcon( "edit-copy" ), i18n( "Copy Text" ) );
+ QAction *textToClipboard = menu.addAction( QIcon::fromTheme( "edit-copy" ), i18n( "Copy Text" ) );
QAction *speakText = 0;
QAction *httpLink = 0;
// if ( Okular::Settings::useKTTSD() )
-// speakText = menu.addAction( KIcon( "text-speak" ), i18n( "Speak Text" ) );
+// speakText = menu.addAction( QIcon::fromTheme( "text-speak" ), i18n( "Speak Text" ) );
if ( !d->document->isAllowed( Okular::AllowCopy ) )
{
textToClipboard->setEnabled( false );
@@ -4032,7 +4032,7 @@ void PageView::addWebShortcutsMenu( KMenu * menu, const QString & text )
if ( !searchProviders.isEmpty() )
{
KMenu *webShortcutsMenu = new KMenu( menu );
- webShortcutsMenu->setIcon( KIcon( "preferences-web-browser-shortcuts" ) );
+ webShortcutsMenu->setIcon( QIcon::fromTheme( "preferences-web-browser-shortcuts" ) );
const QString squeezedText = KStringHandler::rsqueeze( searchText, 21 );
webShortcutsMenu->setTitle( i18n( "Search for '%1' with", squeezedText ) );
@@ -4042,7 +4042,7 @@ void PageView::addWebShortcutsMenu( KMenu * menu, const QString & text )
foreach( const QString &searchProvider, searchProviders )
{
action = new KAction( searchProvider, webShortcutsMenu );
- action->setIcon( KIcon( filterData.iconNameForPreferredSearchProvider( searchProvider ) ) );
+ action->setIcon( QIcon::fromTheme( filterData.iconNameForPreferredSearchProvider( searchProvider ) ) );
action->setData( filterData.queryForPreferredSearchProvider( searchProvider ) );
connect( action, SIGNAL(triggered()), this, SLOT(slotHandleWebShortcutAction()) );
webShortcutsMenu->addAction( action );
@@ -4051,7 +4051,7 @@ void PageView::addWebShortcutsMenu( KMenu * menu, const QString & text )
webShortcutsMenu->addSeparator();
action = new KAction( i18n( "Configure Web Shortcuts..." ), webShortcutsMenu );
- action->setIcon( KIcon( "configure" ) );
+ action->setIcon( QIcon::fromTheme( "configure" ) );
connect( action, SIGNAL(triggered()), this, SLOT(slotConfigureWebShortcuts()) );
webShortcutsMenu->addAction( action );
diff --git a/ui/pageviewutils.h b/ui/pageviewutils.h
index bb1a76b..2df50c7 100644
--- a/ui/pageviewutils.h
+++ b/ui/pageviewutils.h
@@ -16,7 +16,7 @@
#include <qhash.h>
#include <qtoolbutton.h>
-#include <KIcon>
+#include <QIcon>
#include "core/area.h"
diff --git a/ui/presentationsearchbar.cpp b/ui/presentationsearchbar.cpp
index e9413b0..890ef8a 100644
--- a/ui/presentationsearchbar.cpp
+++ b/ui/presentationsearchbar.cpp
@@ -59,7 +59,7 @@ PresentationSearchBar::PresentationSearchBar( Okular::Document *document, QWidge
lay->addWidget( m_handle );
QToolButton * closeBtn = new QToolButton( this );
- closeBtn->setIcon( KIcon( "dialog-close" ) );
+ closeBtn->setIcon( QIcon::fromTheme( "dialog-close" ) );
closeBtn->setIconSize( QSize( 24, 24 ) );
closeBtn->setToolTip( i18n( "Close" ) );
closeBtn->setAutoRaise( true );
@@ -75,7 +75,7 @@ PresentationSearchBar::PresentationSearchBar( Okular::Document *document, QWidge
m_search->setSearchMoveViewport( true );
lay->addWidget( m_search );
- KPushButton * findNextBtn = new KPushButton( KIcon( "go-down-search" ), i18n( "Find Next" ), this );
+ KPushButton * findNextBtn = new KPushButton( QIcon::fromTheme( "go-down-search" ), i18n( "Find Next" ), this );
lay->addWidget( findNextBtn );
m_anchor->installEventFilter( this );
diff --git a/ui/presentationwidget.cpp b/ui/presentationwidget.cpp
index 2824724..939de82 100644
--- a/ui/presentationwidget.cpp
+++ b/ui/presentationwidget.cpp
@@ -159,7 +159,7 @@ PresentationWidget::PresentationWidget( QWidget * parent, Okular::Document * doc
m_topBar->setIconSize( QSize( 32, 32 ) );
m_topBar->setMovable( false );
m_topBar->layout()->setMargin(0);
- m_topBar->addAction( KIcon( layoutDirection() == Qt::RightToLeft ? "go-next" : "go-previous" ), i18n( "Previous Page" ), this, SLOT(slotPrevPage()) );
+ m_topBar->addAction( QIcon::fromTheme( layoutDirection() == Qt::RightToLeft ? "go-next" : "go-previous" ), i18n( "Previous Page" ), this, SLOT(slotPrevPage()) );
m_pagesEdit = new KLineEdit( m_topBar );
QSizePolicy sp = m_pagesEdit->sizePolicy();
sp.setHorizontalPolicy( QSizePolicy::Minimum );
@@ -175,7 +175,7 @@ PresentationWidget::PresentationWidget( QWidget * parent, Okular::Document * doc
pagesLabel->setText( QLatin1String( " / " ) + QString::number( m_document->pages() ) + QLatin1String( " " ) );
m_topBar->addWidget( pagesLabel );
connect( m_pagesEdit, SIGNAL(returnPressed()), this, SLOT(slotPageChanged()) );
- m_topBar->addAction( KIcon( layoutDirection() == Qt::RightToLeft ? "go-previous" : "go-next" ), i18n( "Next Page" ), this, SLOT(slotNextPage()) );
+ m_topBar->addAction( QIcon::fromTheme( layoutDirection() == Qt::RightToLeft ? "go-previous" : "go-next" ), i18n( "Next Page" ), this, SLOT(slotNextPage()) );
m_topBar->addSeparator();
QAction *playPauseAct = collection->action( "presentation_play_pause" );
playPauseAct->setEnabled( true );
@@ -198,7 +198,7 @@ PresentationWidget::PresentationWidget( QWidget * parent, Okular::Document * doc
if ( desktop->numScreens() > 1 )
{
m_topBar->addSeparator();
- m_screenSelect = new KSelectAction( KIcon( "video-display" ), i18n( "Switch Screen" ), m_topBar );
+ m_screenSelect = new KSelectAction( QIcon::fromTheme( "video-display" ), i18n( "Switch Screen" ), m_topBar );
m_screenSelect->setToolBarMode( KSelectAction::MenuMode );
m_screenSelect->setToolButtonPopupMode( QToolButton::InstantPopup );
m_topBar->addAction( m_screenSelect );
@@ -212,7 +212,7 @@ PresentationWidget::PresentationWidget( QWidget * parent, Okular::Document * doc
QWidget *spacer = new QWidget( m_topBar );
spacer->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::MinimumExpanding );
m_topBar->addWidget( spacer );
- m_topBar->addAction( KIcon( "application-exit" ), i18n( "Exit Presentation Mode" ), this, SLOT(close()) );
+ m_topBar->addAction( QIcon::fromTheme( "application-exit" ), i18n( "Exit Presentation Mode" ), this, SLOT(close()) );
m_topBar->setAutoFillBackground( true );
showTopBar( false );
// change topbar background color
@@ -506,12 +506,12 @@ void PresentationWidget::setPlayPauseIcon()
QAction *playPauseAction = m_ac->action( "presentation_play_pause" );
if ( m_advanceSlides )
{
- playPauseAction->setIcon( KIcon( "media-playback-pause" ) );
+ playPauseAction->setIcon( QIcon::fromTheme( "media-playback-pause" ) );
playPauseAction->setToolTip( i18nc( "For Presentation", "Pause" ) );
}
else
{
- playPauseAction->setIcon( KIcon( "media-playback-start" ) );
+ playPauseAction->setIcon( QIcon::fromTheme( "media-playback-start" ) );
playPauseAction->setToolTip( i18nc( "For Presentation", "Play" ) );
}
}
diff --git a/ui/propertiesdialog.cpp b/ui/propertiesdialog.cpp
index 5dc0c71..325a2d6 100644
--- a/ui/propertiesdialog.cpp
+++ b/ui/propertiesdialog.cpp
@@ -49,7 +49,7 @@ PropertiesDialog::PropertiesDialog(QWidget *parent, Okular::Document *doc)
// PROPERTIES
QFrame *page = new QFrame();
KPageWidgetItem *item = addPage( page, i18n( "&Properties" ) );
- item->setIcon( KIcon( "document-properties" ) );
+ item->setIcon( QIcon::fromTheme( "document-properties" ) );
// get document info, if not present display blank data and a warning
const Okular::DocumentInfo * info = doc->documentInfo();
@@ -147,7 +147,7 @@ PropertiesDialog::PropertiesDialog(QWidget *parent, Okular::Document *doc)
// create fonts tab and layout it
QFrame *page2 = new QFrame();
m_fontPage = addPage(page2, i18n("&Fonts"));
- m_fontPage->setIcon( KIcon( "preferences-desktop-font" ) );
+ m_fontPage->setIcon( QIcon::fromTheme( "preferences-desktop-font" ) );
page2Layout = new QVBoxLayout(page2);
#pragma message("KF5 fix margin/spacing")
// page2Layout->setMargin(marginHint());
diff --git a/ui/searchwidget.cpp b/ui/searchwidget.cpp
index 73c7528..e1d6c41 100644
--- a/ui/searchwidget.cpp
+++ b/ui/searchwidget.cpp
@@ -69,7 +69,7 @@ SearchWidget::SearchWidget( QWidget * parent, Okular::Document * document )
QToolButton *optionsMenuAction = new QToolButton( this );
mainlay->addWidget( optionsMenuAction );
optionsMenuAction->setAutoRaise( true );
- optionsMenuAction->setIcon( KIcon( "view-filter" ) );
+ optionsMenuAction->setIcon( QIcon::fromTheme( "view-filter" ) );
optionsMenuAction->setToolTip( i18n( "Filter Options" ) );
optionsMenuAction->setPopupMode( QToolButton::InstantPopup );
optionsMenuAction->setMenu( m_menu );
diff --git a/ui/side_reviews.cpp b/ui/side_reviews.cpp
index 6eff74c..02096a0 100644
--- a/ui/side_reviews.cpp
+++ b/ui/side_reviews.cpp
@@ -125,12 +125,12 @@ Reviews::Reviews( QWidget * parent, Okular::Document * document )
toolBar->setIconSize( QSize( 16, 16 ) );
toolBar->setMovable( false );
// - add Page button
- QAction * groupByPageAction = toolBar->addAction( KIcon( "text-x-generic" ), i18n( "Group by Page" ) );
+ QAction * groupByPageAction = toolBar->addAction( QIcon::fromTheme( "text-x-generic" ), i18n( "Group by Page" ) );
groupByPageAction->setCheckable( true );
connect( groupByPageAction, SIGNAL(toggled(bool)), this, SLOT(slotPageEnabled(bool)) );
groupByPageAction->setChecked( Okular::Settings::groupByPage() );
// - add Author button
- QAction * groupByAuthorAction = toolBar->addAction( KIcon( "user-identity" ), i18n( "Group by Author" ) );
+ QAction * groupByAuthorAction = toolBar->addAction( QIcon::fromTheme( "user-identity" ), i18n( "Group by Author" ) );
groupByAuthorAction->setCheckable( true );
connect( groupByAuthorAction, SIGNAL(toggled(bool)), this, SLOT(slotAuthorEnabled(bool)) );
groupByAuthorAction->setChecked( Okular::Settings::groupByAuthor() );
@@ -138,7 +138,7 @@ Reviews::Reviews( QWidget * parent, Okular::Document * document )
// - add separator
toolBar->addSeparator();
// - add Current Page Only button
- QAction * curPageOnlyAction = toolBar->addAction( KIcon( "arrow-down" ), i18n( "Show reviews for current page only" ) );
+ QAction * curPageOnlyAction = toolBar->addAction( QIcon::fromTheme( "arrow-down" ), i18n( "Show reviews for current page only" ) );
curPageOnlyAction->setCheckable( true );
connect( curPageOnlyAction, SIGNAL(toggled(bool)), this, SLOT(slotCurrentPageOnly(bool)) );
curPageOnlyAction->setChecked( Okular::Settings::currentPageOnly() );
diff --git a/ui/thumbnaillist.cpp b/ui/thumbnaillist.cpp
index 830bf65..5caa84f 100644
--- a/ui/thumbnaillist.cpp
+++ b/ui/thumbnaillist.cpp
@@ -988,7 +988,7 @@ ThumbnailController::ThumbnailController( QWidget * parent, ThumbnailList * list
// insert a togglebutton [show only bookmarked pages]
//insertSeparator();
QAction * showBoomarkOnlyAction = addAction(
- KIcon( "bookmarks" ), i18n( "Show bookmarked pages only" ) );
+ QIcon::fromTheme( "bookmarks" ), i18n( "Show bookmarked pages only" ) );
showBoomarkOnlyAction->setCheckable( true );
connect( showBoomarkOnlyAction, SIGNAL(toggled(bool)), list, SLOT(slotFilterBookmarks(bool)) );
showBoomarkOnlyAction->setChecked( Okular::Settings::filterBookmarks() );
diff --git a/ui/tocmodel.cpp b/ui/tocmodel.cpp
index 291bcb1..e2ce925 100644
--- a/ui/tocmodel.cpp
+++ b/ui/tocmodel.cpp
@@ -189,7 +189,7 @@ QVariant TOCModel::data( const QModelIndex &index, int role ) const
break;
case Qt::DecorationRole:
if ( item->highlight )
- return KIcon( QApplication::layoutDirection() == Qt::RightToLeft ? "arrow-left" : "arrow-right" );
+ return QIcon::fromTheme( QApplication::layoutDirection() == Qt::RightToLeft ? "arrow-left" : "arrow-right" );
break;
case PageItemDelegate::PageRole:
if ( item->viewport.isValid() )
diff --git a/ui/videowidget.cpp b/ui/videowidget.cpp
index 38dbb31..4b46260 100644
--- a/ui/videowidget.cpp
+++ b/ui/videowidget.cpp
@@ -131,12 +131,12 @@ void VideoWidget::Private::setupPlayPauseAction( PlayPauseMode mode )
{
if ( mode == PlayMode )
{
- playPauseAction->setIcon( KIcon( "media-playback-start" ) );
+ playPauseAction->setIcon( QIcon::fromTheme( "media-playback-start" ) );
playPauseAction->setText( i18nc( "start the movie playback", "Play" ) );
}
else if ( mode == PauseMode )
{
- playPauseAction->setIcon( KIcon( "media-playback-pause" ) );
+ playPauseAction->setIcon( QIcon::fromTheme( "media-playback-pause" ) );
playPauseAction->setText( i18nc( "pause the movie playback", "Pause" ) );
}
}
@@ -253,7 +253,7 @@ VideoWidget::VideoWidget( const Okular::Annotation *annotation, Okular::Movie *m
d->controlBar->addAction( d->playPauseAction );
d->setupPlayPauseAction( Private::PlayMode );
d->stopAction = d->controlBar->addAction(
- KIcon( "media-playback-stop" ),
+ QIcon::fromTheme( "media-playback-stop" ),
i18nc( "stop the movie playback", "Stop" ),
this, SLOT(stop()) );
d->stopAction->setEnabled( false );
@@ -265,7 +265,7 @@ VideoWidget::VideoWidget( const Okular::Annotation *annotation, Okular::Movie *m
Phonon::SeekSlider *verticalSeekSlider = new Phonon::SeekSlider( d->player->mediaObject(), 0 );
verticalSeekSlider->setMaximumHeight( 100 );
d->seekSliderMenuAction = createToolBarButtonWithWidgetPopup(
- d->controlBar, verticalSeekSlider, KIcon( "player-time" ) );
+ d->controlBar, verticalSeekSlider, QIcon::fromTheme( "player-time" ) );
d->seekSliderMenuAction->setVisible( false );
d->controlBar->setVisible( movie->showControls() );