Commit f789e6b8 authored by Christoph Feck's avatar Christoph Feck
Browse files

KIcon -> QIcon::fromTheme

parent 6844b7d8
......@@ -77,12 +77,12 @@ kpCommandHistoryBase::kpCommandHistoryBase (bool doReadConfig,
KActionCollection *ac)
: d (new kpCommandHistoryBasePrivate ())
{
m_actionUndo = new KToolBarPopupAction (KIcon ("edit-undo"), undoActionText (), this);
m_actionUndo = new KToolBarPopupAction (QIcon::fromTheme ("edit-undo"), undoActionText (), this);
ac->addAction (KStandardAction::name (KStandardAction::Undo), m_actionUndo);
m_actionUndo->setShortcuts (KStandardShortcut::shortcut (KStandardShortcut::Undo));
connect (m_actionUndo, SIGNAL(triggered(bool)), this, SLOT (undo ()));
m_actionRedo = new KToolBarPopupAction (KIcon ("edit-redo"), redoActionText (), this);
m_actionRedo = new KToolBarPopupAction (QIcon::fromTheme ("edit-redo"), redoActionText (), this);
ac->addAction (KStandardAction::name (KStandardAction::Redo), m_actionRedo);
m_actionRedo->setShortcuts (KStandardShortcut::shortcut (KStandardShortcut::Redo));
connect (m_actionRedo, SIGNAL(triggered(bool)), this, SLOT (redo ()));
......
......@@ -101,7 +101,7 @@ void kpMainWindow::setupFileMenuActions ()
d->actionExport = ac->addAction("file_export");
d->actionExport->setText (i18n ("E&xport..."));
d->actionExport->setIcon (KIcon ("document-export"));
d->actionExport->setIcon (QIcon::fromTheme ("document-export"));
connect(d->actionExport, SIGNAL(triggered(bool) ), SLOT (slotExport ()));
d->actionScan = ac->addAction("file_scan");
......@@ -115,13 +115,13 @@ void kpMainWindow::setupFileMenuActions ()
d->actionProperties = ac->addAction ("file_properties");
d->actionProperties->setText (i18n ("Properties"));
d->actionProperties->setIcon (KIcon ("document-properties"));
d->actionProperties->setIcon (QIcon::fromTheme ("document-properties"));
connect (d->actionProperties, SIGNAL (triggered (bool)), SLOT (slotProperties ()));
//d->actionRevert = KStandardAction::revert (this, SLOT (slotRevert ()), ac);
d->actionReload = ac->addAction ("file_revert");
d->actionReload->setText (i18n ("Reloa&d"));
d->actionReload->setIcon (KIcon ("view-refresh"));
d->actionReload->setIcon (QIcon::fromTheme ("view-refresh"));
connect(d->actionReload, SIGNAL(triggered(bool) ), SLOT (slotReload ()));
d->actionReload->setShortcuts(KStandardShortcut::reload ());
slotEnableReload ();
......
......@@ -142,19 +142,19 @@ void kpMainWindow::setupImageMenuActions ()
d->actionRotate = ac->addAction ("image_rotate");
d->actionRotate->setText (i18n ("&Rotate..."));
d->actionRotate->setIcon (KIcon ("transform-rotate"));
d->actionRotate->setIcon (QIcon::fromTheme ("transform-rotate"));
connect (d->actionRotate, SIGNAL (triggered (bool)), SLOT (slotRotate ()));
d->actionRotate->setShortcut(Qt::CTRL + Qt::Key_R);
d->actionRotateLeft = ac->addAction ("image_rotate_270deg");
d->actionRotateLeft->setText (i18n ("Rotate &Left"));
d->actionRotateLeft->setIcon (KIcon ("object-rotate-left"));
d->actionRotateLeft->setIcon (QIcon::fromTheme ("object-rotate-left"));
connect (d->actionRotateLeft, SIGNAL (triggered (bool)), SLOT (slotRotate270 ()));
d->actionRotateLeft->setShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_Left);
d->actionRotateRight = ac->addAction ("image_rotate_90deg");
d->actionRotateRight->setText (i18n ("Rotate Righ&t"));
d->actionRotateRight->setIcon (KIcon ("object-rotate-right"));
d->actionRotateRight->setIcon (QIcon::fromTheme ("object-rotate-right"));
connect (d->actionRotateRight, SIGNAL (triggered (bool)), SLOT (slotRotate90 ()));
d->actionRotateRight->setShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_Right);
......
......@@ -37,7 +37,6 @@
#include <kfontaction.h>
#include <kfontsizeaction.h>
#include <kglobal.h>
#include <kicon.h>
#include <klocale.h>
#include <KToolBar>
#include <ktoggleaction.h>
......@@ -67,25 +66,25 @@ void kpMainWindow::setupTextToolBarActions ()
this, SLOT (slotTextFontSizeChanged ()));
d->actionTextBold = ac->add<KToggleAction> ("text_bold");
d->actionTextBold->setIcon (KIcon ("format-text-bold"));
d->actionTextBold->setIcon (QIcon::fromTheme ("format-text-bold"));
d->actionTextBold->setText (i18n ("Bold"));
connect (d->actionTextBold, SIGNAL (triggered (bool)),
SLOT (slotTextBoldChanged ()));
d->actionTextItalic = ac->add<KToggleAction> ("text_italic");
d->actionTextItalic->setIcon (KIcon ("format-text-italic"));
d->actionTextItalic->setIcon (QIcon::fromTheme ("format-text-italic"));
d->actionTextItalic->setText (i18n ("Italic"));
connect (d->actionTextItalic, SIGNAL (triggered (bool)),
SLOT (slotTextItalicChanged ()));
d->actionTextUnderline = ac->add<KToggleAction> ("text_underline");
d->actionTextUnderline->setIcon (KIcon ("format-text-underline"));
d->actionTextUnderline->setIcon (QIcon::fromTheme ("format-text-underline"));
d->actionTextUnderline->setText (i18n ("Underline"));
connect (d->actionTextUnderline, SIGNAL (triggered (bool)),
SLOT (slotTextUnderlineChanged ()));
d->actionTextStrikeThru = ac->add<KToggleAction> ("text_strike_thru");
d->actionTextStrikeThru->setIcon (KIcon ("format-text-strikethrough"));
d->actionTextStrikeThru->setIcon (QIcon::fromTheme ("format-text-strikethrough"));
d->actionTextStrikeThru->setText (i18n ("Strike Through"));
connect (d->actionTextStrikeThru, SIGNAL (triggered (bool)),
SLOT (slotTextStrikeThruChanged ()));
......
......@@ -28,7 +28,6 @@
#include <kpToolAction.h>
#include <kactioncollection.h>
#include <kicon.h>
#include <kpTool.h>
......@@ -38,7 +37,7 @@ kpToolAction::kpToolAction(const QString &text,
const QString &pic, const KShortcut &shortcut,
const QObject *receiver, const char *slot,
KActionCollection *ac, const QString &name)
: KToggleAction(KIcon(pic), text, ac)
: KToggleAction(QIcon::fromTheme(pic), text, ac)
{
KToggleAction::setShortcut(shortcut);
......
......@@ -78,7 +78,7 @@ kpToolZoom::kpToolZoom (kpToolEnvironment *environ, QWidget *parent)
d (new kpToolZoomPrivate ())
{
// different from objectName()
action()->setIcon(KIcon("zoom-original"));
action()->setIcon(QIcon::fromTheme("zoom-original"));
}
//---------------------------------------------------------------------
......
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