Commit 346ac440 authored by David Edmundson's avatar David Edmundson
Browse files

KIcon -> QIcon

parent 2e9778b4
......@@ -25,6 +25,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
// KDE
#include <KGlobalSettings>
#include <KLocalizedString>
// Local
#include "ui_generalconfigpage.h"
......@@ -73,7 +74,7 @@ ConfigDialog::ConfigDialog(QWidget* parent)
// General
widget = setupPage(d->mGeneralConfigPage);
pageItem = addPage(widget, i18n("General"));
pageItem->setIcon(KIcon("gwenview"));
pageItem->setIcon(QIcon::fromTheme("gwenview"));
connect(d->mGeneralConfigPage.kcfg_ViewBackgroundValue, SIGNAL(valueChanged(int)), SLOT(updateViewBackgroundFrame()));
// Image View
......@@ -107,12 +108,12 @@ ConfigDialog::ConfigDialog(QWidget* parent)
d->mThumbnailBarOrientationGroup->addButton(d->mImageViewConfigPage.verticalRadioButton, int(Qt::Vertical));
pageItem = addPage(widget, i18n("Image View"));
pageItem->setIcon(KIcon("view-preview"));
pageItem->setIcon(QIcon::fromTheme("view-preview"));
// Advanced
widget = setupPage(d->mAdvancedConfigPage);
pageItem = addPage(widget, i18n("Advanced"));
pageItem->setIcon(KIcon("preferences-other"));
pageItem->setIcon(QIcon::fromTheme("preferences-other"));
d->mAdvancedConfigPage.cacheHelpLabel->setFont(KGlobalSettings::smallestReadableFont());
updateViewBackgroundFrame();
......
......@@ -158,17 +158,17 @@ void showMenuForDroppedUrls(QWidget* parent, const KUrl::List& urlList, const KU
KMenu menu(parent);
QAction* moveAction = menu.addAction(
KIcon("go-jump"),
QIcon::fromTheme("go-jump"),
i18n("Move Here"));
QAction* copyAction = menu.addAction(
KIcon("edit-copy"),
QIcon::fromTheme("edit-copy"),
i18n("Copy Here"));
QAction* linkAction = menu.addAction(
KIcon("edit-link"),
QIcon::fromTheme("edit-link"),
i18n("Link Here"));
menu.addSeparator();
menu.addAction(
KIcon("process-stop"),
QIcon::fromTheme("process-stop"),
i18n("Cancel"));
QAction* action = menu.exec(QCursor::pos());
......
......@@ -195,12 +195,12 @@ FileOpsContextManagerItem::FileOpsContextManagerItem(ContextManager* manager, QL
d->mTrashAction = file->addAction("file_trash", this, SLOT(trash()));
d->mTrashAction->setText(i18nc("Verb", "Trash"));
d->mTrashAction->setIcon(KIcon("user-trash"));
d->mTrashAction->setIcon(QIcon::fromTheme("user-trash"));
d->mTrashAction->setShortcut(Qt::Key_Delete);
d->mDelAction = file->addAction("file_delete", this, SLOT(del()));
d->mDelAction->setText(i18n("Delete"));
d->mDelAction->setIcon(KIcon("edit-delete"));
d->mDelAction->setIcon(QIcon::fromTheme("edit-delete"));
d->mDelAction->setShortcut(QKeySequence(Qt::ShiftModifier | Qt::Key_Delete));
d->mRestoreAction = file->addAction("file_restore", this, SLOT(restore()));
......@@ -208,11 +208,11 @@ FileOpsContextManagerItem::FileOpsContextManagerItem(ContextManager* manager, QL
d->mShowPropertiesAction = file->addAction("file_show_properties", this, SLOT(showProperties()));
d->mShowPropertiesAction->setText(i18n("Properties"));
d->mShowPropertiesAction->setIcon(KIcon("document-properties"));
d->mShowPropertiesAction->setIcon(QIcon::fromTheme("document-properties"));
d->mCreateFolderAction = file->addAction("file_create_folder", this, SLOT(createFolder()));
d->mCreateFolderAction->setText(i18n("Create Folder..."));
d->mCreateFolderAction->setIcon(KIcon("folder-new"));
d->mCreateFolderAction->setIcon(QIcon::fromTheme("folder-new"));
d->mOpenWithAction = file->addAction("file_open_with");
d->mOpenWithAction->setText(i18n("Open With"));
......@@ -401,7 +401,7 @@ void FileOpsContextManagerItem::populateOpenMenu()
Q_FOREACH(const KService::Ptr & service, d->mServiceList) {
QString text = service->name().replace('&', "&&");
QAction* action = openMenu->addAction(text);
action->setIcon(KIcon(service->icon()));
action->setIcon(QIcon::fromTheme(service->icon()));
action->setData(idx);
++idx;
}
......
......@@ -37,7 +37,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Cambridge, MA 02110-1301, USA
#include <KComboBox>
#include <KDebug>
#include <KFileItem>
#include <KIcon>
#include <QIcon>
#include <KIconLoader>
#include <KLineEdit>
#include <KLocale>
......@@ -494,7 +494,7 @@ public:
void setFilterWidget(QWidget* widget)
{
QToolButton* closeButton = new QToolButton;
closeButton->setIcon(KIcon("window-close"));
closeButton->setIcon(QIcon::fromTheme("window-close"));
closeButton->setAutoRaise(true);
closeButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Minimum);
int size = IconSize(KIconLoader::Small);
......
......@@ -149,7 +149,7 @@ struct FullScreenContentPrivate
// to remain visible
mOptionsAction = new KAction(q);
mOptionsAction->setPriority(QAction::LowPriority);
mOptionsAction->setIcon(KIcon("configure"));
mOptionsAction->setIcon(QIcon::fromTheme("configure"));
mOptionsAction->setToolTip(i18nc("@info:tooltip", "Configure full screen mode"));
QObject::connect(mOptionsAction, SIGNAL(triggered()), q, SLOT(showOptionsMenu()));
}
......
......@@ -84,37 +84,37 @@ struct ImageOpsContextManagerItem::Private
mRotateLeftAction->setPriority(QAction::LowPriority);
mRotateLeftAction->setText(i18n("Rotate Left"));
mRotateLeftAction->setToolTip(i18nc("@info:tooltip", "Rotate image to the left"));
mRotateLeftAction->setIcon(KIcon("object-rotate-left"));
mRotateLeftAction->setIcon(QIcon::fromTheme("object-rotate-left"));
mRotateLeftAction->setShortcut(Qt::CTRL + Qt::Key_L);
mRotateRightAction = edit->addAction("rotate_right", q, SLOT(rotateRight()));
mRotateRightAction->setPriority(QAction::LowPriority);
mRotateRightAction->setText(i18n("Rotate Right"));
mRotateRightAction->setToolTip(i18nc("@info:tooltip", "Rotate image to the right"));
mRotateRightAction->setIcon(KIcon("object-rotate-right"));
mRotateRightAction->setIcon(QIcon::fromTheme("object-rotate-right"));
mRotateRightAction->setShortcut(Qt::CTRL + Qt::Key_R);
mMirrorAction = edit->addAction("mirror", q, SLOT(mirror()));
mMirrorAction->setText(i18n("Mirror"));
mMirrorAction->setIcon(KIcon("object-flip-horizontal"));
mMirrorAction->setIcon(QIcon::fromTheme("object-flip-horizontal"));
mFlipAction = edit->addAction("flip", q, SLOT(flip()));
mFlipAction->setText(i18n("Flip"));
mFlipAction->setIcon(KIcon("object-flip-vertical"));
mFlipAction->setIcon(QIcon::fromTheme("object-flip-vertical"));
mResizeAction = edit->addAction("resize", q, SLOT(resizeImage()));
mResizeAction->setText(i18n("Resize"));
mResizeAction->setIcon(KIcon("transform-scale"));
mResizeAction->setIcon(QIcon::fromTheme("transform-scale"));
mResizeAction->setShortcut(Qt::SHIFT + Qt::Key_R);
mCropAction = edit->addAction("crop", q, SLOT(crop()));
mCropAction->setText(i18n("Crop"));
mCropAction->setIcon(KIcon("transform-crop-and-resize"));
mCropAction->setIcon(QIcon::fromTheme("transform-crop-and-resize"));
mCropAction->setShortcut(Qt::SHIFT + Qt::Key_C);
mRedEyeReductionAction = edit->addAction("red_eye_reduction", q, SLOT(startRedEyeReduction()));
mRedEyeReductionAction->setText(i18n("Red Eye Reduction"));
//mRedEyeReductionAction->setIcon(KIcon("transform-crop-and-resize"));
//mRedEyeReductionAction->setIcon(QIcon::fromTheme("transform-crop-and-resize"));
mActionList
<< mRotateLeftAction
......
......@@ -69,7 +69,7 @@ struct KIPIExportActionPrivate
};
KIPIExportAction::KIPIExportAction(QObject* parent)
: KToolBarPopupAction(KIcon("document-share"), i18nc("@action", "Share"), parent)
: KToolBarPopupAction(QIcon::fromTheme("document-share"), i18nc("@action", "Share"), parent)
, d(new KIPIExportActionPrivate)
{
d->q = this;
......
......@@ -373,14 +373,14 @@ struct MainWindow::Private
KAction* action = file->addAction("reload", q, SLOT(reload()));
action->setText(i18nc("@action reload the currently viewed image", "Reload"));
action->setIcon(KIcon("view-refresh"));
action->setIcon(QIcon::fromTheme("view-refresh"));
action->setShortcut(Qt::Key_F5);
mBrowseAction = view->addAction("browse");
mBrowseAction->setText(i18nc("@action:intoolbar Switch to file list", "Browse"));
mBrowseAction->setToolTip(i18nc("@info:tooltip", "Browse folders for images"));
mBrowseAction->setCheckable(true);
mBrowseAction->setIcon(KIcon("view-list-icons"));
mBrowseAction->setIcon(QIcon::fromTheme("view-list-icons"));
mBrowseAction->setShortcut(Qt::Key_Escape);
connect(mViewMainPage, SIGNAL(goToBrowseModeRequested()),
mBrowseAction, SLOT(trigger()));
......@@ -388,7 +388,7 @@ struct MainWindow::Private
mViewAction = view->addAction("view");
mViewAction->setText(i18nc("@action:intoolbar Switch to image view", "View"));
mViewAction->setToolTip(i18nc("@info:tooltip", "View selected images"));
mViewAction->setIcon(KIcon("view-preview"));
mViewAction->setIcon(QIcon::fromTheme("view-preview"));
mViewAction->setCheckable(true);
mViewModeActionGroup = new QActionGroup(q);
......@@ -408,13 +408,13 @@ struct MainWindow::Private
mFullScreenAction, SLOT(trigger()));
KAction* leaveFullScreenAction = view->addAction("leave_fullscreen", q, SLOT(leaveFullScreen()));
leaveFullScreenAction->setIcon(KIcon("view-restore"));
leaveFullScreenAction->setIcon(QIcon::fromTheme("view-restore"));
leaveFullScreenAction->setPriority(QAction::LowPriority);
leaveFullScreenAction->setText(i18nc("@action", "Leave Fullscreen Mode"));
mGoToPreviousAction = view->addAction("go_previous", q, SLOT(goToPrevious()));
mGoToPreviousAction->setPriority(QAction::LowPriority);
mGoToPreviousAction->setIcon(KIcon("media-skip-backward"));
mGoToPreviousAction->setIcon(QIcon::fromTheme("media-skip-backward"));
mGoToPreviousAction->setText(i18nc("@action Go to previous image", "Previous"));
mGoToPreviousAction->setToolTip(i18nc("@info:tooltip", "Go to previous image"));
mGoToPreviousAction->setShortcut(Qt::Key_Backspace);
......@@ -422,7 +422,7 @@ struct MainWindow::Private
mGoToNextAction = view->addAction("go_next", q, SLOT(goToNext()));
mGoToNextAction->setPriority(QAction::LowPriority);
mGoToNextAction->setIcon(KIcon("media-skip-forward"));
mGoToNextAction->setIcon(QIcon::fromTheme("media-skip-forward"));
mGoToNextAction->setText(i18nc("@action Go to next image", "Next"));
mGoToNextAction->setToolTip(i18nc("@info:tooltip", "Go to next image"));
mGoToNextAction->setShortcut(Qt::Key_Space);
......@@ -446,14 +446,14 @@ struct MainWindow::Private
action = view->addAction("go_start_page", q, SLOT(showStartMainPage()));
action->setPriority(QAction::LowPriority);
action->setIcon(KIcon("go-home"));
action->setIcon(QIcon::fromTheme("go-home"));
action->setText(i18nc("@action", "Start Page"));
action->setToolTip(i18nc("@info:tooltip", "Open the start page"));
mToggleSideBarAction = view->add<KToggleAction>("toggle_sidebar");
connect(mToggleSideBarAction, SIGNAL(toggled(bool)),
q, SLOT(toggleSideBar(bool)));
mToggleSideBarAction->setIcon(KIcon("view-sidetree"));
mToggleSideBarAction->setIcon(QIcon::fromTheme("view-sidetree"));
mToggleSideBarAction->setShortcut(Qt::Key_F4);
mToggleSideBarAction->setText(i18nc("@action", "Sidebar"));
connect(mBrowseMainPage->toggleSideBarButton(), SIGNAL(clicked()),
......@@ -494,14 +494,14 @@ struct MainWindow::Private
action = undoGroup->createRedoAction(actionCollection);
action->setObjectName(KStandardAction::name(KStandardAction::Redo));
action->setIcon(KIcon("edit-redo"));
action->setIcon(QIcon::fromTheme("edit-redo"));
action->setIconText(i18n("Redo"));
action->setShortcuts(KStandardShortcut::redo());
edit->addAction(action->objectName(), action);
action = undoGroup->createUndoAction(actionCollection);
action->setObjectName(KStandardAction::name(KStandardAction::Undo));
action->setIcon(KIcon("edit-undo"));
action->setIcon(QIcon::fromTheme("edit-undo"));
action->setIconText(i18n("Undo"));
action->setShortcuts(KStandardShortcut::undo());
edit->addAction(action->objectName(), action);
......@@ -1394,10 +1394,10 @@ void MainWindow::updateSlideShowAction()
{
if (d->mSlideShow->isRunning()) {
d->mToggleSlideShowAction->setText(i18n("Stop Slideshow"));
d->mToggleSlideShowAction->setIcon(KIcon("media-playback-pause"));
d->mToggleSlideShowAction->setIcon(QIcon::fromTheme("media-playback-pause"));
} else {
d->mToggleSlideShowAction->setText(i18n("Start Slideshow"));
d->mToggleSlideShowAction->setIcon(KIcon("media-playback-start"));
d->mToggleSlideShowAction->setIcon(QIcon::fromTheme("media-playback-start"));
}
}
......
......@@ -31,7 +31,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include <KActionCollection>
#include <KColorScheme>
#include <KDebug>
#include <KIcon>
#include <QIcon>
#include <KIconLoader>
#include <KLocale>
#include <KUrl>
......@@ -300,7 +300,7 @@ void SaveBar::initActionDependentWidgets()
// FIXME: Not using an action for now
d->mSaveAllButton->setText(i18n("Save All"));
d->mSaveAllButton->setIcon(KIcon("document-save-all"));
d->mSaveAllButton->setIcon(QIcon::fromTheme("document-save-all"));
connect(d->mSaveAllButton, SIGNAL(clicked()),
SIGNAL(requestSaveAll()));
......
......@@ -33,7 +33,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
// KDE
#include <KDebug>
#include <KIcon>
#include <QIcon>
#include <KIconLoader>
#include <KGlobalSettings>
#include <KWordWrap>
......
......@@ -32,7 +32,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Cambridge, MA 02110-1301, USA
// KDE
#include <KFilePlacesModel>
#include <KGlobalSettings>
#include <KIcon>
#include <QIcon>
#include <KMimeType>
// Local
......@@ -293,10 +293,10 @@ void StartMainPage::showRecentFoldersViewContextMenu(const QPoint& pos)
// Create menu
QMenu menu(this);
bool fromRecentUrls = view == d->mRecentUrlsView;
QAction* addToPlacesAction = fromRecentUrls ? 0 : menu.addAction(KIcon("bookmark-new"), i18n("Add to Places"));
QAction* removeAction = menu.addAction(KIcon("edit-delete"), fromRecentUrls ? i18n("Forget this URL") : i18n("Forget this Folder"));
QAction* addToPlacesAction = fromRecentUrls ? 0 : menu.addAction(QIcon::fromTheme("bookmark-new"), i18n("Add to Places"));
QAction* removeAction = menu.addAction(QIcon::fromTheme("edit-delete"), fromRecentUrls ? i18n("Forget this URL") : i18n("Forget this Folder"));
menu.addSeparator();
QAction* clearAction = menu.addAction(KIcon("edit-delete-all"), i18n("Forget All"));
QAction* clearAction = menu.addAction(QIcon::fromTheme("edit-delete-all"), i18n("Forget All"));
if (!index.isValid()) {
if (addToPlacesAction) {
......
......@@ -434,7 +434,7 @@ ViewMainPage::ViewMainPage(QWidget* parent, SlideShow* slideShow, KActionCollect
d->mToggleThumbnailBarAction = view->add<KToggleAction>(QString("toggle_thumbnailbar"));
d->mToggleThumbnailBarAction->setText(i18n("Thumbnail Bar"));
d->mToggleThumbnailBarAction->setIcon(KIcon("folder-image"));
d->mToggleThumbnailBarAction->setIcon(QIcon::fromTheme("folder-image"));
d->mToggleThumbnailBarAction->setShortcut(Qt::CTRL | Qt::Key_B);
d->mToggleThumbnailBarAction->setChecked(GwenviewConfig::thumbnailBarIsVisible());
connect(d->mToggleThumbnailBarAction, SIGNAL(triggered(bool)),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment