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
This commit is contained in:
defnax 2012-08-15 13:54:00 +00:00
parent c992cb6aea
commit f90c7742cc
2 changed files with 18 additions and 1 deletions

View File

@ -3,6 +3,7 @@
#include <QTranslator>
#include <QApplication>
#include <QString>
#include <QIcon>
#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();

View File

@ -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 ;