Commit 8e49c93e authored by Michael Pyne's avatar Michael Pyne

Port KIcon to QIcon.

Using the kde-dev-scripts conversion script.
parent ec1a2b14
......@@ -25,7 +25,7 @@
#include <kstandardaction.h>
#include <ktoggleaction.h>
#include <kactionmenu.h>
#include <kicon.h>
#include <QIcon>
#include <kaction.h>
#include <kconfiggroup.h>
#include <kapplication.h>
......@@ -210,33 +210,33 @@ void JuK::setupActions()
// Setup the menu which handles the random play options.
KActionMenu *actionMenu = collection->add<KActionMenu>("actionMenu");
actionMenu->setText(i18n("&Random Play"));
actionMenu->setIcon(KIcon( QLatin1String( "media-playlist-shuffle" )));
actionMenu->setIcon(QIcon::fromTheme( QLatin1String( "media-playlist-shuffle" )));
actionMenu->setDelayed(false);
QActionGroup* randomPlayGroup = new QActionGroup(this);
QAction *act = collection->add<KToggleAction>("disableRandomPlay");
act->setText(i18n("&Disable Random Play"));
act->setIcon(KIcon( QLatin1String( "go-down" )));
act->setIcon(QIcon::fromTheme( QLatin1String( "go-down" )));
act->setActionGroup(randomPlayGroup);
actionMenu->addAction(act);
m_randomPlayAction = collection->add<KToggleAction>("randomPlay");
m_randomPlayAction->setText(i18n("Use &Random Play"));
m_randomPlayAction->setIcon(KIcon( QLatin1String( "media-playlist-shuffle" )));
m_randomPlayAction->setIcon(QIcon::fromTheme( QLatin1String( "media-playlist-shuffle" )));
m_randomPlayAction->setActionGroup(randomPlayGroup);
actionMenu->addAction(m_randomPlayAction);
act = collection->add<KToggleAction>("albumRandomPlay");
act->setText(i18n("Use &Album Random Play"));
act->setIcon(KIcon( QLatin1String( "media-playlist-shuffle" )));
act->setIcon(QIcon::fromTheme( QLatin1String( "media-playlist-shuffle" )));
act->setActionGroup(randomPlayGroup);
connect(act, SIGNAL(triggered(bool)), SLOT(slotCheckAlbumNextAction(bool)));
actionMenu->addAction(act);
act = collection->addAction("removeFromPlaylist", clear, SLOT(clear()));
act->setText(i18n("Remove From Playlist"));
act->setIcon(KIcon( QLatin1String( "list-remove" )));
act->setIcon(QIcon::fromTheme( QLatin1String( "list-remove" )));
act = collection->add<KToggleAction>("crossfadeTracks");
act->setText(i18n("Crossfade Between Tracks"));
......@@ -244,23 +244,23 @@ void JuK::setupActions()
act = collection->addAction("play", m_player, SLOT(play()));
act->setText(i18n("&Play"));
act->setIcon(KIcon( QLatin1String( "media-playback-start" )));
act->setIcon(QIcon::fromTheme( QLatin1String( "media-playback-start" )));
act = collection->addAction("pause", m_player, SLOT(pause()));
act->setText(i18n("P&ause"));
act->setIcon(KIcon( QLatin1String( "media-playback-pause" )));
act->setIcon(QIcon::fromTheme( QLatin1String( "media-playback-pause" )));
act = collection->addAction("stop", m_player, SLOT(stop()));
act->setText(i18n("&Stop"));
act->setIcon(KIcon( QLatin1String( "media-playback-stop" )));
act->setIcon(QIcon::fromTheme( QLatin1String( "media-playback-stop" )));
act = new KToolBarPopupAction(KIcon( QLatin1String( "media-skip-backward") ), i18nc("previous track", "Previous" ), collection);
act = new KToolBarPopupAction(QIcon::fromTheme( QLatin1String( "media-skip-backward") ), i18nc("previous track", "Previous" ), collection);
collection->addAction("back", act);
connect(act, SIGNAL(triggered(bool)), m_player, SLOT(back()));
act = collection->addAction("forward", m_player, SLOT(forward()));
act->setText(i18nc("next track", "&Next"));
act->setIcon(KIcon( QLatin1String( "media-skip-forward" )));
act->setIcon(QIcon::fromTheme( QLatin1String( "media-skip-forward" )));
act = collection->addAction("loopPlaylist");
act->setText(i18n("&Loop Playlist"));
......@@ -273,27 +273,27 @@ void JuK::setupActions()
act = collection->addAction("mute", m_player, SLOT(mute()));
act->setText(i18nc("silence playback", "Mute"));
act->setIcon(KIcon( QLatin1String( "audio-volume-muted" )));
act->setIcon(QIcon::fromTheme( QLatin1String( "audio-volume-muted" )));
act = collection->addAction("volumeUp", m_player, SLOT(volumeUp()));
act->setText(i18n("Volume Up"));
act->setIcon(KIcon( QLatin1String( "audio-volume-high" )));
act->setIcon(QIcon::fromTheme( QLatin1String( "audio-volume-high" )));
act = collection->addAction("volumeDown", m_player, SLOT(volumeDown()));
act->setText(i18n("Volume Down"));
act->setIcon(KIcon( QLatin1String( "audio-volume-low" )));
act->setIcon(QIcon::fromTheme( QLatin1String( "audio-volume-low" )));
act = collection->addAction("playPause", m_player, SLOT(playPause()));
act->setText(i18n("Play / Pause"));
act->setIcon(KIcon( QLatin1String( "media-playback-start" )));
act->setIcon(QIcon::fromTheme( QLatin1String( "media-playback-start" )));
act = collection->addAction("seekForward", m_player, SLOT(seekForward()));
act->setText(i18n("Seek Forward"));
act->setIcon(KIcon( QLatin1String( "media-seek-forward" )));
act->setIcon(QIcon::fromTheme( QLatin1String( "media-seek-forward" )));
act = collection->addAction("seekBack", m_player, SLOT(seekBack()));
act->setText(i18n("Seek Back"));
act->setIcon(KIcon( QLatin1String( "media-seek-backward" )));
act->setIcon(QIcon::fromTheme( QLatin1String( "media-seek-backward" )));
act = collection->addAction("showHide", this, SLOT(slotShowHide()));
act->setText(i18n("Show / Hide"));
......
......@@ -24,7 +24,7 @@
#include <KToggleAction>
#include <KConfigGroup>
#include <KDebug>
#include <KIcon>
#include <QIcon>
#include <kglobal.h>
#include "lyricswidget.h"
......@@ -41,7 +41,7 @@ LyricsWidget::LyricsWidget(QWidget* parent): QTextBrowser(parent),
setWordWrapMode(QTextOption::WordWrap);
setOpenExternalLinks(true);
KToggleAction *show = new KToggleAction(KIcon(QLatin1String("view-media-lyrics")),
KToggleAction *show = new KToggleAction(QIcon::fromTheme(QLatin1String("view-media-lyrics")),
i18n("Show &Lyrics"), this);
ActionCollection::actions()->addAction("showLyrics", show);
connect(show, SIGNAL(toggled(bool)), this, SLOT(setVisible(bool)));
......
......@@ -16,7 +16,7 @@
#include "playlistbox.h"
#include <kicon.h>
#include <QIcon>
#include <kiconloader.h>
#include <kmessagebox.h>
#include <kmenu.h>
......@@ -109,20 +109,20 @@ PlaylistBox::PlaylistBox(PlayerManager *player, QWidget *parent, QStackedWidget
// add the view modes stuff
KSelectAction *viewModeAction =
new KSelectAction( KIcon("view-choose"), i18n("View Modes"), ActionCollection::actions());
new KSelectAction( QIcon::fromTheme(QStringLiteral("view-choose")), i18n("View Modes"), ActionCollection::actions());
ActionCollection::actions()->addAction("viewModeMenu", viewModeAction);
ViewMode* viewmode = new ViewMode(this);
m_viewModes.append(viewmode);
viewModeAction->addAction(KIcon("view-list-details"), viewmode->name());
viewModeAction->addAction(QIcon::fromTheme(QStringLiteral("view-list-details")), viewmode->name());
CompactViewMode* compactviewmode = new CompactViewMode(this);
m_viewModes.append(compactviewmode);
viewModeAction->addAction(KIcon("view-list-text"), compactviewmode->name());
viewModeAction->addAction(QIcon::fromTheme(QStringLiteral("view-list-text")), compactviewmode->name());
TreeViewMode* treeviewmode = new TreeViewMode(this);
m_viewModes.append(treeviewmode);
viewModeAction->addAction(KIcon("view-list-tree"), treeviewmode->name());
viewModeAction->addAction(QIcon::fromTheme(QStringLiteral("view-list-tree")), treeviewmode->name());
CollectionList::initialize(this);
......@@ -160,7 +160,7 @@ PlaylistBox::PlaylistBox(PlayerManager *player, QWidget *parent, QStackedWidget
m_savePlaylistTimer = 0;
KToggleAction *historyAction =
new KToggleAction(KIcon("view-history"), i18n("Show &History"), ActionCollection::actions());
new KToggleAction(QIcon::fromTheme(QStringLiteral("view-history")), i18n("Show &History"), ActionCollection::actions());
ActionCollection::actions()->addAction("showHistory", historyAction);
connect(historyAction, SIGNAL(triggered(bool)),
this, SLOT(slotSetHistoryPlaylistEnabled(bool)));
......
......@@ -18,7 +18,7 @@
#include "playlistcollection.h"
#include <kurl.h>
#include <kicon.h>
#include <QIcon>
#include <kiconloader.h>
#include <kapplication.h>
#include <kinputdialog.h>
......@@ -912,7 +912,7 @@ PlaylistCollection::ActionHandler::ActionHandler(PlaylistCollection *collection)
// "New" menu
menu = new KActionMenu(KIcon("document-new"), i18nc("new playlist", "&New"), actions());
menu = new KActionMenu(QIcon::fromTheme(QStringLiteral("document-new")), i18nc("new playlist", "&New"), actions());
actions()->addAction("file_new", menu);
menu->addAction(createAction(i18n("&Empty Playlist..."), SLOT(slotCreatePlaylist()),
......@@ -974,7 +974,7 @@ PlaylistCollection::ActionHandler::ActionHandler(PlaylistCollection *collection)
SLOT(slotShowCoverManager()), "showCoverManager"));
KToggleAction *upcomingAction =
new KToggleAction(KIcon("go-jump-today"), i18n("Show &Play Queue"), actions());
new KToggleAction(QIcon::fromTheme(QStringLiteral("go-jump-today")), i18n("Show &Play Queue"), actions());
actions()->addAction("showUpcoming", upcomingAction);
connect(upcomingAction, SIGNAL(triggered(bool)),
......@@ -991,7 +991,7 @@ KAction *PlaylistCollection::ActionHandler::createAction(const QString &text,
if(icon.isNull())
action = new KAction(text, actions());
else
action = new KAction(KIcon(icon), text, actions());
action = new KAction(QIcon::fromTheme(icon), text, actions());
actions()->addAction(name, action);
connect( action, SIGNAL(triggered(bool)), slot);
action->setShortcut(shortcut);
......
......@@ -17,7 +17,7 @@
#include "playlistsplitter.h"
#include <kicon.h>
#include <QIcon>
#include <kaction.h>
#include <kglobal.h>
#include <kactioncollection.h>
......@@ -159,10 +159,10 @@ void PlaylistSplitter::setupActions()
{
KActionCollection* coll = ActionCollection::actions();
KToggleAction *showSearch =
new KToggleAction(KIcon("edit-find"), i18n("Show &Search Bar"), this);
new KToggleAction(QIcon::fromTheme(QStringLiteral("edit-find")), i18n("Show &Search Bar"), this);
coll->addAction("showSearch", showSearch);
KAction *act = new KAction(KIcon("edit-clear"), i18n("Edit Track Search"), this);
KAction *act = new KAction(QIcon::fromTheme(QStringLiteral("edit-clear")), i18n("Edit Track Search"), this);
coll->addAction("editTrackSearch", act);
act->setShortcut(Qt::Key_F6);
connect(act, SIGNAL(triggered(bool)), SLOT(setFocus()));
......
......@@ -19,7 +19,7 @@
#include "slider.h"
#include "svghandler.h"
#include <KIcon>
#include <QIcon>
#include <KLocale>
#include <KStandardDirs>
#include <KGlobalSettings>
......
......@@ -34,7 +34,7 @@
#include <klocale.h>
#include <kdebug.h>
#include <kiconloader.h>
#include <kicon.h>
#include <QIcon>
#include <ktoggleaction.h>
#include <kshortcut.h>
#include <kglobal.h>
......@@ -485,12 +485,12 @@ void TagEditor::saveConfig()
void TagEditor::setupActions()
{
KToggleAction *show = new KToggleAction(KIcon(QLatin1String("document-properties")),
KToggleAction *show = new KToggleAction(QIcon::fromTheme(QLatin1String("document-properties")),
i18n("Show &Tag Editor"), this);
ActionCollection::actions()->addAction("showEditor", show);
connect(show, SIGNAL(toggled(bool)), this, SLOT(setVisible(bool)));
KAction *act = new KAction(KIcon(QLatin1String( "document-save")), i18n("&Save"), this);
KAction *act = new KAction(QIcon::fromTheme(QLatin1String( "document-save")), i18n("&Save"), this);
ActionCollection::actions()->addAction("saveItem", act);
act->setShortcut(Qt::CTRL + Qt::Key_T);
connect(act, SIGNAL(triggered(bool)), SLOT(slotSave()));
......
......@@ -17,7 +17,7 @@
#include "tagguesserconfigdlg.h"
#include "tagguesser.h"
#include <kicon.h>
#include <QIcon>
#include <klocale.h>
#include <klineedit.h>
#include <kapplication.h>
......@@ -39,8 +39,8 @@ TagGuesserConfigDlg::TagGuesserConfigDlg(QWidget *parent, const char *name)
m_child = new TagGuesserConfigDlgWidget(this);
setMainWidget(m_child);
m_child->bMoveUp->setIcon(KIcon( QLatin1String( "arrow-up" )));
m_child->bMoveDown->setIcon(KIcon( QLatin1String( "arrow-down" )));
m_child->bMoveUp->setIcon(QIcon::fromTheme( QLatin1String( "arrow-up" )));
m_child->bMoveDown->setIcon(QIcon::fromTheme( QLatin1String( "arrow-down" )));
m_tagSchemeModel = new QStringListModel(m_child->lvSchemes);
m_child->lvSchemes->setModel(m_tagSchemeModel);
......
......@@ -20,7 +20,7 @@
#include <KLocale>
#include <KVBox>
#include <KIcon>
#include <QIcon>
#include <QAction>
#include <QLabel>
......@@ -66,7 +66,7 @@ VolumePopupButton::VolumePopupButton( QWidget * parent )
muteBar->setContentsMargins( 0, 0, 0, 0 );
muteBar->setIconSize( QSize( 16, 16 ) );
m_muteAction = new QAction( KIcon( "audio-volume-muted" ), QString(), muteBar );
m_muteAction = new QAction( QIcon::fromTheme(QStringLiteral("audio-volume-muted")), QString(), muteBar );
m_muteAction->setToolTip( i18n( "Mute/Unmute" ) );
m_muteAction->setCheckable( true );
m_muteAction->setChecked( player->muted() );
......@@ -98,13 +98,13 @@ VolumePopupButton::volumeChanged( float newVolume )
}
if ( newVolume <= 0.0001 )
setIcon( KIcon( "audio-volume-muted" ) );
setIcon( QIcon::fromTheme(QStringLiteral("audio-volume-muted")) );
else if ( newVolume < 0.34 )
setIcon( KIcon( "audio-volume-low" ) );
setIcon( QIcon::fromTheme(QStringLiteral("audio-volume-low")) );
else if ( newVolume < 0.67 )
setIcon( KIcon( "audio-volume-medium" ) );
setIcon( QIcon::fromTheme(QStringLiteral("audio-volume-medium")) );
else
setIcon( KIcon( "audio-volume-high" ) );
setIcon( QIcon::fromTheme(QStringLiteral("audio-volume-high")) );
m_volumeLabel->setText( i18n( "%1%" , int( newVolume * 100 ) ) );
......@@ -125,7 +125,7 @@ VolumePopupButton::muteStateChanged( bool muted )
if ( muted )
{
const float volume = JuK::JuKInstance()->playerManager()->volume();
setIcon( KIcon( "audio-volume-muted" ) );
setIcon( QIcon::fromTheme(QStringLiteral("audio-volume-muted")) );
setToolTip( i18n( "Volume: %1% (muted)", int( 100 * volume ) ) );
}
else
......
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