Commit 41af8033 authored by Laurent Montel's avatar Laurent Montel 😁 Committed by Pali Rohár

Port to QIcon

parent c27477bc
......@@ -22,13 +22,13 @@ IdPushButton::IdPushButton(unsigned int id, QWidget *parent) : KPushButton(paren
connect(this, SIGNAL(pressed()), this, SLOT(emitPressed()));
}
IdPushButton::IdPushButton(unsigned int id, const QString text, QWidget *parent) : KPushButton(text, parent)
IdPushButton::IdPushButton(unsigned int id, const QString &text, QWidget *parent) : KPushButton(text, parent)
{
_id = id;
connect(this, SIGNAL(pressed()), this, SLOT(emitPressed()));
}
IdPushButton::IdPushButton(unsigned int id, const KIcon icon, const QString text, QWidget *parent) : KPushButton(icon, text, parent)
IdPushButton::IdPushButton(unsigned int id, const KIcon &icon, const QString &text, QWidget *parent) : KPushButton(icon, text, parent)
{
_id = id;
connect(this, SIGNAL(pressed()), this, SLOT(emitPressed()));
......
......@@ -29,8 +29,8 @@ class IdPushButton : public KPushButton
Q_OBJECT
public:
IdPushButton(unsigned int id, QWidget *parent = nullptr);
IdPushButton(unsigned int id, const QString text, QWidget *parent = nullptr);
IdPushButton(unsigned int id, const KIcon icon, const QString text, QWidget *parent = nullptr);
IdPushButton(unsigned int id, const QString &text, QWidget *parent = nullptr);
IdPushButton(unsigned int id, const KIcon &icon, const QString &text, QWidget *parent = nullptr);
IdPushButton(unsigned int id, KGuiItem item, QWidget *parent = nullptr);
private:
unsigned int _id;
......
......@@ -20,7 +20,7 @@
#include <QAction>
#include <kdebug.h>
#include <kgenericfactory.h>
#include <kicon.h>
#include <qicon.h>
#include "kopetemetacontact.h"
#include "kopetecontactlist.h"
......@@ -41,7 +41,7 @@ ContactNotesPlugin::ContactNotesPlugin(QObject *parent, const QVariantList & /*
pluginStatic_ = this;
}
QAction *m_actionEdit = new QAction(KIcon(QStringLiteral("user-identity")), i18n("&Notes"), this);
QAction *m_actionEdit = new QAction(QIcon::fromTheme(QStringLiteral("user-identity")), i18n("&Notes"), this);
actionCollection()->addAction(QStringLiteral("editContactNotes"), m_actionEdit);
connect(m_actionEdit, SIGNAL(triggered(bool)), this, SLOT(slotEditInfo()));
......
......@@ -23,7 +23,7 @@
#include <KLocalizedString>
#include <QKeySequence>
#include <kmessagebox.h>
#include <kicon.h>
#include <qicon.h>
#include <qimage.h>
#include <qregexp.h>
......@@ -43,7 +43,7 @@ LatexGUIClient::LatexGUIClient(Kopete::ChatSession *parent)
m_manager = parent;
QAction *previewAction = new QAction(KIcon(QStringLiteral("latex")), i18n("Preview Latex Images"), this);
QAction *previewAction = new QAction(QIcon::fromTheme(QStringLiteral("latex")), i18n("Preview Latex Images"), this);
actionCollection()->addAction(QStringLiteral("latexPreview"), previewAction);
previewAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_L));
connect(previewAction, SIGNAL(triggered(bool)), this, SLOT(slotPreview()));
......
......@@ -31,7 +31,7 @@
#include <kdebug.h>
#include <kstandarddirs.h>
#include <kmessagebox.h>
#include <kicon.h>
#include <qicon.h>
#include <kactioncollection.h>
/**
......@@ -58,19 +58,19 @@ OtrGUIClient::OtrGUIClient(Kopete::ChatSession *parent)
m_manager = parent;
otrActionMenu = new KActionMenu(KIcon(QStringLiteral("document-decrypt")), i18n("OTR Encryption"), actionCollection());
otrActionMenu = new KActionMenu(QIcon::fromTheme(QStringLiteral("document-decrypt")), i18n("OTR Encryption"), actionCollection());
otrActionMenu->setDelayed(false);
actionCollection()->addAction(QStringLiteral("otr_settings"), otrActionMenu);
actionEnableOtr = new KAction(KIcon(QStringLiteral("object-locked")), i18n("Start OTR Session"), this);
actionEnableOtr = new KAction(QIcon::fromTheme(QStringLiteral("object-locked")), i18n("Start OTR Session"), this);
actionCollection()->addAction(QStringLiteral("enableOtr"), actionEnableOtr);
connect(actionEnableOtr, SIGNAL(triggered(bool)), this, SLOT(slotEnableOtr()));
actionDisableOtr = new KAction(KIcon(QStringLiteral("object-unlocked")), i18n("End OTR Session"), this);
actionDisableOtr = new KAction(QIcon::fromTheme(QStringLiteral("object-unlocked")), i18n("End OTR Session"), this);
actionCollection()->addAction(QStringLiteral("disableOtr"), actionDisableOtr);
connect(actionDisableOtr, SIGNAL(triggered(bool)), this, SLOT(slotDisableOtr()));
actionVerifyFingerprint = new KAction(KIcon(QStringLiteral("application-pgp-signature")), i18n("Authenticate Contact"), this);
actionVerifyFingerprint = new KAction(QIcon::fromTheme(QStringLiteral("application-pgp-signature")), i18n("Authenticate Contact"), this);
actionCollection()->addAction(QStringLiteral("verifyFingerprint"), actionVerifyFingerprint);
connect(actionVerifyFingerprint, SIGNAL(triggered(bool)), this, SLOT(slotVerifyFingerprint()));
......@@ -112,25 +112,25 @@ void OtrGUIClient::encryptionEnabled(Kopete::ChatSession *session, int state)
if (session == m_manager) {
switch (state) {
case 0:
otrActionMenu->setIcon(KIcon(QStringLiteral("object-unlocked")));
otrActionMenu->setIcon(QIcon::fromTheme(QStringLiteral("object-unlocked")));
actionEnableOtr->setText(i18n("Start OTR Session"));
actionDisableOtr->setEnabled(false);
actionVerifyFingerprint->setEnabled(false);
break;
case 1:
otrActionMenu->setIcon(KIcon(QStringLiteral("object-locked-unverified")));
otrActionMenu->setIcon(QIcon::fromTheme(QStringLiteral("object-locked-unverified")));
actionEnableOtr->setText(i18n("Refresh OTR Session"));
actionDisableOtr->setEnabled(true);
actionVerifyFingerprint->setEnabled(true);
break;
case 2:
otrActionMenu->setIcon(KIcon(QStringLiteral("object-locked-verified")));
otrActionMenu->setIcon(QIcon::fromTheme(QStringLiteral("object-locked-verified")));
actionEnableOtr->setText(i18n("Refresh OTR Session"));
actionDisableOtr->setEnabled(true);
actionVerifyFingerprint->setEnabled(true);
break;
case 3:
otrActionMenu->setIcon(KIcon(QStringLiteral("object-locked-finished")));
otrActionMenu->setIcon(QIcon::fromTheme(QStringLiteral("object-locked-finished")));
actionEnableOtr->setText(i18n("Start OTR Session"));
actionDisableOtr->setEnabled(true);
actionVerifyFingerprint->setEnabled(false);
......
......@@ -24,7 +24,7 @@
#include <kstandardaction.h>
#include <KLocalizedString>
#include <kgenericfactory.h>
#include <kicon.h>
#include <qicon.h>
#include <QList>
#include <kactioncollection.h>
......@@ -46,10 +46,10 @@ PrivacyGUIClient::PrivacyGUIClient(Kopete::ChatSession *parent)
QList<Kopete::Contact *> mb = m_manager->members();
actionAddToWhiteList = new QAction(KIcon(QStringLiteral("privacy_whitelist")), i18n("Add to WhiteList"), this);
actionAddToWhiteList = new QAction(QIcon::fromTheme(QStringLiteral("privacy_whitelist")), i18n("Add to WhiteList"), this);
actionCollection()->addAction(QStringLiteral("addToWhiteList"), actionAddToWhiteList);
connect(actionAddToWhiteList, SIGNAL(triggered(bool)), this, SLOT(slotAddToWhiteList()));
actionAddToBlackList = new QAction(KIcon(QStringLiteral("privacy_blacklist")), i18n("Add to BlackList"), this);
actionAddToBlackList = new QAction(QIcon::fromTheme(QStringLiteral("privacy_blacklist")), i18n("Add to BlackList"), this);
actionCollection()->addAction(QStringLiteral("addToBlackList"), actionAddToBlackList);
connect(actionAddToBlackList, SIGNAL(triggered(bool)), this, SLOT(slotAddToBlackList()));
actionAddToWhiteList->setEnabled(true);
......
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