mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-29 01:16:20 -05:00
Merge pull request #1502 from defnax/added-group-icons-for-posted-links
Added group icons for posted links
This commit is contained in:
commit
bc8adb74c4
@ -44,6 +44,7 @@ class RsPostedGroup
|
|||||||
|
|
||||||
RsGroupMetaData mMeta;
|
RsGroupMetaData mMeta;
|
||||||
std::string mDescription;
|
std::string mDescription;
|
||||||
|
RsGxsImage mGroupImage;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -44,7 +44,15 @@ void RsGxsPostedPostItem::serial_process(RsGenericSerializer::SerializeJob j,RsG
|
|||||||
|
|
||||||
void RsGxsPostedGroupItem::serial_process(RsGenericSerializer::SerializeJob j,RsGenericSerializer::SerializeContext& ctx)
|
void RsGxsPostedGroupItem::serial_process(RsGenericSerializer::SerializeJob j,RsGenericSerializer::SerializeContext& ctx)
|
||||||
{
|
{
|
||||||
RsTypeSerializer::serial_process(j,ctx,TLV_TYPE_STR_DESCR ,mGroup.mDescription,"mGroup.mDescription") ;
|
RsTypeSerializer::serial_process(j,ctx,TLV_TYPE_STR_DESCR ,mDescription,"mDescription") ;
|
||||||
|
|
||||||
|
if(j == RsGenericSerializer::DESERIALIZE && ctx.mOffset == ctx.mSize)
|
||||||
|
return ;
|
||||||
|
|
||||||
|
if((j == RsGenericSerializer::SIZE_ESTIMATE || j == RsGenericSerializer::SERIALIZE) && mGroupImage.empty())
|
||||||
|
return ;
|
||||||
|
|
||||||
|
RsTypeSerializer::serial_process<RsTlvItem>(j,ctx,mGroupImage,"mGroupImage") ;
|
||||||
}
|
}
|
||||||
|
|
||||||
RsItem *RsGxsPostedSerialiser::create_item(uint16_t service_id,uint8_t item_subtype) const
|
RsItem *RsGxsPostedSerialiser::create_item(uint16_t service_id,uint8_t item_subtype) const
|
||||||
@ -109,6 +117,42 @@ void RsGxsPostedPostItem::clear()
|
|||||||
}
|
}
|
||||||
void RsGxsPostedGroupItem::clear()
|
void RsGxsPostedGroupItem::clear()
|
||||||
{
|
{
|
||||||
mGroup.mDescription.clear();
|
mDescription.clear();
|
||||||
|
mGroupImage.TlvClear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool RsGxsPostedGroupItem::fromPostedGroup(RsPostedGroup &group, bool moveImage)
|
||||||
|
{
|
||||||
|
clear();
|
||||||
|
meta = group.mMeta;
|
||||||
|
mDescription = group.mDescription;
|
||||||
|
|
||||||
|
if (moveImage)
|
||||||
|
{
|
||||||
|
mGroupImage.binData.bin_data = group.mGroupImage.mData;
|
||||||
|
mGroupImage.binData.bin_len = group.mGroupImage.mSize;
|
||||||
|
group.mGroupImage.shallowClear();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mGroupImage.binData.setBinData(group.mGroupImage.mData, group.mGroupImage.mSize);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool RsGxsPostedGroupItem::toPostedGroup(RsPostedGroup &group, bool moveImage)
|
||||||
|
{
|
||||||
|
group.mMeta = meta;
|
||||||
|
group.mDescription = mDescription;
|
||||||
|
if (moveImage)
|
||||||
|
{
|
||||||
|
group.mGroupImage.take((uint8_t *) mGroupImage.binData.bin_data, mGroupImage.binData.bin_len);
|
||||||
|
// mGroupImage doesn't have a ShallowClear at the moment!
|
||||||
|
mGroupImage.binData.TlvShallowClear();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
group.mGroupImage.copy((uint8_t *) mGroupImage.binData.bin_data, mGroupImage.binData.bin_len);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
@ -42,8 +42,12 @@ public:
|
|||||||
|
|
||||||
virtual void serial_process(RsGenericSerializer::SerializeJob j,RsGenericSerializer::SerializeContext& ctx);
|
virtual void serial_process(RsGenericSerializer::SerializeJob j,RsGenericSerializer::SerializeContext& ctx);
|
||||||
|
|
||||||
RsPostedGroup mGroup;
|
// use conversion functions to transform:
|
||||||
|
bool fromPostedGroup(RsPostedGroup &group, bool moveImage);
|
||||||
|
bool toPostedGroup(RsPostedGroup &group, bool moveImage);
|
||||||
|
|
||||||
|
std::string mDescription;
|
||||||
|
RsTlvImage mGroupImage;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -79,9 +79,8 @@ bool p3Posted::getGroupData(const uint32_t &token, std::vector<RsPostedGroup> &g
|
|||||||
RsGxsPostedGroupItem* item = dynamic_cast<RsGxsPostedGroupItem*>(*vit);
|
RsGxsPostedGroupItem* item = dynamic_cast<RsGxsPostedGroupItem*>(*vit);
|
||||||
if (item)
|
if (item)
|
||||||
{
|
{
|
||||||
RsPostedGroup grp = item->mGroup;
|
RsPostedGroup grp;
|
||||||
item->mGroup.mMeta = item->meta;
|
item->toPostedGroup(grp, true);
|
||||||
grp.mMeta = item->mGroup.mMeta;
|
|
||||||
delete item;
|
delete item;
|
||||||
groups.push_back(grp);
|
groups.push_back(grp);
|
||||||
}
|
}
|
||||||
@ -265,8 +264,8 @@ bool p3Posted::createGroup(uint32_t &token, RsPostedGroup &group)
|
|||||||
std::cerr << "p3Posted::createGroup()" << std::endl;
|
std::cerr << "p3Posted::createGroup()" << std::endl;
|
||||||
|
|
||||||
RsGxsPostedGroupItem* grpItem = new RsGxsPostedGroupItem();
|
RsGxsPostedGroupItem* grpItem = new RsGxsPostedGroupItem();
|
||||||
grpItem->mGroup = group;
|
grpItem->fromPostedGroup(group, true);
|
||||||
grpItem->meta = group.mMeta;
|
|
||||||
|
|
||||||
RsGenExchange::publishGroup(token, grpItem);
|
RsGenExchange::publishGroup(token, grpItem);
|
||||||
return true;
|
return true;
|
||||||
@ -278,8 +277,8 @@ bool p3Posted::updateGroup(uint32_t &token, RsPostedGroup &group)
|
|||||||
std::cerr << "p3Posted::updateGroup()" << std::endl;
|
std::cerr << "p3Posted::updateGroup()" << std::endl;
|
||||||
|
|
||||||
RsGxsPostedGroupItem* grpItem = new RsGxsPostedGroupItem();
|
RsGxsPostedGroupItem* grpItem = new RsGxsPostedGroupItem();
|
||||||
grpItem->mGroup = group;
|
grpItem->fromPostedGroup(group, true);
|
||||||
grpItem->meta = group.mMeta;
|
|
||||||
|
|
||||||
RsGenExchange::updateGroup(token, grpItem);
|
RsGenExchange::updateGroup(token, grpItem);
|
||||||
return true;
|
return true;
|
||||||
|
@ -35,6 +35,7 @@ public:
|
|||||||
PostedGroupInfoData() : RsUserdata() {}
|
PostedGroupInfoData() : RsUserdata() {}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
QMap<RsGxsGroupId, QIcon> mIcon;
|
||||||
QMap<RsGxsGroupId, QString> mDescription;
|
QMap<RsGxsGroupId, QString> mDescription;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -102,15 +103,15 @@ QString PostedDialog::icon(IconType type)
|
|||||||
case ICON_NEW:
|
case ICON_NEW:
|
||||||
return ":/icons/png/add.png";
|
return ":/icons/png/add.png";
|
||||||
case ICON_YOUR_GROUP:
|
case ICON_YOUR_GROUP:
|
||||||
return ":/icons/png/feedreader.png";
|
|
||||||
case ICON_SUBSCRIBED_GROUP:
|
|
||||||
return ":/icons/png/feed-subscribed.png";
|
|
||||||
case ICON_POPULAR_GROUP:
|
|
||||||
return ":/icons/png/feed-popular.png";
|
|
||||||
case ICON_OTHER_GROUP:
|
|
||||||
return ":/icons/png/feed-other.png";
|
|
||||||
case ICON_DEFAULT:
|
|
||||||
return "";
|
return "";
|
||||||
|
case ICON_SUBSCRIBED_GROUP:
|
||||||
|
return "";
|
||||||
|
case ICON_POPULAR_GROUP:
|
||||||
|
return "";
|
||||||
|
case ICON_OTHER_GROUP:
|
||||||
|
return "";
|
||||||
|
case ICON_DEFAULT:
|
||||||
|
return ":/icons/png/posted.png";
|
||||||
}
|
}
|
||||||
|
|
||||||
return "";
|
return "";
|
||||||
@ -160,6 +161,12 @@ void PostedDialog::loadGroupSummaryToken(const uint32_t &token, std::list<RsGrou
|
|||||||
RsPostedGroup &group = *groupIt;
|
RsPostedGroup &group = *groupIt;
|
||||||
groupInfo.push_back(group.mMeta);
|
groupInfo.push_back(group.mMeta);
|
||||||
|
|
||||||
|
if (group.mGroupImage.mData != NULL) {
|
||||||
|
QPixmap image;
|
||||||
|
image.loadFromData(group.mGroupImage.mData, group.mGroupImage.mSize, "PNG");
|
||||||
|
postedData->mIcon[group.mMeta.mGroupId] = image;
|
||||||
|
}
|
||||||
|
|
||||||
if (!group.mDescription.empty()) {
|
if (!group.mDescription.empty()) {
|
||||||
postedData->mDescription[group.mMeta.mGroupId] = QString::fromUtf8(group.mDescription.c_str());
|
postedData->mDescription[group.mMeta.mGroupId] = QString::fromUtf8(group.mDescription.c_str());
|
||||||
}
|
}
|
||||||
@ -181,4 +188,9 @@ void PostedDialog::groupInfoToGroupItemInfo(const RsGroupMetaData &groupInfo, Gr
|
|||||||
if (descriptionIt != postedData->mDescription.end()) {
|
if (descriptionIt != postedData->mDescription.end()) {
|
||||||
groupItemInfo.description = descriptionIt.value();
|
groupItemInfo.description = descriptionIt.value();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QMap<RsGxsGroupId, QIcon>::const_iterator iconIt = postedData->mIcon.find(groupInfo.mGroupId);
|
||||||
|
if (iconIt != postedData->mIcon.end()) {
|
||||||
|
groupItemInfo.icon = iconIt.value();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
|
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
|
||||||
* *
|
* *
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
#include <QBuffer>
|
||||||
|
|
||||||
#include "PostedGroupDialog.h"
|
#include "PostedGroupDialog.h"
|
||||||
|
|
||||||
@ -25,7 +26,7 @@
|
|||||||
|
|
||||||
const uint32_t PostedCreateEnabledFlags = (
|
const uint32_t PostedCreateEnabledFlags = (
|
||||||
GXS_GROUP_FLAGS_NAME |
|
GXS_GROUP_FLAGS_NAME |
|
||||||
// GXS_GROUP_FLAGS_ICON |
|
GXS_GROUP_FLAGS_ICON |
|
||||||
GXS_GROUP_FLAGS_DESCRIPTION |
|
GXS_GROUP_FLAGS_DESCRIPTION |
|
||||||
GXS_GROUP_FLAGS_DISTRIBUTION |
|
GXS_GROUP_FLAGS_DISTRIBUTION |
|
||||||
// GXS_GROUP_FLAGS_PUBLISHSIGN |
|
// GXS_GROUP_FLAGS_PUBLISHSIGN |
|
||||||
@ -90,14 +91,31 @@ QPixmap PostedGroupDialog::serviceImage()
|
|||||||
return QPixmap(":/icons/png/posted.png");
|
return QPixmap(":/icons/png/posted.png");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PostedGroupDialog::preparePostedGroup(RsPostedGroup &group, const RsGroupMetaData &meta)
|
||||||
|
{
|
||||||
|
group.mMeta = meta;
|
||||||
|
group.mDescription = getDescription().toUtf8().constData();
|
||||||
|
|
||||||
|
QPixmap pixmap = getLogo();
|
||||||
|
|
||||||
|
if (!pixmap.isNull()) {
|
||||||
|
QByteArray ba;
|
||||||
|
QBuffer buffer(&ba);
|
||||||
|
|
||||||
|
buffer.open(QIODevice::WriteOnly);
|
||||||
|
pixmap.save(&buffer, "PNG"); // writes image into ba in PNG format
|
||||||
|
|
||||||
|
group.mGroupImage.copy((uint8_t *) ba.data(), ba.size());
|
||||||
|
} else {
|
||||||
|
group.mGroupImage.clear();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool PostedGroupDialog::service_CreateGroup(uint32_t &token, const RsGroupMetaData &meta)
|
bool PostedGroupDialog::service_CreateGroup(uint32_t &token, const RsGroupMetaData &meta)
|
||||||
{
|
{
|
||||||
// Specific Function.
|
// Specific Function.
|
||||||
RsPostedGroup grp;
|
RsPostedGroup grp;
|
||||||
grp.mMeta = meta;
|
preparePostedGroup(grp, meta);
|
||||||
grp.mDescription = getDescription().toStdString();
|
|
||||||
std::cerr << "PostedGroupDialog::service_CreateGroup() storing to Queue";
|
|
||||||
std::cerr << std::endl;
|
|
||||||
|
|
||||||
rsPosted->createGroup(token, grp);
|
rsPosted->createGroup(token, grp);
|
||||||
|
|
||||||
@ -107,8 +125,7 @@ bool PostedGroupDialog::service_CreateGroup(uint32_t &token, const RsGroupMetaDa
|
|||||||
bool PostedGroupDialog::service_EditGroup(uint32_t &token, RsGroupMetaData &editedMeta)
|
bool PostedGroupDialog::service_EditGroup(uint32_t &token, RsGroupMetaData &editedMeta)
|
||||||
{
|
{
|
||||||
RsPostedGroup grp;
|
RsPostedGroup grp;
|
||||||
grp.mMeta = editedMeta;
|
preparePostedGroup(grp, editedMeta);
|
||||||
grp.mDescription = getDescription().toUtf8().constData();
|
|
||||||
|
|
||||||
std::cerr << "PostedGroupDialog::service_EditGroup() submitting changes";
|
std::cerr << "PostedGroupDialog::service_EditGroup() submitting changes";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
@ -140,8 +157,18 @@ bool PostedGroupDialog::service_loadGroup(uint32_t token, Mode /*mode*/, RsGroup
|
|||||||
std::cerr << "PostedGroupDialog::service_loadGroup() Unfinished Loading";
|
std::cerr << "PostedGroupDialog::service_loadGroup() Unfinished Loading";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
|
||||||
groupMetaData = groups[0].mMeta;
|
const RsPostedGroup &group = groups[0];
|
||||||
description = QString::fromUtf8(groups[0].mDescription.c_str());
|
groupMetaData = group.mMeta;
|
||||||
|
description = QString::fromUtf8(group.mDescription.c_str());
|
||||||
|
|
||||||
|
if (group.mGroupImage.mData) {
|
||||||
|
QPixmap pixmap;
|
||||||
|
if (pixmap.loadFromData(group.mGroupImage.mData, group.mGroupImage.mSize, "PNG")) {
|
||||||
|
setLogo(pixmap);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
setLogo(QPixmap(":/icons/png/posted.png"));
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -39,6 +39,9 @@ protected:
|
|||||||
virtual bool service_CreateGroup(uint32_t &token, const RsGroupMetaData &meta);
|
virtual bool service_CreateGroup(uint32_t &token, const RsGroupMetaData &meta);
|
||||||
virtual bool service_loadGroup(uint32_t token, Mode mode, RsGroupMetaData& groupMetaData, QString &description);
|
virtual bool service_loadGroup(uint32_t token, Mode mode, RsGroupMetaData& groupMetaData, QString &description);
|
||||||
virtual bool service_EditGroup(uint32_t &token, RsGroupMetaData &editedMeta);
|
virtual bool service_EditGroup(uint32_t &token, RsGroupMetaData &editedMeta);
|
||||||
|
|
||||||
|
private:
|
||||||
|
void preparePostedGroup(RsPostedGroup &group, const RsGroupMetaData &meta);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -110,6 +110,17 @@ void PostedItem::setup()
|
|||||||
QAction *CopyLinkAction = new QAction(QIcon(""),tr("Copy RetroShare Link"), this);
|
QAction *CopyLinkAction = new QAction(QIcon(""),tr("Copy RetroShare Link"), this);
|
||||||
connect(CopyLinkAction, SIGNAL(triggered()), this, SLOT(copyMessageLink()));
|
connect(CopyLinkAction, SIGNAL(triggered()), this, SLOT(copyMessageLink()));
|
||||||
|
|
||||||
|
|
||||||
|
int S = QFontMetricsF(font()).height() ;
|
||||||
|
|
||||||
|
ui->voteUpButton->setIconSize(QSize(S*1.5,S*1.5));
|
||||||
|
ui->voteDownButton->setIconSize(QSize(S*1.5,S*1.5));
|
||||||
|
ui->commentButton->setIconSize(QSize(S*1.5,S*1.5));
|
||||||
|
ui->expandButton->setIconSize(QSize(S*1.5,S*1.5));
|
||||||
|
ui->notesButton->setIconSize(QSize(S*1.5,S*1.5));
|
||||||
|
ui->readButton->setIconSize(QSize(S*1.5,S*1.5));
|
||||||
|
ui->shareButton->setIconSize(QSize(S*1.5,S*1.5));
|
||||||
|
|
||||||
QMenu *menu = new QMenu();
|
QMenu *menu = new QMenu();
|
||||||
menu->addAction(CopyLinkAction);
|
menu->addAction(CopyLinkAction);
|
||||||
ui->shareButton->setMenu(menu);
|
ui->shareButton->setMenu(menu);
|
||||||
@ -235,7 +246,11 @@ void PostedItem::fill()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QPixmap sqpixmap2 = QPixmap(":/images/thumb-default.png");
|
||||||
|
|
||||||
mInFill = true;
|
mInFill = true;
|
||||||
|
int desired_height = 1.5*(ui->voteDownButton->height() + ui->voteUpButton->height() + ui->scoreLabel->height());
|
||||||
|
int desired_width = sqpixmap2.width()*desired_height/(float)sqpixmap2.height();
|
||||||
|
|
||||||
if(mPost.mImage.mData != NULL)
|
if(mPost.mImage.mData != NULL)
|
||||||
{
|
{
|
||||||
@ -243,12 +258,13 @@ void PostedItem::fill()
|
|||||||
pixmap.loadFromData(mPost.mImage.mData, mPost.mImage.mSize, "PNG");
|
pixmap.loadFromData(mPost.mImage.mData, mPost.mImage.mSize, "PNG");
|
||||||
// Wiping data - as its been passed to thumbnail.
|
// Wiping data - as its been passed to thumbnail.
|
||||||
|
|
||||||
QPixmap sqpixmap = pixmap.scaled(800, 600, Qt::KeepAspectRatio, Qt::SmoothTransformation);
|
QPixmap sqpixmap = pixmap.scaled(desired_width,desired_height, Qt::KeepAspectRatioByExpanding, Qt::SmoothTransformation);
|
||||||
ui->pictureLabel->setPixmap(sqpixmap);
|
ui->thumbnailLabel->setPixmap(sqpixmap);
|
||||||
|
ui->pictureLabel->setPixmap(pixmap);
|
||||||
ui->thumbnailLabel->setPixmap(pixmap);
|
}
|
||||||
}else
|
else
|
||||||
{
|
{
|
||||||
|
//ui->thumbnailLabel->setFixedSize(desired_width,desired_height);
|
||||||
ui->expandButton->setDisabled(true);
|
ui->expandButton->setDisabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -290,7 +306,7 @@ void PostedItem::fill()
|
|||||||
urlstr += QString(" </span></a>");
|
urlstr += QString(" </span></a>");
|
||||||
|
|
||||||
QString siteurl = url.scheme() + "://" + url.host();
|
QString siteurl = url.scheme() + "://" + url.host();
|
||||||
sitestr = QString("<a href=\"%1\" ><span style=\" text-decoration: underline; color:#2255AA;\"> %2 </span></a>").arg(siteurl).arg(siteurl);
|
sitestr = QString("<a href=\"%1\" ><span style=\" text-decoration: underline; color:#0079d3;\"> %2 </span></a>").arg(siteurl).arg(siteurl);
|
||||||
|
|
||||||
ui->titleLabel->setText(urlstr);
|
ui->titleLabel->setText(urlstr);
|
||||||
}else
|
}else
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>617</width>
|
<width>825</width>
|
||||||
<height>190</height>
|
<height>337</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@ -67,6 +67,12 @@
|
|||||||
</property>
|
</property>
|
||||||
<item row="0" column="0" rowspan="2">
|
<item row="0" column="0" rowspan="2">
|
||||||
<widget class="QFrame" name="voteFrame">
|
<widget class="QFrame" name="voteFrame">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>37</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true"/>
|
<string notr="true"/>
|
||||||
</property>
|
</property>
|
||||||
@ -100,12 +106,6 @@
|
|||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>24</width>
|
|
||||||
<height>24</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Vote up</string>
|
<string>Vote up</string>
|
||||||
</property>
|
</property>
|
||||||
@ -116,12 +116,6 @@
|
|||||||
<iconset resource="Posted_images.qrc">
|
<iconset resource="Posted_images.qrc">
|
||||||
<normaloff>:/images/up-arrow.png</normaloff>:/images/up-arrow.png</iconset>
|
<normaloff>:/images/up-arrow.png</normaloff>:/images/up-arrow.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="iconSize">
|
|
||||||
<size>
|
|
||||||
<width>16</width>
|
|
||||||
<height>16</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="autoRaise">
|
<property name="autoRaise">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
@ -161,12 +155,6 @@
|
|||||||
<iconset resource="Posted_images.qrc">
|
<iconset resource="Posted_images.qrc">
|
||||||
<normaloff>:/images/down-arrow.png</normaloff>:/images/down-arrow.png</iconset>
|
<normaloff>:/images/down-arrow.png</normaloff>:/images/down-arrow.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="iconSize">
|
|
||||||
<size>
|
|
||||||
<width>16</width>
|
|
||||||
<height>16</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="autoRaise">
|
<property name="autoRaise">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
@ -198,6 +186,12 @@
|
|||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="thumbnailLabel">
|
<widget class="QLabel" name="thumbnailLabel">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>100</width>
|
<width>100</width>
|
||||||
@ -312,7 +306,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>3</number>
|
<number>5</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="leftMargin">
|
<property name="leftMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
@ -371,25 +365,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="siteBoldLabel">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Site</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="siteLabel">
|
<widget class="QLabel" name="siteLabel">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@ -426,6 +401,9 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="buttonHLayout">
|
<layout class="QHBoxLayout" name="buttonHLayout">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
<property name="leftMargin">
|
<property name="leftMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
@ -705,8 +683,8 @@
|
|||||||
</customwidget>
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../images.qrc"/>
|
|
||||||
<include location="Posted_images.qrc"/>
|
<include location="Posted_images.qrc"/>
|
||||||
|
<include location="../images.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
@ -26,8 +26,12 @@
|
|||||||
#include "PostedCreatePostDialog.h"
|
#include "PostedCreatePostDialog.h"
|
||||||
#include "PostedItem.h"
|
#include "PostedItem.h"
|
||||||
#include "gui/common/UIStateHelper.h"
|
#include "gui/common/UIStateHelper.h"
|
||||||
|
#include "gui/RetroShareLink.h"
|
||||||
|
#include "util/HandleRichText.h"
|
||||||
|
#include "util/DateTime.h"
|
||||||
|
|
||||||
#include <retroshare/rsposted.h>
|
#include <retroshare/rsposted.h>
|
||||||
|
#include "retroshare/rsgxscircles.h"
|
||||||
|
|
||||||
#define POSTED_DEFAULT_LISTING_LENGTH 10
|
#define POSTED_DEFAULT_LISTING_LENGTH 10
|
||||||
#define POSTED_MAX_INDEX 10000
|
#define POSTED_MAX_INDEX 10000
|
||||||
@ -66,12 +70,19 @@ PostedListWidget::PostedListWidget(const RsGxsGroupId &postedId, QWidget *parent
|
|||||||
/* fill in the available OwnIds for signing */
|
/* fill in the available OwnIds for signing */
|
||||||
ui->idChooser->loadIds(IDCHOOSER_ID_REQUIRED, RsGxsId());
|
ui->idChooser->loadIds(IDCHOOSER_ID_REQUIRED, RsGxsId());
|
||||||
|
|
||||||
|
int S = QFontMetricsF(font()).height() ;
|
||||||
|
|
||||||
|
ui->submitPostButton->setIconSize(QSize(S*1.5,S*1.5));
|
||||||
|
ui->comboBox->setIconSize(QSize(S*1.5,S*1.5));
|
||||||
|
|
||||||
connect(ui->submitPostButton, SIGNAL(clicked()), this, SLOT(newPost()));
|
connect(ui->submitPostButton, SIGNAL(clicked()), this, SLOT(newPost()));
|
||||||
|
|
||||||
ui->subscribeToolButton->setToolTip(tr( "<p>Subscribing to the links will gather \
|
ui->subscribeToolButton->setToolTip(tr( "<p>Subscribing to the links will gather \
|
||||||
available posts from your subscribed friends, and make the \
|
available posts from your subscribed friends, and make the \
|
||||||
links visible to all other friends.</p><p>Afterwards you can unsubscribe from the context menu of the links list at left.</p>"));
|
links visible to all other friends.</p><p>Afterwards you can unsubscribe from the context menu of the links list at left.</p>"));
|
||||||
|
|
||||||
|
ui->infoframe->hide();
|
||||||
|
|
||||||
/* load settings */
|
/* load settings */
|
||||||
processSettings(true);
|
processSettings(true);
|
||||||
|
|
||||||
@ -293,6 +304,67 @@ void PostedListWidget::insertPostedDetails(const RsPostedGroup &group)
|
|||||||
mStateHelper->setWidgetEnabled(ui->submitPostButton, IS_GROUP_SUBSCRIBED(group.mMeta.mSubscribeFlags));
|
mStateHelper->setWidgetEnabled(ui->submitPostButton, IS_GROUP_SUBSCRIBED(group.mMeta.mSubscribeFlags));
|
||||||
ui->subscribeToolButton->setSubscribed(IS_GROUP_SUBSCRIBED(group.mMeta.mSubscribeFlags));
|
ui->subscribeToolButton->setSubscribed(IS_GROUP_SUBSCRIBED(group.mMeta.mSubscribeFlags));
|
||||||
ui->subscribeToolButton->setHidden(IS_GROUP_SUBSCRIBED(group.mMeta.mSubscribeFlags)) ;
|
ui->subscribeToolButton->setHidden(IS_GROUP_SUBSCRIBED(group.mMeta.mSubscribeFlags)) ;
|
||||||
|
|
||||||
|
RetroShareLink link;
|
||||||
|
|
||||||
|
if (IS_GROUP_SUBSCRIBED(group.mMeta.mSubscribeFlags)) {
|
||||||
|
|
||||||
|
ui->infoframe->hide();
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
ui->infoPosts->setText(QString::number(group.mMeta.mVisibleMsgCount));
|
||||||
|
|
||||||
|
if(group.mMeta.mLastPost==0)
|
||||||
|
ui->infoLastPost->setText(tr("Never"));
|
||||||
|
else
|
||||||
|
|
||||||
|
ui->infoLastPost->setText(DateTime::formatLongDateTime(group.mMeta.mLastPost));
|
||||||
|
|
||||||
|
QString formatDescription = QString::fromUtf8(group.mDescription.c_str());
|
||||||
|
|
||||||
|
unsigned int formatFlag = RSHTML_FORMATTEXT_EMBED_LINKS;
|
||||||
|
|
||||||
|
formatDescription = RsHtml().formatText(NULL, formatDescription, formatFlag);
|
||||||
|
|
||||||
|
ui->infoDescription->setText(formatDescription);
|
||||||
|
|
||||||
|
ui->infoAdministrator->setId(group.mMeta.mAuthorId) ;
|
||||||
|
|
||||||
|
link = RetroShareLink::createMessage(group.mMeta.mAuthorId, "");
|
||||||
|
ui->infoAdministrator->setText(link.toHtml());
|
||||||
|
|
||||||
|
QString distrib_string ( "[unknown]" );
|
||||||
|
|
||||||
|
switch(group.mMeta.mCircleType)
|
||||||
|
{
|
||||||
|
case GXS_CIRCLE_TYPE_PUBLIC: distrib_string = tr("Public") ;
|
||||||
|
break ;
|
||||||
|
case GXS_CIRCLE_TYPE_EXTERNAL:
|
||||||
|
{
|
||||||
|
RsGxsCircleDetails det ;
|
||||||
|
|
||||||
|
// !! What we need here is some sort of CircleLabel, which loads the circle and updates the label when done.
|
||||||
|
|
||||||
|
if(rsGxsCircles->getCircleDetails(group.mMeta.mCircleId,det))
|
||||||
|
distrib_string = tr("Restricted to members of circle \"")+QString::fromUtf8(det.mCircleName.c_str()) +"\"";
|
||||||
|
else
|
||||||
|
distrib_string = tr("Restricted to members of circle ")+QString::fromStdString(group.mMeta.mCircleId.toStdString()) ;
|
||||||
|
}
|
||||||
|
break ;
|
||||||
|
case GXS_CIRCLE_TYPE_YOUR_EYES_ONLY: distrib_string = tr("Your eyes only");
|
||||||
|
break ;
|
||||||
|
case GXS_CIRCLE_TYPE_LOCAL: distrib_string = tr("You and your friend nodes");
|
||||||
|
break ;
|
||||||
|
default:
|
||||||
|
std::cerr << "(EE) badly initialised group distribution ID = " << group.mMeta.mCircleType << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
ui->infoDistribution->setText(distrib_string);
|
||||||
|
|
||||||
|
ui->infoframe->show();
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*********************** **** **** **** ***********************/
|
/*********************** **** **** **** ***********************/
|
||||||
|
@ -205,6 +205,186 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QFrame" name="infoframe">
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::StyledPanel</enum>
|
||||||
|
</property>
|
||||||
|
<property name="frameShadow">
|
||||||
|
<enum>QFrame::Raised</enum>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_3">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QGroupBox" name="infoGroupBox">
|
||||||
|
<property name="autoFillBackground">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true"/>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>Topic Details</string>
|
||||||
|
</property>
|
||||||
|
<property name="flat">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Administrator:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="infoPostsLabel">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Posts:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="infoLastPostLabel">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Last Post:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="0" colspan="2">
|
||||||
|
<widget class="QTextBrowser" name="infoDescription">
|
||||||
|
<property name="html">
|
||||||
|
<string notr="true"><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||||
|
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||||
|
p, li { white-space: pre-wrap; }
|
||||||
|
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
|
||||||
|
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Description</span></p></body></html></string>
|
||||||
|
</property>
|
||||||
|
<property name="textInteractionFlags">
|
||||||
|
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
||||||
|
</property>
|
||||||
|
<property name="openExternalLinks">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="openLinks">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
|
<widget class="QLabel" name="infoDescriptionLabel">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Description:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="GxsIdLabel" name="infoAdministrator">
|
||||||
|
<property name="text">
|
||||||
|
<string>unknown</string>
|
||||||
|
</property>
|
||||||
|
<property name="openExternalLinks">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QLabel" name="infoPosts">
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">0</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QLabel" name="infoLastPost">
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">unknown</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QLabel" name="label_3">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Distribution:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<widget class="QLabel" name="infoDistribution">
|
||||||
|
<property name="text">
|
||||||
|
<string>unknown</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QScrollArea" name="scrollArea">
|
<widget class="QScrollArea" name="scrollArea">
|
||||||
<property name="widgetResizable">
|
<property name="widgetResizable">
|
||||||
@ -258,6 +438,11 @@
|
|||||||
<extends>QComboBox</extends>
|
<extends>QComboBox</extends>
|
||||||
<header>gui/gxs/GxsIdChooser.h</header>
|
<header>gui/gxs/GxsIdChooser.h</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
|
<customwidget>
|
||||||
|
<class>GxsIdLabel</class>
|
||||||
|
<extends>QLabel</extends>
|
||||||
|
<header>gui/gxs/GxsIdLabel.h</header>
|
||||||
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../images.qrc"/>
|
<include location="../images.qrc"/>
|
||||||
|
@ -135,13 +135,22 @@ void PostedGroupItem::fill()
|
|||||||
|
|
||||||
ui->descLabel->setText(QString::fromUtf8(mGroup.mDescription.c_str()));
|
ui->descLabel->setText(QString::fromUtf8(mGroup.mDescription.c_str()));
|
||||||
|
|
||||||
//TODO - nice icon for subscribed group
|
if (mGroup.mGroupImage.mData != NULL) {
|
||||||
if (IS_GROUP_PUBLISHER(mGroup.mMeta.mSubscribeFlags)) {
|
QPixmap postedImage;
|
||||||
ui->logoLabel->setPixmap(QPixmap(":/images/posted_64.png"));
|
postedImage.loadFromData(mGroup.mGroupImage.mData, mGroup.mGroupImage.mSize, "PNG");
|
||||||
|
ui->logoLabel->setPixmap(QPixmap(postedImage));
|
||||||
} else {
|
} else {
|
||||||
ui->logoLabel->setPixmap(QPixmap(":/images/posted_64.png"));
|
ui->logoLabel->setPixmap(QPixmap(":/images/posted_64.png"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//TODO - nice icon for subscribed group
|
||||||
|
// if (IS_GROUP_PUBLISHER(mGroup.mMeta.mSubscribeFlags)) {
|
||||||
|
// ui->logoLabel->setPixmap(QPixmap(":/images/posted_64.png"));
|
||||||
|
// } else {
|
||||||
|
// ui->logoLabel->setPixmap(QPixmap(":/images/posted_64.png"));
|
||||||
|
// }
|
||||||
|
|
||||||
if (IS_GROUP_SUBSCRIBED(mGroup.mMeta.mSubscribeFlags)) {
|
if (IS_GROUP_SUBSCRIBED(mGroup.mMeta.mSubscribeFlags)) {
|
||||||
ui->subscribeButton->setEnabled(false);
|
ui->subscribeButton->setEnabled(false);
|
||||||
} else {
|
} else {
|
||||||
|
@ -49,6 +49,15 @@ GxsCommentDialog::GxsCommentDialog(QWidget *parent, RsTokenService *token_servic
|
|||||||
connect(ui->refreshButton, SIGNAL(clicked()), this, SLOT(refresh()));
|
connect(ui->refreshButton, SIGNAL(clicked()), this, SLOT(refresh()));
|
||||||
connect(ui->idChooser, SIGNAL(currentIndexChanged( int )), this, SLOT(voterSelectionChanged( int )));
|
connect(ui->idChooser, SIGNAL(currentIndexChanged( int )), this, SLOT(voterSelectionChanged( int )));
|
||||||
connect(ui->idChooser, SIGNAL(idsLoaded()), this, SLOT(idChooserReady()));
|
connect(ui->idChooser, SIGNAL(idsLoaded()), this, SLOT(idChooserReady()));
|
||||||
|
|
||||||
|
connect(ui->sortBox, SIGNAL(currentIndexChanged(int)), this, SLOT(sortComments(int)));
|
||||||
|
|
||||||
|
// default sort method "HOT".
|
||||||
|
ui->treeWidget->sortByColumn(4, Qt::DescendingOrder);
|
||||||
|
|
||||||
|
int S = QFontMetricsF(font()).height() ;
|
||||||
|
|
||||||
|
ui->sortBox->setIconSize(QSize(S*1.5,S*1.5));
|
||||||
}
|
}
|
||||||
|
|
||||||
GxsCommentDialog::~GxsCommentDialog()
|
GxsCommentDialog::~GxsCommentDialog()
|
||||||
@ -141,3 +150,22 @@ void GxsCommentDialog::setCommentHeader(QWidget *header)
|
|||||||
ui->notesBrowser->setPlainText(QString::fromStdString(mCurrentPost.mNotes));
|
ui->notesBrowser->setPlainText(QString::fromStdString(mCurrentPost.mNotes));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GxsCommentDialog::sortComments(int i)
|
||||||
|
{
|
||||||
|
|
||||||
|
switch(i)
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
case 0:
|
||||||
|
ui->treeWidget->sortByColumn(4, Qt::DescendingOrder);
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
ui->treeWidget->sortByColumn(2, Qt::DescendingOrder);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
ui->treeWidget->sortByColumn(3, Qt::DescendingOrder);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
@ -45,6 +45,7 @@ private slots:
|
|||||||
void refresh();
|
void refresh();
|
||||||
void idChooserReady();
|
void idChooserReady();
|
||||||
void voterSelectionChanged( int index );
|
void voterSelectionChanged( int index );
|
||||||
|
void sortComments(int);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
RsGxsGroupId mGrpId;
|
RsGxsGroupId mGrpId;
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Form</string>
|
<string>Form</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="GxsCommentDialogVLayout">
|
<layout class="QGridLayout" name="GxsCommentDialogGLayout">
|
||||||
<item>
|
<item row="0" column="0">
|
||||||
<widget class="QFrame" name="postFrame">
|
<widget class="QFrame" name="postFrame">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||||
@ -24,59 +24,63 @@
|
|||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="postFrameVLayout">
|
<layout class="QVBoxLayout" name="postFrameVLayout">
|
||||||
<property name="leftMargin">
|
<property name="leftMargin">
|
||||||
<number>9</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="topMargin">
|
<property name="topMargin">
|
||||||
<number>1</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>1</number>
|
||||||
|
</property>
|
||||||
<property name="bottomMargin">
|
<property name="bottomMargin">
|
||||||
<number>1</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="1" column="0">
|
||||||
<layout class="QHBoxLayout" name="toolBarHLayout">
|
<layout class="QHBoxLayout" name="toolBarHLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="hotSortButton">
|
<widget class="QComboBox" name="sortBox">
|
||||||
<property name="text">
|
<property name="toolTip">
|
||||||
<string>Hot</string>
|
<string><html><head/><body><p><span style=" font-family:'-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol'; font-size:14px; color:#24292e; background-color:#ffffff;">sort by</span></p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
<property name="checkable">
|
<property name="styleSheet">
|
||||||
<bool>true</bool>
|
<string notr="true"/>
|
||||||
</property>
|
</property>
|
||||||
<property name="autoExclusive">
|
<property name="iconSize">
|
||||||
<bool>true</bool>
|
<size>
|
||||||
</property>
|
<width>24</width>
|
||||||
</widget>
|
<height>24</height>
|
||||||
</item>
|
</size>
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="newSortButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>New</string>
|
|
||||||
</property>
|
|
||||||
<property name="checkable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="autoExclusive">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="topSortButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Top</string>
|
|
||||||
</property>
|
|
||||||
<property name="checkable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="checked">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="autoExclusive">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
</property>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Hot</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../icons.qrc">
|
||||||
|
<normaloff>:/icons/png/flame.png</normaloff>:/icons/png/flame.png</iconset>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>New</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../icons.qrc">
|
||||||
|
<normaloff>:/icons/png/new.png</normaloff>:/icons/png/new.png</iconset>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Top</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../icons.qrc">
|
||||||
|
<normaloff>:/icons/png/top.png</normaloff>:/icons/png/top.png</iconset>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@ -111,8 +115,11 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="2" column="0">
|
||||||
<widget class="GxsCommentTreeWidget" name="treeWidget">
|
<widget class="GxsCommentTreeWidget" name="treeWidget">
|
||||||
|
<property name="sortingEnabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
<column>
|
<column>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Comment</string>
|
<string>Comment</string>
|
||||||
@ -164,6 +171,8 @@
|
|||||||
<header>gui/gxs/GxsCommentTreeWidget.h</header>
|
<header>gui/gxs/GxsCommentTreeWidget.h</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources/>
|
<resources>
|
||||||
|
<include location="../icons.qrc"/>
|
||||||
|
</resources>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
#include "gui/gxs/GxsCommentTreeWidget.h"
|
#include "gui/gxs/GxsCommentTreeWidget.h"
|
||||||
#include "gui/gxs/GxsCreateCommentDialog.h"
|
#include "gui/gxs/GxsCreateCommentDialog.h"
|
||||||
#include "gui/gxs/GxsIdTreeWidgetItem.h"
|
#include "gui/gxs/GxsIdTreeWidgetItem.h"
|
||||||
|
#include "gui/common/RSTreeWidgetItem.h"
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
@ -45,6 +46,7 @@
|
|||||||
#define PCITEM_COLUMN_PARENTID 8
|
#define PCITEM_COLUMN_PARENTID 8
|
||||||
#define PCITEM_COLUMN_AUTHORID 9
|
#define PCITEM_COLUMN_AUTHORID 9
|
||||||
|
|
||||||
|
#define ROLE_SORT Qt::UserRole + 1
|
||||||
|
|
||||||
#define GXSCOMMENTS_LOADTHREAD 1
|
#define GXSCOMMENTS_LOADTHREAD 1
|
||||||
|
|
||||||
@ -140,6 +142,9 @@ GxsCommentTreeWidget::GxsCommentTreeWidget(QWidget *parent)
|
|||||||
|
|
||||||
setItemDelegateForColumn(PCITEM_COLUMN_COMMENT,new MultiLinesCommentDelegate(QFontMetricsF(font()))) ;
|
setItemDelegateForColumn(PCITEM_COLUMN_COMMENT,new MultiLinesCommentDelegate(QFontMetricsF(font()))) ;
|
||||||
|
|
||||||
|
commentsRole = new RSTreeWidgetItemCompareRole;
|
||||||
|
commentsRole->setRole(PCITEM_COLUMN_DATE, ROLE_SORT);
|
||||||
|
|
||||||
// QFont font = QFont("ARIAL", 10);
|
// QFont font = QFont("ARIAL", 10);
|
||||||
// font.setBold(true);
|
// font.setBold(true);
|
||||||
|
|
||||||
@ -537,6 +542,8 @@ void GxsCommentTreeWidget::service_loadThread(const uint32_t &token)
|
|||||||
text = qtime.toString("yyyy-MM-dd hh:mm:ss") ;
|
text = qtime.toString("yyyy-MM-dd hh:mm:ss") ;
|
||||||
item->setText(PCITEM_COLUMN_DATE, text) ;
|
item->setText(PCITEM_COLUMN_DATE, text) ;
|
||||||
item->setToolTip(PCITEM_COLUMN_DATE, text) ;
|
item->setToolTip(PCITEM_COLUMN_DATE, text) ;
|
||||||
|
item->setData(PCITEM_COLUMN_DATE, ROLE_SORT, QVariant(qlonglong(comment.mMeta.mPublishTs)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
text = QString::fromUtf8(comment.mComment.c_str());
|
text = QString::fromUtf8(comment.mComment.c_str());
|
||||||
|
@ -27,6 +27,8 @@
|
|||||||
#include <retroshare/rsgxscommon.h>
|
#include <retroshare/rsgxscommon.h>
|
||||||
#include <retroshare/rsidentity.h>
|
#include <retroshare/rsidentity.h>
|
||||||
|
|
||||||
|
class RSTreeWidgetItemCompareRole;
|
||||||
|
|
||||||
class GxsCommentTreeWidget : public QTreeWidget, public TokenResponse
|
class GxsCommentTreeWidget : public QTreeWidget, public TokenResponse
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@ -97,6 +99,8 @@ protected:
|
|||||||
std::map<RsGxsMessageId, QTreeWidgetItem *> mLoadingMap;
|
std::map<RsGxsMessageId, QTreeWidgetItem *> mLoadingMap;
|
||||||
std::multimap<RsGxsMessageId, QTreeWidgetItem *> mPendingInsertMap;
|
std::multimap<RsGxsMessageId, QTreeWidgetItem *> mPendingInsertMap;
|
||||||
|
|
||||||
|
RSTreeWidgetItemCompareRole *commentsRole;
|
||||||
|
|
||||||
TokenQueue *mTokenQueue;
|
TokenQueue *mTokenQueue;
|
||||||
RsTokenService *mRsTokenService;
|
RsTokenService *mRsTokenService;
|
||||||
RsGxsCommentService *mCommentService;
|
RsGxsCommentService *mCommentService;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>600</width>
|
<width>600</width>
|
||||||
<height>736</height>
|
<height>633</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
|
@ -294,7 +294,7 @@
|
|||||||
<number>3</number>
|
<number>3</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="topMargin">
|
<property name="topMargin">
|
||||||
<number>3</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="rightMargin">
|
<property name="rightMargin">
|
||||||
<number>3</number>
|
<number>3</number>
|
||||||
@ -304,211 +304,176 @@
|
|||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QFrame" name="infoFrame">
|
<widget class="QFrame" name="infoFrame">
|
||||||
<property name="palette">
|
|
||||||
<palette>
|
|
||||||
<active>
|
|
||||||
<colorrole role="Base">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>255</red>
|
|
||||||
<green>255</green>
|
|
||||||
<blue>255</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
<colorrole role="Window">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>255</red>
|
|
||||||
<green>255</green>
|
|
||||||
<blue>178</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
</active>
|
|
||||||
<inactive>
|
|
||||||
<colorrole role="Base">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>255</red>
|
|
||||||
<green>255</green>
|
|
||||||
<blue>255</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
<colorrole role="Window">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>255</red>
|
|
||||||
<green>255</green>
|
|
||||||
<blue>178</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
</inactive>
|
|
||||||
<disabled>
|
|
||||||
<colorrole role="Base">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>255</red>
|
|
||||||
<green>255</green>
|
|
||||||
<blue>178</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
<colorrole role="Window">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>255</red>
|
|
||||||
<green>255</green>
|
|
||||||
<blue>178</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
</disabled>
|
|
||||||
</palette>
|
|
||||||
</property>
|
|
||||||
<property name="autoFillBackground">
|
<property name="autoFillBackground">
|
||||||
<bool>true</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="frameShape">
|
<property name="frameShape">
|
||||||
<enum>QFrame::Box</enum>
|
<enum>QFrame::NoFrame</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="frameShadow">
|
<property name="frameShadow">
|
||||||
<enum>QFrame::Plain</enum>
|
<enum>QFrame::Plain</enum>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<widget class="QGroupBox" name="groupBox">
|
||||||
<item row="2" column="0">
|
<property name="title">
|
||||||
<widget class="QLabel" name="label">
|
<string>Channel details</string>
|
||||||
<property name="font">
|
</property>
|
||||||
<font>
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<weight>75</weight>
|
<property name="leftMargin">
|
||||||
<bold>true</bold>
|
<number>9</number>
|
||||||
</font>
|
</property>
|
||||||
</property>
|
<property name="topMargin">
|
||||||
<property name="text">
|
<number>9</number>
|
||||||
<string>Administrator:</string>
|
</property>
|
||||||
</property>
|
<property name="rightMargin">
|
||||||
</widget>
|
<number>9</number>
|
||||||
</item>
|
</property>
|
||||||
<item row="0" column="0">
|
<property name="bottomMargin">
|
||||||
<widget class="QLabel" name="infoPostsLabel">
|
<number>9</number>
|
||||||
<property name="sizePolicy">
|
</property>
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
<item row="2" column="0">
|
||||||
<horstretch>0</horstretch>
|
<widget class="QLabel" name="label">
|
||||||
<verstretch>0</verstretch>
|
<property name="font">
|
||||||
</sizepolicy>
|
<font>
|
||||||
</property>
|
<weight>75</weight>
|
||||||
<property name="font">
|
<bold>true</bold>
|
||||||
<font>
|
</font>
|
||||||
<weight>75</weight>
|
</property>
|
||||||
<bold>true</bold>
|
<property name="text">
|
||||||
</font>
|
<string>Administrator:</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
</widget>
|
||||||
<string>Posts (at neighbor nodes):</string>
|
</item>
|
||||||
</property>
|
<item row="0" column="0">
|
||||||
</widget>
|
<widget class="QLabel" name="infoPostsLabel">
|
||||||
</item>
|
<property name="sizePolicy">
|
||||||
<item row="1" column="0">
|
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
||||||
<widget class="QLabel" name="infoLastPostLabel">
|
<horstretch>0</horstretch>
|
||||||
<property name="sizePolicy">
|
<verstretch>0</verstretch>
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
</sizepolicy>
|
||||||
<horstretch>0</horstretch>
|
</property>
|
||||||
<verstretch>0</verstretch>
|
<property name="font">
|
||||||
</sizepolicy>
|
<font>
|
||||||
</property>
|
<weight>75</weight>
|
||||||
<property name="font">
|
<bold>true</bold>
|
||||||
<font>
|
</font>
|
||||||
<weight>75</weight>
|
</property>
|
||||||
<bold>true</bold>
|
<property name="text">
|
||||||
</font>
|
<string>Posts:</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
</widget>
|
||||||
<string>Last Post:</string>
|
</item>
|
||||||
</property>
|
<item row="1" column="0">
|
||||||
</widget>
|
<widget class="QLabel" name="infoLastPostLabel">
|
||||||
</item>
|
<property name="sizePolicy">
|
||||||
<item row="5" column="0" colspan="2">
|
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
||||||
<widget class="QTextBrowser" name="infoDescription">
|
<horstretch>0</horstretch>
|
||||||
<property name="html">
|
<verstretch>0</verstretch>
|
||||||
<string notr="true"><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Last Post:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="0" colspan="2">
|
||||||
|
<widget class="QTextBrowser" name="infoDescription">
|
||||||
|
<property name="html">
|
||||||
|
<string notr="true"><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||||
p, li { white-space: pre-wrap; }
|
p, li { white-space: pre-wrap; }
|
||||||
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
|
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Description</span></p></body></html></string>
|
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Description</span></p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
<property name="textInteractionFlags">
|
<property name="textInteractionFlags">
|
||||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
||||||
</property>
|
</property>
|
||||||
<property name="openExternalLinks">
|
<property name="openExternalLinks">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="openLinks">
|
<property name="openLinks">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0">
|
<item row="4" column="0">
|
||||||
<widget class="QLabel" name="infoDescriptionLabel">
|
<widget class="QLabel" name="infoDescriptionLabel">
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<weight>75</weight>
|
<weight>75</weight>
|
||||||
<bold>true</bold>
|
<bold>true</bold>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Description:</string>
|
<string>Description:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="1">
|
<item row="2" column="1">
|
||||||
<widget class="GxsIdLabel" name="infoAdministrator">
|
<widget class="GxsIdLabel" name="infoAdministrator">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>unknown</string>
|
<string>unknown</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="openExternalLinks">
|
<property name="openExternalLinks">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QLabel" name="infoPosts">
|
<widget class="QLabel" name="infoPosts">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string notr="true">0</string>
|
<string notr="true">0</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1">
|
<item row="1" column="1">
|
||||||
<widget class="QLabel" name="infoLastPost">
|
<widget class="QLabel" name="infoLastPost">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string notr="true">unknown</string>
|
<string notr="true">unknown</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0">
|
<item row="3" column="0">
|
||||||
<widget class="QLabel" name="label_3">
|
<widget class="QLabel" name="label_3">
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<weight>75</weight>
|
<weight>75</weight>
|
||||||
<bold>true</bold>
|
<bold>true</bold>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Distribution:</string>
|
<string>Distribution:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="1">
|
<item row="3" column="1">
|
||||||
<widget class="QLabel" name="infoDistribution">
|
<widget class="QLabel" name="infoDistribution">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>unknown</string>
|
<string>unknown</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
@ -786,13 +786,11 @@ GenCertDialog QFrame#profileframe{
|
|||||||
|
|
||||||
PostedListWidget QComboBox#comboBox {
|
PostedListWidget QComboBox#comboBox {
|
||||||
font: bold;
|
font: bold;
|
||||||
font-size: 15px;
|
|
||||||
color: #0099cc;
|
color: #0099cc;
|
||||||
}
|
}
|
||||||
|
|
||||||
PostedListWidget QToolButton#submitPostButton {
|
PostedListWidget QToolButton#submitPostButton {
|
||||||
font: bold;
|
font: bold;
|
||||||
font-size: 15px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PostedListWidget QToolButton#subscribeToolButton {
|
PostedListWidget QToolButton#subscribeToolButton {
|
||||||
@ -830,10 +828,7 @@ GxsForumThreadWidget QToolButton#subscribeToolButton:hover {
|
|||||||
|
|
||||||
GxsChannelPostsWidget QFrame#infoFrame
|
GxsChannelPostsWidget QFrame#infoFrame
|
||||||
{
|
{
|
||||||
border: 1px solid #DCDC41;
|
|
||||||
border-radius: 6px;
|
|
||||||
background: #FFFFD7;
|
|
||||||
background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #FFFFD7, stop:1 #FFFFB2);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GxsChannelPostsWidget QToolButton#subscribeToolButton {
|
GxsChannelPostsWidget QToolButton#subscribeToolButton {
|
||||||
@ -889,10 +884,14 @@ PostedItem QFrame#voteFrame {
|
|||||||
background: #f8f9fa;
|
background: #f8f9fa;
|
||||||
}
|
}
|
||||||
|
|
||||||
PostedItem QFrame#mainFrame{
|
PostedItem QFrame#mainFrame [new=false]{
|
||||||
background: white;
|
background: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PostedItem > QFrame#mainFrame[new=true] {
|
||||||
|
background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #F0F8FD, stop:0.8 #E6F2FD, stop: 0.81 #E6F2FD, stop: 1 #D2E7FD);
|
||||||
|
}
|
||||||
|
|
||||||
PostedItem QFrame#frame_picture{
|
PostedItem QFrame#frame_picture{
|
||||||
background: white;
|
background: white;
|
||||||
}
|
}
|
||||||
@ -906,8 +905,7 @@ PostedItem QLabel#fromBoldLabel, QLabel#fromLabel, QLabel#dateLabel, QLabel#site
|
|||||||
color: #787c7e;
|
color: #787c7e;
|
||||||
}
|
}
|
||||||
|
|
||||||
PostedItem QToolButton#commentButton, QPushButton#shareButton, QToolButton#notesButton{
|
GxsCommentDialog QComboBox#sortBox {
|
||||||
font-size: 12px;
|
font: bold;
|
||||||
color: #878a8c;
|
color: #0099cc;
|
||||||
font-weight: bold;
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user