mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
fd98b94dbd
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4364 b45a01b8-16f6-495d-af2f-9b41ad6348cc
59 lines
1016 B
C++
59 lines
1016 B
C++
#include <retroshare/rsplugin.h>
|
|
|
|
#include "LinksCloudPlugin.h"
|
|
#include "LinksDialog.h"
|
|
|
|
static void *inited = new LinksCloudPlugin() ;
|
|
|
|
extern "C" {
|
|
void *RETROSHARE_PLUGIN_provide()
|
|
{
|
|
static LinksCloudPlugin *p = new LinksCloudPlugin() ;
|
|
|
|
return (void*)p ;
|
|
}
|
|
}
|
|
|
|
#define IMAGE_LINKS ":/images/irkick.png"
|
|
|
|
LinksCloudPlugin::LinksCloudPlugin()
|
|
{
|
|
mRanking = NULL ;
|
|
mainpage = NULL ;
|
|
mIcon = NULL ;
|
|
}
|
|
|
|
MainPage *LinksCloudPlugin::qt_page() const
|
|
{
|
|
if(mainpage == NULL)
|
|
mainpage = new LinksDialog ;
|
|
|
|
return mainpage ;
|
|
}
|
|
|
|
RsCacheService *LinksCloudPlugin::rs_cache_service() const
|
|
{
|
|
if(mRanking == NULL)
|
|
{
|
|
mRanking = new p3Ranking ; // , 3600 * 24 * 30 * 6); // 6 Months
|
|
rsRanks = mRanking ;
|
|
}
|
|
|
|
return mRanking ;
|
|
}
|
|
|
|
QIcon *LinksCloudPlugin::qt_icon() const
|
|
{
|
|
if(mIcon == NULL)
|
|
mIcon = new QIcon(IMAGE_LINKS) ;
|
|
|
|
return mIcon ;
|
|
}
|
|
|
|
std::string LinksCloudPlugin::getShortPluginDescription() const
|
|
{
|
|
return "This plugin provides a set of cached links, and a voting system to promote them." ;
|
|
}
|
|
|
|
|