Added stylesheet to plugins.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8563 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2015-06-28 10:11:47 +00:00
parent 686fec496f
commit 3a71b8b662
14 changed files with 101 additions and 33 deletions

View file

@ -56,8 +56,9 @@ FORMS = gui/FeedReaderDialog.ui \
TARGET = FeedReader
RESOURCES = gui/FeedReader_images.qrc \
lang/FeedReader_lang.qrc
lang/FeedReader_lang.qrc \
qss/FeedReader_qss.qrc
TRANSLATIONS += \
lang/FeedReader_ca_ES.ts \
lang/FeedReader_cs.ts \

View file

@ -84,6 +84,9 @@ FeedReaderPlugin::FeedReaderPlugin()
mFeedReader = NULL;
mNotify = NULL;
mFeedNotify = NULL;
Q_INIT_RESOURCE(FeedReader_images);
Q_INIT_RESOURCE(FeedReader_qss);
}
void FeedReaderPlugin::setInterfaces(RsPlugInInterfaces &interfaces)
@ -143,8 +146,6 @@ void FeedReaderPlugin::setPlugInHandler(RsPluginHandler *pgHandler)
QIcon *FeedReaderPlugin::qt_icon() const
{
if (mIcon == NULL) {
Q_INIT_RESOURCE(FeedReader_images);
mIcon = new QIcon(IMAGE_FEEDREADER);
}

View file

@ -42,6 +42,7 @@ public:
virtual MainPage *qt_page() const;
virtual QIcon *qt_icon() const;
virtual std::string qt_stylesheet() { return "FeedReader"; }
virtual QTranslator *qt_translator(QApplication *app, const QString& languageCode, const QString& externalDir) const;
virtual void getPluginVersion(int &major, int &minor, int &build, int &svn_rev) const;

View file

@ -0,0 +1 @@
/* Standard stylesheet for FeedReader */

View file

@ -0,0 +1,2 @@
/* Default stylesheet
This file is used as default for all stylesheets and can be overloaded */

View file

@ -0,0 +1,6 @@
<RCC>
<qresource prefix="/qss/stylesheet/FeedReader">
<file>FeedReader_qss.default</file>
<file>FeedReader_Standard.qss</file>
</qresource>
</RCC>

View file

@ -73,7 +73,7 @@ FORMS = gui/AudioInputConfig.ui \
TARGET = VOIP
RESOURCES = gui/VOIP_images.qrc lang/VOIP_lang.qrc
RESOURCES = gui/VOIP_images.qrc lang/VOIP_lang.qrc qss/VOIP_qss.qrc
TRANSLATIONS += \
lang/VOIP_ca_ES.ts \

View file

@ -95,6 +95,9 @@ VOIPPlugin::VOIPPlugin()
QObject::connect(mVOIPNotify,SIGNAL(voipAcceptReceived(const RsPeerId&)),mVOIPGUIHandler,SLOT(ReceivedVoipAccept(const RsPeerId&)),Qt::QueuedConnection) ;
QObject::connect(mVOIPNotify,SIGNAL(voipHangUpReceived(const RsPeerId&)),mVOIPGUIHandler,SLOT(ReceivedVoipHangUp(const RsPeerId&)),Qt::QueuedConnection) ;
QObject::connect(mVOIPNotify,SIGNAL(voipBandwidthInfoReceived(const RsPeerId&,int)),mVOIPGUIHandler,SLOT(ReceivedVoipBandwidthInfo(const RsPeerId&,int)),Qt::QueuedConnection) ;
Q_INIT_RESOURCE(VOIP_images);
Q_INIT_RESOURCE(VOIP_qss);
}
void VOIPPlugin::setInterfaces(RsPlugInInterfaces &interfaces)
@ -164,8 +167,6 @@ void VOIPPlugin::setPlugInHandler(RsPluginHandler *pgHandler)
QIcon *VOIPPlugin::qt_icon() const
{
if (mIcon == NULL) {
Q_INIT_RESOURCE(VOIP_images);
mIcon = new QIcon(IMAGE_VOIP);
}

View file

@ -43,6 +43,7 @@ class VOIPPlugin: public RsPlugin
virtual ChatWidgetHolder *qt_get_chat_widget_holder(ChatWidget *chatWidget) const ;
virtual QIcon *qt_icon() const;
virtual std::string qt_stylesheet() { return "VOIP"; }
virtual QTranslator *qt_translator(QApplication *app, const QString& languageCode, const QString& externalDir) const;
virtual void qt_sound_events(SoundEvents &events) const;

View file

@ -0,0 +1 @@
/* Standard stylesheet for FeedReader */

View file

@ -0,0 +1,2 @@
/* Default stylesheet
This file is used as default for all stylesheets and can be overloaded */

View file

@ -0,0 +1,6 @@
<RCC>
<qresource prefix="/qss/stylesheet/VOIP">
<file>VOIP_qss.default</file>
<file>VOIP_Standard.qss</file>
</qresource>
</RCC>