From f90c7742cc3002bbbf365e6b02b7613aeacb2a59 Mon Sep 17 00:00:00 2001 From: defnax Date: Wed, 15 Aug 2012 13:54:00 +0000 Subject: [PATCH] Enabled the Icon for the Voip Plugin git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5425 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- plugins/VOIP/VOIPPlugin.cpp | 15 +++++++++++++++ plugins/VOIP/VOIPPlugin.h | 4 +++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/plugins/VOIP/VOIPPlugin.cpp b/plugins/VOIP/VOIPPlugin.cpp index 8ffd9394f..eddea67fa 100644 --- a/plugins/VOIP/VOIPPlugin.cpp +++ b/plugins/VOIP/VOIPPlugin.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include "VOIPPlugin.h" #include "interface/rsvoip.h" @@ -13,6 +14,8 @@ #include "gui/PluginGUIHandler.h" #include "gui/PluginNotifier.h" +#define IMAGE_VOIP ":/images/talking_on.svg" + static void *inited = new VOIPPlugin() ; extern "C" { @@ -43,6 +46,7 @@ VOIPPlugin::VOIPPlugin() mPlugInHandler = NULL; mPeers = NULL; config_page = NULL ; + mIcon = NULL ; mPluginGUIHandler = new PluginGUIHandler ; mPluginNotifier = new PluginNotifier ; @@ -95,6 +99,17 @@ void VOIPPlugin::setPlugInHandler(RsPluginHandler *pgHandler) mPlugInHandler = pgHandler; } +QIcon *VOIPPlugin::qt_icon() const +{ + if (mIcon == NULL) { + Q_INIT_RESOURCE(VOIP_images); + + mIcon = new QIcon(IMAGE_VOIP); + } + + return mIcon; +} + std::string VOIPPlugin::getShortPluginDescription() const { return QApplication::translate("VOIP", "This plugin provides voice communication between friends in RetroShare.").toUtf8().constData(); diff --git a/plugins/VOIP/VOIPPlugin.h b/plugins/VOIP/VOIPPlugin.h index 4a448ca3d..4fbdf625f 100644 --- a/plugins/VOIP/VOIPPlugin.h +++ b/plugins/VOIP/VOIPPlugin.h @@ -18,7 +18,8 @@ class VOIPPlugin: public RsPlugin virtual RsAutoUpdatePage *qt_transfers_tab() const ; virtual std::string qt_transfers_tab_name() const ; virtual PopupChatDialog *qt_allocate_new_popup_chat_dialog() const ; - + + virtual QIcon *qt_icon() const; virtual QTranslator *qt_translator(QApplication *app, const QString& languageCode) const; virtual void getPluginVersion(int& major,int& minor,int& svn_rev) const ; @@ -35,6 +36,7 @@ class VOIPPlugin: public RsPlugin mutable RsPluginHandler *mPlugInHandler; mutable RsPeers* mPeers; mutable ConfigPage *config_page ; + mutable QIcon *mIcon; PluginNotifier *mPluginNotifier ; PluginGUIHandler *mPluginGUIHandler ;