mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
added to display on New Channel Feed Item Channel logo when available
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2959 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
ee1477df10
commit
5df17295b8
@ -25,6 +25,8 @@
|
|||||||
|
|
||||||
#include "rsiface/rschannels.h"
|
#include "rsiface/rschannels.h"
|
||||||
|
|
||||||
|
#define CHAN_DEFAULT_IMAGE ":/images/channels.png"
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
/****
|
/****
|
||||||
@ -73,6 +75,16 @@ void ChanNewItem::updateItemStatic()
|
|||||||
nameLabel->setText(QString::fromStdWString(ci.channelName));
|
nameLabel->setText(QString::fromStdWString(ci.channelName));
|
||||||
|
|
||||||
descLabel->setText(QString::fromStdWString(ci.channelDesc));
|
descLabel->setText(QString::fromStdWString(ci.channelDesc));
|
||||||
|
|
||||||
|
if(ci.pngImageLen != 0){
|
||||||
|
|
||||||
|
QPixmap chanImage;
|
||||||
|
chanImage.loadFromData(ci.pngChanImage, ci.pngImageLen, "PNG");
|
||||||
|
logo_label->setPixmap(QPixmap(chanImage));
|
||||||
|
}else{
|
||||||
|
QPixmap defaulImage(CHAN_DEFAULT_IMAGE);
|
||||||
|
logo_label->setPixmap(QPixmap(defaulImage));
|
||||||
|
}
|
||||||
|
|
||||||
if (ci.channelFlags & RS_DISTRIB_SUBSCRIBED)
|
if (ci.channelFlags & RS_DISTRIB_SUBSCRIBED)
|
||||||
{
|
{
|
||||||
|
@ -82,7 +82,7 @@ border-radius: 10px;}</string>
|
|||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Connected</string>
|
<string>New Channel</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -102,6 +102,22 @@ border-radius: 10px;}</string>
|
|||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="logo_label">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>32</width>
|
||||||
|
<height>32</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Logo</string>
|
||||||
|
</property>
|
||||||
|
<property name="scaledContents">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="nameLabel">
|
<widget class="QLabel" name="nameLabel">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -199,7 +215,7 @@ border-radius: 10px;}</string>
|
|||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="">
|
<widget class="QGroupBox" name="groupBox">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Channel Decscription</string>
|
<string>Channel Decscription</string>
|
||||||
</property>
|
</property>
|
||||||
@ -224,7 +240,7 @@ border-radius: 10px;}</string>
|
|||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Description
|
<string>Description
|
||||||
of Forum</string>
|
of Channel</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -266,6 +282,7 @@ border-radius: 10px;}</string>
|
|||||||
<include location="../images.qrc"/>
|
<include location="../images.qrc"/>
|
||||||
<include location="../images.qrc"/>
|
<include location="../images.qrc"/>
|
||||||
<include location="../images.qrc"/>
|
<include location="../images.qrc"/>
|
||||||
|
<include location="../images.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
Loading…
Reference in New Issue
Block a user