Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit f508c52e authored by Luigi Toscano's avatar Luigi Toscano

Port KIcon to QIcon

parent 748e52bc
......@@ -24,6 +24,7 @@
#include <algorithm>
#include <QCheckBox>
#include <QIcon>
#include <QPushButton>
#include <QLabel>
#include <QScrollArea>
......@@ -31,7 +32,6 @@
#include <QGridLayout>
#include <kdialog.h>
#include <kicon.h>
#include <KIconLoader>
#include <klocale.h>
#include <kvbox.h>
......@@ -279,14 +279,14 @@ void DialogViewConfiguration::createPage()
this , SLOT(slotDropped(DialogViewConfigurationWidget*,int,DialogViewConfigurationItem*,bool)));
addSpacer(1,1);
const KIcon& icon = KIcon( QLatin1String( "arrow-left" ));
const QIcon& icon = QIcon::fromTheme( QLatin1String( "arrow-left" ));
moveLeftButton = new QPushButton(icon, "");
moveLeftButton->setEnabled(false);
_glayout->addWidget(moveLeftButton,1,2);
connect(moveLeftButton, SIGNAL(clicked(bool)), SLOT(moveSelectionToActiveList()));
addSpacer(1,3);
const KIcon& icon2 = KIcon( QLatin1String( "arrow-right" ));
const QIcon& icon2 = QIcon::fromTheme( QLatin1String( "arrow-right" ));
moveRightButton = new QPushButton(icon2, "");
moveRightButton->setEnabled(false);
_glayout->addWidget(moveRightButton,1,4);
......
......@@ -21,6 +21,7 @@
#include "gui/kmixerwidget.h"
// Qt
#include <QIcon>
#include <QLabel>
#include <qpixmap.h>
#include <QString>
......@@ -32,7 +33,6 @@
#include <kconfig.h>
#include <kconfiggroup.h>
#include <kglobal.h>
#include <kicon.h>
#include <klocale.h>
#include <ktabwidget.h>
......
......@@ -22,13 +22,11 @@
#include "mdwmoveaction.h"
// KDE
#include <kicon.h>
//KMix
#include "core/mixdevice.h"
// Qt
#include <QIcon>
#include <QString>
MDWMoveAction::MDWMoveAction(shared_ptr<MixDevice> md, QObject *parent)
......@@ -37,7 +35,7 @@ MDWMoveAction::MDWMoveAction(shared_ptr<MixDevice> md, QObject *parent)
Q_ASSERT(md);
setText(m_mixDevice->readableName());
setIcon(KIcon(m_mixDevice->iconName()));
setIcon(QIcon::fromTheme(m_mixDevice->iconName()));
connect(this, SIGNAL(triggered(bool)), SLOT(triggered(bool)));
}
......
......@@ -30,7 +30,7 @@
#include <kactioncollection.h>
#include <ktoggleaction.h>
#include <qicon.h>
#include <QIcon>
#include <qtoolbutton.h>
#include <QObject>
#include <qcursor.h>
......
......@@ -22,13 +22,13 @@
#include "gui/osdwidget.h"
// Qt
#include <QIcon>
#include <QGraphicsLinearLayout>
#include <QPainter>
#include <QTimer>
#include <QLabel>
// KDE
#include <KIcon>
#include <KDialog>
#include <KWindowSystem>
#include <Plasma/Svg>
......@@ -161,10 +161,10 @@ void OSDWidget::themeUpdated()
m_volumeMutedPixmap = svgIcon.pixmap("audio-volume-muted");
} else {
iconSize = QSize(IconSize(KIconLoader::Toolbar), IconSize(KIconLoader::Toolbar));
m_volumeHighPixmap = KIcon( QLatin1String( "audio-volume-high" )).pixmap(iconSize);
m_volumeMediumPixmap = KIcon( QLatin1String( "audio-volume-medium" )).pixmap(iconSize);
m_volumeLowPixmap = KIcon( QLatin1String( "audio-volume-low" )).pixmap(iconSize);
m_volumeMutedPixmap = KIcon( QLatin1String( "audio-volume-muted" )).pixmap(iconSize);
m_volumeHighPixmap = QIcon::fromTheme( QLatin1String( "audio-volume-high" )).pixmap(iconSize);
m_volumeMediumPixmap = QIcon::fromTheme( QLatin1String( "audio-volume-medium" )).pixmap(iconSize);
m_volumeLowPixmap = QIcon::fromTheme( QLatin1String( "audio-volume-low" )).pixmap(iconSize);
m_volumeMutedPixmap = QIcon::fromTheme( QLatin1String( "audio-volume-muted" )).pixmap(iconSize);
}
m_iconLabel->nativeWidget()->setPixmap(m_volumeHighPixmap);
......
......@@ -27,7 +27,6 @@
// KDE
#include <kaction.h>
#include <kicon.h>
#include <kmenu.h>
#include <klocale.h>
#include <kiconloader.h>
......@@ -58,7 +57,7 @@ ViewBase::ViewBase(QWidget* parent, QString id, Qt::WFlags f, ViewBase::ViewFlag
setObjectName(id);
// When loding the View from the XML profile, guiLevel can get overridden
m_viewId = id;
configureIcon = new KIcon( QLatin1String( "configure" ));
configureIcon = QIcon::fromTheme( QLatin1String( "configure" ));
if ( _actions == 0 ) {
......@@ -82,7 +81,6 @@ ViewBase::ViewBase(QWidget* parent, QString id, Qt::WFlags f, ViewBase::ViewFlag
ViewBase::~ViewBase()
{
delete configureIcon;
// Hint: The GUI profile will not be removed, as it is pooled and might be applied to a new View.
}
......@@ -99,7 +97,7 @@ void ViewBase::addMixer(Mixer *mixer)
QPushButton* ViewBase::createConfigureViewButton()
{
QPushButton* configureViewButton = new QPushButton(*configureIcon, "", this);
QPushButton* configureViewButton = new QPushButton(configureIcon, "", this);
configureViewButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
configureViewButton->setToolTip(i18n( "Configure Channels" ));
connect(configureViewButton, SIGNAL(clicked(bool)), SLOT(configureView()));
......@@ -215,7 +213,7 @@ void ViewBase::popupReset()
delete _popMenu;
_popMenu = new KMenu( this );
_popMenu->addTitle( KIcon( QLatin1String( "kmix" ) ), i18n("Device Settings" ));
_popMenu->addTitle( QIcon::fromTheme( QLatin1String( "kmix" ) ), i18n("Device Settings" ));
act = _localActionColletion->action( "toggle_channels" );
if ( act ) _popMenu->addAction(act);
......
......@@ -23,12 +23,12 @@
// QT
#include <QWidget>
#include <QIcon>
#include <QList>
#include <QPushButton>
// KDE
#include <KActionCollection>
class KIcon;
class KMenu;
class Mixer;
......@@ -136,7 +136,7 @@ protected:
const QString _guiProfileId;
KActionCollection *_localActionColletion;
KIcon* configureIcon;
QIcon configureIcon;
virtual void _setMixSet() = 0;
void resetMdws();
......
......@@ -25,6 +25,7 @@
#include <qevent.h>
#include <qframe.h>
#include <QGridLayout>
#include <QIcon>
#include <QLayoutItem>
#include <QPushButton>
#include <QSizePolicy>
......@@ -33,7 +34,6 @@
#include <kaction.h>
#include <kapplication.h>
#include <kdialog.h>
#include <kicon.h>
#include <klocale.h>
#include <kwindowsystem.h>
......@@ -87,7 +87,7 @@ ViewDockAreaPopup::ViewDockAreaPopup(QWidget* parent, QString id, ViewBase::View
// The list will be redone in _setMixSet() with the actual Mixer instances to use
}
restoreVolumeIcon = new KIcon(QLatin1String("quickopen-file"));
restoreVolumeIcon = QIcon::fromTheme(QLatin1String("quickopen-file"));
createDeviceWidgets();
// Register listeners for all mixers
......@@ -102,7 +102,6 @@ ViewDockAreaPopup::~ViewDockAreaPopup()
{
ControlManager::instance().removeListener(this);
delete _layoutMDW;
delete restoreVolumeIcon;
// Hint: optionsLayout and "everything else" is deleted when "delete _layoutMDW" cascades down
}
......@@ -403,7 +402,7 @@ void ViewDockAreaPopup::constructionFinished()
QPushButton* ViewDockAreaPopup::createRestoreVolumeButton ( int storageSlot )
{
QString buttonText = QString("%1").arg(storageSlot);
QPushButton* profileButton = new QPushButton(*restoreVolumeIcon, buttonText, this);
QPushButton* profileButton = new QPushButton(restoreVolumeIcon, buttonText, this);
profileButton->setToolTip(i18n("Load volume profile %1").arg(storageSlot));
profileButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
return profileButton;
......
......@@ -26,11 +26,10 @@
class QBoxLayout;
class QFrame;
class QGridLayout;
#include <QIcon>;
#include <QPushButton>
class QWidget;
class KIcon;
class Mixer;
class MixDevice;
class KMixWindow;
......@@ -68,7 +67,7 @@ private:
QPushButton *restoreVolumeButton2;
QPushButton *restoreVolumeButton3;
QPushButton *restoreVolumeButton4;
KIcon* restoreVolumeIcon;
QIcon restoreVolumeIcon;
static ProfControl* MatchAllForSoundMenu;
static QString InternedString_Star;
......
......@@ -46,10 +46,10 @@
// KDE
#include <KIcon>
#include <KLocale>
// Qt
#include <QIcon>
#include <QPushButton>
#include <QLabel>
#include <QLayoutItem>
......
......@@ -23,8 +23,9 @@
#include "mixer_interface.h"
#include "control_interface.h"
#include "mixerservice.h"
#include <QTimer>
#include <QIcon>
#include <QTimer>
const QString MixerEngine::KMIX_DBUS_SERVICE = "org.kde.kmix";
......
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