Merge branch 'Attach-picture-for-Posted-links' into master
@ -25,10 +25,12 @@
|
|||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <list>
|
#include <list>
|
||||||
|
#include <functional>
|
||||||
|
|
||||||
#include "retroshare/rstokenservice.h"
|
#include "retroshare/rstokenservice.h"
|
||||||
#include "retroshare/rsgxsifacehelper.h"
|
#include "retroshare/rsgxsifacehelper.h"
|
||||||
#include "retroshare/rsgxscommon.h"
|
#include "retroshare/rsgxscommon.h"
|
||||||
|
#include "serialiser/rsserializable.h"
|
||||||
|
|
||||||
/* The Main Interface Class - for information about your Posted */
|
/* The Main Interface Class - for information about your Posted */
|
||||||
class RsPosted;
|
class RsPosted;
|
||||||
@ -42,6 +44,7 @@ class RsPostedGroup
|
|||||||
|
|
||||||
RsGroupMetaData mMeta;
|
RsGroupMetaData mMeta;
|
||||||
std::string mDescription;
|
std::string mDescription;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -52,7 +55,7 @@ class RsPostedGroup
|
|||||||
#define RSPOSTED_PERIOD_YEAR 1
|
#define RSPOSTED_PERIOD_YEAR 1
|
||||||
#define RSPOSTED_PERIOD_MONTH 2
|
#define RSPOSTED_PERIOD_MONTH 2
|
||||||
#define RSPOSTED_PERIOD_WEEK 3
|
#define RSPOSTED_PERIOD_WEEK 3
|
||||||
#define RSPOSTED_PERIOD_DAY 4
|
#define RSPOSTED_PERIOD_DAY 4
|
||||||
#define RSPOSTED_PERIOD_HOUR 5
|
#define RSPOSTED_PERIOD_HOUR 5
|
||||||
|
|
||||||
#define RSPOSTED_VIEWMODE_LATEST 1
|
#define RSPOSTED_VIEWMODE_LATEST 1
|
||||||
@ -102,7 +105,6 @@ virtual bool updateGroup(uint32_t &token, RsPostedGroup &group) = 0;
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class RsPostedPost
|
class RsPostedPost
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -137,6 +139,24 @@ class RsPostedPost
|
|||||||
double mHotScore;
|
double mHotScore;
|
||||||
double mTopScore;
|
double mTopScore;
|
||||||
double mNewScore;
|
double mNewScore;
|
||||||
|
|
||||||
|
RsGxsImage mImage;
|
||||||
|
|
||||||
|
/// @see RsSerializable
|
||||||
|
/*virtual void serial_process( RsGenericSerializer::SerializeJob j,
|
||||||
|
RsGenericSerializer::SerializeContext& ctx )
|
||||||
|
{
|
||||||
|
RS_SERIAL_PROCESS(mImage);
|
||||||
|
RS_SERIAL_PROCESS(mMeta);
|
||||||
|
RS_SERIAL_PROCESS(mLink);
|
||||||
|
RS_SERIAL_PROCESS(mHaveVoted);
|
||||||
|
RS_SERIAL_PROCESS(mUpVotes);
|
||||||
|
RS_SERIAL_PROCESS(mDownVotes);
|
||||||
|
RS_SERIAL_PROCESS(mComments);
|
||||||
|
RS_SERIAL_PROCESS(mHotScore);
|
||||||
|
RS_SERIAL_PROCESS(mTopScore);
|
||||||
|
RS_SERIAL_PROCESS(mNewScore);
|
||||||
|
}*/
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -22,15 +22,29 @@
|
|||||||
#include "rsitems/rsposteditems.h"
|
#include "rsitems/rsposteditems.h"
|
||||||
#include "serialiser/rstypeserializer.h"
|
#include "serialiser/rstypeserializer.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void RsGxsPostedPostItem::serial_process(RsGenericSerializer::SerializeJob j,RsGenericSerializer::SerializeContext& ctx)
|
void RsGxsPostedPostItem::serial_process(RsGenericSerializer::SerializeJob j,RsGenericSerializer::SerializeContext& ctx)
|
||||||
{
|
{
|
||||||
RsTypeSerializer::serial_process(j,ctx,TLV_TYPE_STR_LINK,mPost.mLink,"mPost.mLink") ;
|
RsTypeSerializer::serial_process(j,ctx,TLV_TYPE_STR_LINK,mPost.mLink,"mPost.mLink") ;
|
||||||
RsTypeSerializer::serial_process(j,ctx,TLV_TYPE_STR_MSG ,mPost.mNotes,"mPost.mNotes") ;
|
RsTypeSerializer::serial_process(j,ctx,TLV_TYPE_STR_MSG ,mPost.mNotes,"mPost.mNotes") ;
|
||||||
|
|
||||||
|
// Do not serialize mImage member if it is empty (keeps compatibility of new posts without image toward older RS)
|
||||||
|
// and do not expect to deserialize mImage member if the data block has been consummed entirely (keeps compatibility
|
||||||
|
// of new RS with older posts.
|
||||||
|
|
||||||
|
if(j == RsGenericSerializer::DESERIALIZE && ctx.mOffset == ctx.mSize)
|
||||||
|
return ;
|
||||||
|
|
||||||
|
if((j == RsGenericSerializer::SIZE_ESTIMATE || j == RsGenericSerializer::SERIALIZE) && mImage.empty())
|
||||||
|
return ;
|
||||||
|
|
||||||
|
RsTypeSerializer::serial_process<RsTlvItem>(j,ctx,mImage,"mImage") ;
|
||||||
}
|
}
|
||||||
|
|
||||||
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 ,mGroup.mDescription,"mGroup.mDescription") ;
|
||||||
}
|
}
|
||||||
|
|
||||||
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
|
||||||
@ -47,12 +61,54 @@ RsItem *RsGxsPostedSerialiser::create_item(uint16_t service_id,uint8_t item_subt
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool RsGxsPostedPostItem::fromPostedPost(RsPostedPost &post, bool moveImage)
|
||||||
|
{
|
||||||
|
clear();
|
||||||
|
|
||||||
|
mPost = post;
|
||||||
|
meta = post.mMeta;
|
||||||
|
|
||||||
|
if (moveImage)
|
||||||
|
{
|
||||||
|
mImage.binData.bin_data = post.mImage.mData;
|
||||||
|
mImage.binData.bin_len = post.mImage.mSize;
|
||||||
|
post.mImage.shallowClear();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mImage.binData.setBinData(post.mImage.mData, post.mImage.mSize);
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool RsGxsPostedPostItem::toPostedPost(RsPostedPost &post, bool moveImage)
|
||||||
|
{
|
||||||
|
post = mPost;
|
||||||
|
post.mMeta = meta;
|
||||||
|
|
||||||
|
if (moveImage)
|
||||||
|
{
|
||||||
|
post.mImage.take((uint8_t *) mImage.binData.bin_data, mImage.binData.bin_len);
|
||||||
|
// mImage doesn't have a ShallowClear at the moment!
|
||||||
|
mImage.binData.TlvShallowClear();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
post.mImage.copy((uint8_t *) mImage.binData.bin_data, mImage.binData.bin_len);
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
void RsGxsPostedPostItem::clear()
|
void RsGxsPostedPostItem::clear()
|
||||||
{
|
{
|
||||||
mPost.mLink.clear();
|
mPost.mLink.clear();
|
||||||
mPost.mNotes.clear();
|
mPost.mNotes.clear();
|
||||||
|
mImage.TlvClear();
|
||||||
}
|
}
|
||||||
void RsGxsPostedGroupItem::clear()
|
void RsGxsPostedGroupItem::clear()
|
||||||
{
|
{
|
||||||
mGroup.mDescription.clear();
|
mGroup.mDescription.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include "rsitems/rsserviceids.h"
|
#include "rsitems/rsserviceids.h"
|
||||||
#include "rsitems/rsgxscommentitems.h"
|
#include "rsitems/rsgxscommentitems.h"
|
||||||
#include "rsitems/rsgxsitems.h"
|
#include "rsitems/rsgxsitems.h"
|
||||||
|
#include "serialiser/rstlvimage.h"
|
||||||
|
|
||||||
#include "retroshare/rsposted.h"
|
#include "retroshare/rsposted.h"
|
||||||
|
|
||||||
@ -38,9 +39,12 @@ public:
|
|||||||
virtual ~RsGxsPostedGroupItem() {}
|
virtual ~RsGxsPostedGroupItem() {}
|
||||||
|
|
||||||
void clear();
|
void clear();
|
||||||
|
|
||||||
virtual void serial_process(RsGenericSerializer::SerializeJob j,RsGenericSerializer::SerializeContext& ctx);
|
virtual void serial_process(RsGenericSerializer::SerializeJob j,RsGenericSerializer::SerializeContext& ctx);
|
||||||
|
|
||||||
RsPostedGroup mGroup;
|
RsPostedGroup mGroup;
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class RsGxsPostedPostItem : public RsGxsMsgItem
|
class RsGxsPostedPostItem : public RsGxsMsgItem
|
||||||
@ -52,7 +56,13 @@ public:
|
|||||||
void clear();
|
void clear();
|
||||||
virtual void serial_process(RsGenericSerializer::SerializeJob j,RsGenericSerializer::SerializeContext& ctx);
|
virtual void serial_process(RsGenericSerializer::SerializeJob j,RsGenericSerializer::SerializeContext& ctx);
|
||||||
|
|
||||||
|
// Slightly unusual structure.
|
||||||
|
// use conversion functions to transform:
|
||||||
|
bool fromPostedPost(RsPostedPost &post, bool moveImage);
|
||||||
|
bool toPostedPost(RsPostedPost &post, bool moveImage);
|
||||||
|
|
||||||
RsPostedPost mPost;
|
RsPostedPost mPost;
|
||||||
|
RsTlvImage mImage;
|
||||||
};
|
};
|
||||||
|
|
||||||
class RsGxsPostedSerialiser : public RsGxsCommentSerialiser
|
class RsGxsPostedSerialiser : public RsGxsCommentSerialiser
|
||||||
|
@ -33,16 +33,17 @@
|
|||||||
|
|
||||||
class RsTlvImage: public RsTlvItem
|
class RsTlvImage: public RsTlvItem
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RsTlvImage();
|
RsTlvImage();
|
||||||
RsTlvImage(const RsTlvImage& );
|
RsTlvImage(const RsTlvImage& );
|
||||||
virtual ~RsTlvImage() { return; }
|
virtual ~RsTlvImage() { return; }
|
||||||
virtual uint32_t TlvSize() const;
|
virtual uint32_t TlvSize() const;
|
||||||
virtual void TlvClear();
|
virtual void TlvClear();
|
||||||
virtual bool SetTlv(void *data, uint32_t size, uint32_t *offset) const;
|
virtual bool SetTlv(void *data, uint32_t size, uint32_t *offset) const;
|
||||||
virtual bool GetTlv(void *data, uint32_t size, uint32_t *offset);
|
virtual bool GetTlv(void *data, uint32_t size, uint32_t *offset);
|
||||||
|
|
||||||
virtual std::ostream &print(std::ostream &out, uint16_t indent) const;
|
bool empty() const { return binData.bin_len == 0 ; }
|
||||||
|
virtual std::ostream &print(std::ostream &out, uint16_t indent) const;
|
||||||
|
|
||||||
uint32_t image_type; // Mandatory:
|
uint32_t image_type; // Mandatory:
|
||||||
RsTlvBinaryData binData; // Mandatory: serialised file info
|
RsTlvBinaryData binData; // Mandatory: serialised file info
|
||||||
|
@ -123,6 +123,7 @@ bool p3Posted::getPostData(const uint32_t &token, std::vector<RsPostedPost> &msg
|
|||||||
{
|
{
|
||||||
RsPostedPost msg = postItem->mPost;
|
RsPostedPost msg = postItem->mPost;
|
||||||
msg.mMeta = postItem->meta;
|
msg.mMeta = postItem->meta;
|
||||||
|
postItem->toPostedPost(msg, true);
|
||||||
msg.calculateScores(now);
|
msg.calculateScores(now);
|
||||||
|
|
||||||
msgs.push_back(msg);
|
msgs.push_back(msg);
|
||||||
@ -291,8 +292,10 @@ bool p3Posted::createPost(uint32_t &token, RsPostedPost &msg)
|
|||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
|
||||||
RsGxsPostedPostItem* msgItem = new RsGxsPostedPostItem();
|
RsGxsPostedPostItem* msgItem = new RsGxsPostedPostItem();
|
||||||
msgItem->mPost = msg;
|
//msgItem->mPost = msg;
|
||||||
msgItem->meta = msg.mMeta;
|
//msgItem->meta = msg.mMeta;
|
||||||
|
msgItem->fromPostedPost(msg, true);
|
||||||
|
|
||||||
|
|
||||||
RsGenExchange::publishMsg(token, msgItem);
|
RsGenExchange::publishMsg(token, msgItem);
|
||||||
return true;
|
return true;
|
||||||
|
@ -18,13 +18,16 @@
|
|||||||
* *
|
* *
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
|
#include <QBuffer>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include "PostedCreatePostDialog.h"
|
#include "PostedCreatePostDialog.h"
|
||||||
#include "ui_PostedCreatePostDialog.h"
|
#include "ui_PostedCreatePostDialog.h"
|
||||||
|
|
||||||
|
#include "util/misc.h"
|
||||||
#include "util/TokenQueue.h"
|
#include "util/TokenQueue.h"
|
||||||
|
|
||||||
#include "gui/settings/rsharesettings.h"
|
#include "gui/settings/rsharesettings.h"
|
||||||
|
#include <QBuffer>
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
@ -37,6 +40,7 @@ PostedCreatePostDialog::PostedCreatePostDialog(TokenQueue* tokenQ, RsPosted *pos
|
|||||||
Settings->loadWidgetInformation(this);
|
Settings->loadWidgetInformation(this);
|
||||||
connect(ui->submitButton, SIGNAL(clicked()), this, SLOT(createPost()));
|
connect(ui->submitButton, SIGNAL(clicked()), this, SLOT(createPost()));
|
||||||
connect(ui->buttonBox, SIGNAL(rejected()), this, SLOT(close()));
|
connect(ui->buttonBox, SIGNAL(rejected()), this, SLOT(close()));
|
||||||
|
connect(ui->pushButton, SIGNAL(clicked() ), this , SLOT(addPicture()));
|
||||||
|
|
||||||
ui->headerFrame->setHeaderImage(QPixmap(":/images/posted_64.png"));
|
ui->headerFrame->setHeaderImage(QPixmap(":/images/posted_64.png"));
|
||||||
ui->headerFrame->setHeaderText(tr("Submit a new Post"));
|
ui->headerFrame->setHeaderText(tr("Submit a new Post"));
|
||||||
@ -78,6 +82,18 @@ void PostedCreatePostDialog::createPost()
|
|||||||
post.mMeta.mMsgName = std::string(ui->titleEdit->text().toUtf8());
|
post.mMeta.mMsgName = std::string(ui->titleEdit->text().toUtf8());
|
||||||
post.mMeta.mAuthorId = authorId;
|
post.mMeta.mAuthorId = authorId;
|
||||||
|
|
||||||
|
QByteArray ba;
|
||||||
|
QBuffer buffer(&ba);
|
||||||
|
|
||||||
|
if(!picture.isNull())
|
||||||
|
{
|
||||||
|
// send posted image
|
||||||
|
|
||||||
|
buffer.open(QIODevice::WriteOnly);
|
||||||
|
picture.save(&buffer, "PNG"); // writes image into ba in PNG format
|
||||||
|
post.mImage.copy((uint8_t *) ba.data(), ba.size());
|
||||||
|
}
|
||||||
|
|
||||||
if(ui->titleEdit->text().isEmpty()) {
|
if(ui->titleEdit->text().isEmpty()) {
|
||||||
/* error message */
|
/* error message */
|
||||||
QMessageBox::warning(this, "RetroShare", tr("Please add a Title"), QMessageBox::Ok, QMessageBox::Ok);
|
QMessageBox::warning(this, "RetroShare", tr("Please add a Title"), QMessageBox::Ok, QMessageBox::Ok);
|
||||||
@ -90,3 +106,16 @@ void PostedCreatePostDialog::createPost()
|
|||||||
|
|
||||||
accept();
|
accept();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PostedCreatePostDialog::addPicture()
|
||||||
|
{
|
||||||
|
QPixmap img = misc::getOpenThumbnailedPicture(this, tr("Load thumbnail picture"), 800, 600);
|
||||||
|
|
||||||
|
if (img.isNull())
|
||||||
|
return;
|
||||||
|
|
||||||
|
picture = img;
|
||||||
|
|
||||||
|
// to show the selected
|
||||||
|
ui->imageLabel->setPixmap(picture);
|
||||||
|
}
|
@ -42,8 +42,12 @@ public:
|
|||||||
explicit PostedCreatePostDialog(TokenQueue* tokenQ, RsPosted* posted, const RsGxsGroupId& grpId, QWidget *parent = 0);
|
explicit PostedCreatePostDialog(TokenQueue* tokenQ, RsPosted* posted, const RsGxsGroupId& grpId, QWidget *parent = 0);
|
||||||
~PostedCreatePostDialog();
|
~PostedCreatePostDialog();
|
||||||
|
|
||||||
|
QPixmap picture;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void createPost();
|
void createPost();
|
||||||
|
void addPicture();
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString mLink;
|
QString mLink;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>575</width>
|
<width>575</width>
|
||||||
<height>371</height>
|
<height>467</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@ -47,7 +47,7 @@
|
|||||||
<property name="frameShadow">
|
<property name="frameShadow">
|
||||||
<enum>QFrame::Raised</enum>
|
<enum>QFrame::Raised</enum>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="mainFrameGLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="0" column="0" colspan="3">
|
<item row="0" column="0" colspan="3">
|
||||||
<widget class="StyledLabel" name="info_label">
|
<widget class="StyledLabel" name="info_label">
|
||||||
<property name="palette">
|
<property name="palette">
|
||||||
@ -128,75 +128,108 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0" colspan="3">
|
|
||||||
<layout class="QGridLayout" name="titleGLayout">
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QLineEdit" name="titleEdit"/>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="titleLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Title</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="linkLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Link</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QLineEdit" name="linkEdit"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0" colspan="3">
|
<item row="2" column="0" colspan="3">
|
||||||
<layout class="QHBoxLayout" name="signedHLayout">
|
<widget class="QTabWidget" name="tabWidget">
|
||||||
<item>
|
<property name="currentIndex">
|
||||||
<spacer name="signedHSpacer">
|
<number>0</number>
|
||||||
<property name="orientation">
|
</property>
|
||||||
<enum>Qt::Horizontal</enum>
|
<widget class="QWidget" name="tab">
|
||||||
</property>
|
<attribute name="title">
|
||||||
<property name="sizeType">
|
<string>Picture</string>
|
||||||
<enum>QSizePolicy::MinimumExpanding</enum>
|
</attribute>
|
||||||
</property>
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
<property name="sizeHint" stdset="0">
|
<item row="0" column="1">
|
||||||
<size>
|
<spacer name="horizontalSpacer">
|
||||||
<width>78</width>
|
<property name="orientation">
|
||||||
<height>17</height>
|
<enum>Qt::Horizontal</enum>
|
||||||
</size>
|
</property>
|
||||||
</property>
|
<property name="sizeHint" stdset="0">
|
||||||
</spacer>
|
<size>
|
||||||
</item>
|
<width>447</width>
|
||||||
<item>
|
<height>20</height>
|
||||||
<widget class="QLabel" name="signedLabel">
|
</size>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>Signed by: </string>
|
</spacer>
|
||||||
</property>
|
</item>
|
||||||
</widget>
|
<item row="0" column="0">
|
||||||
</item>
|
<widget class="QPushButton" name="pushButton">
|
||||||
<item>
|
<property name="text">
|
||||||
<widget class="GxsIdChooser" name="idChooser"/>
|
<string>Add Picture</string>
|
||||||
</item>
|
</property>
|
||||||
</layout>
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0" colspan="2">
|
||||||
|
<widget class="QGroupBox" name="groupBox">
|
||||||
|
<property name="title">
|
||||||
|
<string>Preview</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_4">
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QLabel" name="imageLabel">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>250</width>
|
||||||
|
<height>200</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>800</width>
|
||||||
|
<height>200</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="scaledContents">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<spacer name="horizontalSpacer_2">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="2">
|
||||||
|
<spacer name="horizontalSpacer_3">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWidget" name="tab_2">
|
||||||
|
<attribute name="title">
|
||||||
|
<string>Notes</string>
|
||||||
|
</attribute>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_3">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="MimeTextEdit" name="notesTextEdit"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0" colspan="3">
|
<item row="3" column="0">
|
||||||
<layout class="QVBoxLayout" name="notesLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="notesLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Notes</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="MimeTextEdit" name="notesTextEdit"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="0">
|
|
||||||
<spacer name="buttonHSpacer">
|
<spacer name="buttonHSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
@ -209,14 +242,20 @@
|
|||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="1">
|
<item row="3" column="1">
|
||||||
<widget class="QPushButton" name="submitButton">
|
<widget class="QPushButton" name="submitButton">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Submit</string>
|
<string>Submit</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="2">
|
<item row="3" column="2">
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
@ -232,12 +271,51 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="1" column="0" colspan="3">
|
||||||
|
<layout class="QGridLayout" name="titleGLayout">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="titleLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Title</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QLineEdit" name="titleEdit"/>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="linkLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Link</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QLineEdit" name="linkEdit"/>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="GxsIdChooser" name="idChooser"/>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="signedLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Post as</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>StyledLabel</class>
|
||||||
|
<extends>QLabel</extends>
|
||||||
|
<header>gui/common/StyledLabel.h</header>
|
||||||
|
</customwidget>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>HeaderFrame</class>
|
<class>HeaderFrame</class>
|
||||||
<extends>QFrame</extends>
|
<extends>QFrame</extends>
|
||||||
@ -254,11 +332,6 @@
|
|||||||
<extends>QComboBox</extends>
|
<extends>QComboBox</extends>
|
||||||
<header>gui/gxs/GxsIdChooser.h</header>
|
<header>gui/gxs/GxsIdChooser.h</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
<customwidget>
|
|
||||||
<class>StyledLabel</class>
|
|
||||||
<extends>QLabel</extends>
|
|
||||||
<header>gui/common/StyledLabel.h</header>
|
|
||||||
</customwidget>
|
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections>
|
<connections>
|
||||||
|
@ -19,11 +19,14 @@
|
|||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
#include <QDateTime>
|
#include <QDateTime>
|
||||||
|
#include <QMenu>
|
||||||
#include <QStyle>
|
#include <QStyle>
|
||||||
|
|
||||||
#include "rshare.h"
|
#include "rshare.h"
|
||||||
#include "PostedItem.h"
|
#include "PostedItem.h"
|
||||||
#include "gui/feeds/FeedHolder.h"
|
#include "gui/feeds/FeedHolder.h"
|
||||||
|
#include "util/misc.h"
|
||||||
|
|
||||||
#include "ui_PostedItem.h"
|
#include "ui_PostedItem.h"
|
||||||
|
|
||||||
#include <retroshare/rsposted.h>
|
#include <retroshare/rsposted.h>
|
||||||
@ -47,6 +50,9 @@ PostedItem::PostedItem(FeedHolder *feedHolder, uint32_t feedId, const RsPostedGr
|
|||||||
{
|
{
|
||||||
setup();
|
setup();
|
||||||
|
|
||||||
|
mMessageId = post.mMeta.mMsgId;
|
||||||
|
|
||||||
|
|
||||||
setGroup(group, false);
|
setGroup(group, false);
|
||||||
setPost(post);
|
setPost(post);
|
||||||
requestComment();
|
requestComment();
|
||||||
@ -83,7 +89,9 @@ void PostedItem::setup()
|
|||||||
ui->fromLabel->clear();
|
ui->fromLabel->clear();
|
||||||
ui->siteLabel->clear();
|
ui->siteLabel->clear();
|
||||||
ui->newCommentLabel->hide();
|
ui->newCommentLabel->hide();
|
||||||
|
ui->frame_picture->hide();
|
||||||
ui->commLabel->hide();
|
ui->commLabel->hide();
|
||||||
|
ui->frame_notes->hide();
|
||||||
|
|
||||||
/* general ones */
|
/* general ones */
|
||||||
connect(ui->clearButton, SIGNAL(clicked()), this, SLOT(removeItem()));
|
connect(ui->clearButton, SIGNAL(clicked()), this, SLOT(removeItem()));
|
||||||
@ -94,9 +102,18 @@ void PostedItem::setup()
|
|||||||
connect(ui->commentButton, SIGNAL( clicked()), this, SLOT(loadComments()));
|
connect(ui->commentButton, SIGNAL( clicked()), this, SLOT(loadComments()));
|
||||||
connect(ui->voteUpButton, SIGNAL(clicked()), this, SLOT(makeUpVote()));
|
connect(ui->voteUpButton, SIGNAL(clicked()), this, SLOT(makeUpVote()));
|
||||||
connect(ui->voteDownButton, SIGNAL(clicked()), this, SLOT( makeDownVote()));
|
connect(ui->voteDownButton, SIGNAL(clicked()), this, SLOT( makeDownVote()));
|
||||||
|
connect(ui->expandButton, SIGNAL(clicked()), this, SLOT( toggle()));
|
||||||
|
connect(ui->notesButton, SIGNAL(clicked()), this, SLOT( toggleNotes()));
|
||||||
|
|
||||||
connect(ui->readButton, SIGNAL(toggled(bool)), this, SLOT(readToggled(bool)));
|
connect(ui->readButton, SIGNAL(toggled(bool)), this, SLOT(readToggled(bool)));
|
||||||
|
|
||||||
|
QAction *CopyLinkAction = new QAction(QIcon(""),tr("Copy RetroShare Link"), this);
|
||||||
|
connect(CopyLinkAction, SIGNAL(triggered()), this, SLOT(copyMessageLink()));
|
||||||
|
|
||||||
|
QMenu *menu = new QMenu();
|
||||||
|
menu->addAction(CopyLinkAction);
|
||||||
|
ui->shareButton->setMenu(menu);
|
||||||
|
|
||||||
ui->clearButton->hide();
|
ui->clearButton->hide();
|
||||||
ui->readAndClearButton->hide();
|
ui->readAndClearButton->hide();
|
||||||
}
|
}
|
||||||
@ -206,7 +223,7 @@ void PostedItem::loadComment(const uint32_t &token)
|
|||||||
if (comNb == 1) {
|
if (comNb == 1) {
|
||||||
sComButText = sComButText.append("(1)");
|
sComButText = sComButText.append("(1)");
|
||||||
} else if (comNb > 1) {
|
} else if (comNb > 1) {
|
||||||
sComButText = tr("Comments").append("(%1)").arg(comNb);
|
sComButText = tr("Comments").append(" (%1)").arg(comNb);
|
||||||
}
|
}
|
||||||
ui->commentButton->setText(sComButText);
|
ui->commentButton->setText(sComButText);
|
||||||
}
|
}
|
||||||
@ -220,10 +237,28 @@ void PostedItem::fill()
|
|||||||
|
|
||||||
mInFill = true;
|
mInFill = true;
|
||||||
|
|
||||||
|
if(mPost.mImage.mData != NULL)
|
||||||
|
{
|
||||||
|
QPixmap pixmap;
|
||||||
|
pixmap.loadFromData(mPost.mImage.mData, mPost.mImage.mSize, "PNG");
|
||||||
|
// Wiping data - as its been passed to thumbnail.
|
||||||
|
|
||||||
|
QPixmap sqpixmap = pixmap.scaled(800, 600, Qt::KeepAspectRatio, Qt::SmoothTransformation);
|
||||||
|
ui->pictureLabel->setPixmap(sqpixmap);
|
||||||
|
|
||||||
|
ui->thumbnailLabel->setPixmap(pixmap);
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
ui->expandButton->setDisabled(true);
|
||||||
|
}
|
||||||
|
|
||||||
QDateTime qtime;
|
QDateTime qtime;
|
||||||
qtime.setTime_t(mPost.mMeta.mPublishTs);
|
qtime.setTime_t(mPost.mMeta.mPublishTs);
|
||||||
QString timestamp = qtime.toString("hh:mm dd-MMM-yyyy");
|
QString timestamp = qtime.toString("hh:mm dd-MMM-yyyy");
|
||||||
ui->dateLabel->setText(timestamp);
|
QString timestamp2 = misc::timeRelativeToNow(mPost.mMeta.mPublishTs);
|
||||||
|
ui->dateLabel->setText(timestamp2);
|
||||||
|
ui->dateLabel->setToolTip(timestamp);
|
||||||
|
|
||||||
ui->fromLabel->setId(mPost.mMeta.mAuthorId);
|
ui->fromLabel->setId(mPost.mMeta.mAuthorId);
|
||||||
|
|
||||||
// Use QUrl to check/parse our URL
|
// Use QUrl to check/parse our URL
|
||||||
@ -256,9 +291,14 @@ void PostedItem::fill()
|
|||||||
|
|
||||||
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:#2255AA;\"> %2 </span></a>").arg(siteurl).arg(siteurl);
|
||||||
|
|
||||||
|
ui->titleLabel->setText(urlstr);
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
ui->titleLabel->setText(messageName());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ui->titleLabel->setText(urlstr);
|
|
||||||
ui->siteLabel->setText(sitestr);
|
ui->siteLabel->setText(sitestr);
|
||||||
|
|
||||||
//QString score = "Hot" + QString::number(post.mHotScore);
|
//QString score = "Hot" + QString::number(post.mHotScore);
|
||||||
@ -272,7 +312,7 @@ void PostedItem::fill()
|
|||||||
// FIX THIS UP LATER.
|
// FIX THIS UP LATER.
|
||||||
ui->notes->setText(QString::fromUtf8(mPost.mNotes.c_str()));
|
ui->notes->setText(QString::fromUtf8(mPost.mNotes.c_str()));
|
||||||
if(ui->notes->text().isEmpty())
|
if(ui->notes->text().isEmpty())
|
||||||
ui->frame_notes->hide();
|
ui->notesButton->hide();
|
||||||
// differences between Feed or Top of Comment.
|
// differences between Feed or Top of Comment.
|
||||||
if (mFeedHolder)
|
if (mFeedHolder)
|
||||||
{
|
{
|
||||||
@ -451,3 +491,55 @@ void PostedItem::readAndClearItem()
|
|||||||
readToggled(false);
|
readToggled(false);
|
||||||
removeItem();
|
removeItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PostedItem::toggle()
|
||||||
|
{
|
||||||
|
expand(ui->frame_picture->isHidden());
|
||||||
|
}
|
||||||
|
|
||||||
|
void PostedItem::doExpand(bool open)
|
||||||
|
{
|
||||||
|
if (open)
|
||||||
|
{
|
||||||
|
ui->frame_picture->show();
|
||||||
|
ui->expandButton->setIcon(QIcon(QString(":/images/decrease.png")));
|
||||||
|
ui->expandButton->setToolTip(tr("Hide"));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ui->frame_picture->hide();
|
||||||
|
ui->expandButton->setIcon(QIcon(QString(":/images/expand.png")));
|
||||||
|
ui->expandButton->setToolTip(tr("Expand"));
|
||||||
|
}
|
||||||
|
|
||||||
|
emit sizeChanged(this);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void PostedItem::copyMessageLink()
|
||||||
|
{
|
||||||
|
if (groupId().isNull() || mMessageId.isNull()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
RetroShareLink link = RetroShareLink::createGxsMessageLink(RetroShareLink::TYPE_POSTED, groupId(), mMessageId, messageName());
|
||||||
|
|
||||||
|
if (link.valid()) {
|
||||||
|
QList<RetroShareLink> urls;
|
||||||
|
urls.push_back(link);
|
||||||
|
RSLinkClipboard::copyLinks(urls);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void PostedItem::toggleNotes()
|
||||||
|
{
|
||||||
|
if (ui->notesButton->isChecked())
|
||||||
|
{
|
||||||
|
ui->frame_notes->show();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ui->frame_notes->hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
@ -30,6 +30,7 @@ namespace Ui {
|
|||||||
class PostedItem;
|
class PostedItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class FeedHolder;
|
||||||
class RsPostedPost;
|
class RsPostedPost;
|
||||||
|
|
||||||
class PostedItem : public GxsFeedItem
|
class PostedItem : public GxsFeedItem
|
||||||
@ -50,7 +51,7 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
/* FeedItem */
|
/* FeedItem */
|
||||||
virtual void doExpand(bool /*open*/) {}
|
virtual void doExpand(bool open);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void loadComments();
|
void loadComments();
|
||||||
@ -58,6 +59,9 @@ private slots:
|
|||||||
void makeDownVote();
|
void makeDownVote();
|
||||||
void readToggled(bool checked);
|
void readToggled(bool checked);
|
||||||
void readAndClearItem();
|
void readAndClearItem();
|
||||||
|
void toggle();
|
||||||
|
void copyMessageLink();
|
||||||
|
void toggleNotes();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void vote(const RsGxsGrpMsgIdPair& msgId, bool up);
|
void vote(const RsGxsGrpMsgIdPair& msgId, bool up);
|
||||||
@ -83,6 +87,7 @@ private:
|
|||||||
|
|
||||||
RsPostedGroup mGroup;
|
RsPostedGroup mGroup;
|
||||||
RsPostedPost mPost;
|
RsPostedPost mPost;
|
||||||
|
RsGxsMessageId mMessageId;
|
||||||
|
|
||||||
/** Qt Designer generated object */
|
/** Qt Designer generated object */
|
||||||
Ui::PostedItem *ui;
|
Ui::PostedItem *ui;
|
||||||
|
@ -6,15 +6,33 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>765</width>
|
<width>617</width>
|
||||||
<height>230</height>
|
<height>190</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string notr="true"/>
|
<string notr="true"/>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="PostedItemVLayout">
|
<property name="styleSheet">
|
||||||
<item>
|
<string notr="true"/>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_3">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="spacing">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item row="0" column="0">
|
||||||
<widget class="QFrame" name="mainFrame">
|
<widget class="QFrame" name="mainFrame">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||||
@ -23,7 +41,7 @@
|
|||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</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::Box</enum>
|
||||||
@ -31,44 +49,178 @@
|
|||||||
<property name="frameShadow">
|
<property name="frameShadow">
|
||||||
<enum>QFrame::Sunken</enum>
|
<enum>QFrame::Sunken</enum>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="mainFrameVLayout">
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
<item>
|
<property name="leftMargin">
|
||||||
<widget class="StyledLabel" name="titleLabel">
|
<number>0</number>
|
||||||
<property name="sizePolicy">
|
</property>
|
||||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Expanding">
|
<property name="topMargin">
|
||||||
<horstretch>0</horstretch>
|
<number>0</number>
|
||||||
<verstretch>0</verstretch>
|
</property>
|
||||||
</sizepolicy>
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="horizontalSpacing">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<item row="0" column="0" rowspan="2">
|
||||||
|
<widget class="QFrame" name="voteFrame">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true"/>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
<property name="frameShape">
|
||||||
<font>
|
<enum>QFrame::NoFrame</enum>
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="frameShadow">
|
||||||
<string notr="true">This is a very very very very loooooooooooooooonnnnnnnnnnnnnnnnng title don't you think? Yes it is and should wrap around I hope</string>
|
<enum>QFrame::Plain</enum>
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="openExternalLinks">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>3</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>3</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>3</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>3</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QToolButton" name="voteUpButton">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>24</width>
|
||||||
|
<height>24</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Vote up</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="Posted_images.qrc">
|
||||||
|
<normaloff>:/images/up-arrow.png</normaloff>:/images/up-arrow.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="iconSize">
|
||||||
|
<size>
|
||||||
|
<width>16</width>
|
||||||
|
<height>16</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="autoRaise">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="StyledLabel" name="scoreLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>0</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QToolButton" name="voteDownButton">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Vote down</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>\/</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="Posted_images.qrc">
|
||||||
|
<normaloff>:/images/down-arrow.png</normaloff>:/images/down-arrow.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="iconSize">
|
||||||
|
<size>
|
||||||
|
<width>16</width>
|
||||||
|
<height>16</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="autoRaise">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Expanding</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>5</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="0" column="1" rowspan="2">
|
||||||
<layout class="QHBoxLayout" name="newCommHLayout">
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
<property name="topMargin">
|
<property name="topMargin">
|
||||||
<number>0</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="newCommentLabel">
|
<widget class="QLabel" name="thumbnailLabel">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>100</width>
|
||||||
|
<height>75</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>100</width>
|
||||||
|
<height>75</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true"/>
|
||||||
|
</property>
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::NoFrame</enum>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>New Comment:</string>
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="pixmap">
|
||||||
|
<pixmap resource="Posted_images.qrc">:/images/thumb-default.png</pixmap>
|
||||||
</property>
|
</property>
|
||||||
<property name="scaledContents">
|
<property name="scaledContents">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
@ -76,265 +228,445 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="ElidedLabel" name="commLabel">
|
<spacer name="verticalSpacer_2">
|
||||||
<property name="text">
|
|
||||||
<string>Comment Value</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="buttonHLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="StyledLabel" name="scoreLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>0</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QToolButton" name="voteUpButton">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>24</width>
|
|
||||||
<height>24</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Vote up</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../images.qrc">
|
|
||||||
<normaloff>:/images/vote_up.png</normaloff>:/images/vote_up.png</iconset>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QToolButton" name="voteDownButton">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>24</width>
|
|
||||||
<height>24</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Vote down</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>\/</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../images.qrc">
|
|
||||||
<normaloff>:/images/vote_down.png</normaloff>:/images/vote_down.png</iconset>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="readButton">
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>24</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="focusPolicy">
|
|
||||||
<enum>Qt::NoFocus</enum>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Toggle Message Read Status</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../images.qrc">
|
|
||||||
<normaloff>:/images/message-state-unread.png</normaloff>:/images/message-state-unread.png</iconset>
|
|
||||||
</property>
|
|
||||||
<property name="checkable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="checked">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="flat">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="newLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>New</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="commentButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Comments</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="dateLabel">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string notr="true">You eyes only</string>
|
|
||||||
</property>
|
|
||||||
<property name="openExternalLinks">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="fromBoldLabel">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>By</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="GxsIdLabel" name="fromLabel">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string notr="true">Signed by</string>
|
|
||||||
</property>
|
|
||||||
<property name="openExternalLinks">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="siteBoldLabel">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
|
||||||
<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>
|
|
||||||
<widget class="QLabel" name="siteLabel">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string notr="true">Signed by</string>
|
|
||||||
</property>
|
|
||||||
<property name="openExternalLinks">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer">
|
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>118</width>
|
<width>50</width>
|
||||||
<height>20</height>
|
<height>5</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="2">
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="readAndClearButton">
|
<widget class="StyledLabel" name="titleLabel">
|
||||||
<property name="maximumSize">
|
<property name="sizePolicy">
|
||||||
<size>
|
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Expanding">
|
||||||
<width>24</width>
|
<horstretch>0</horstretch>
|
||||||
<height>16777215</height>
|
<verstretch>0</verstretch>
|
||||||
</size>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="focusPolicy">
|
<property name="font">
|
||||||
<enum>Qt::NoFocus</enum>
|
<font>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
<property name="text">
|
||||||
<string>Set as read and remove item</string>
|
<string notr="true">This is a very very very very loooooooooooooooonnnnnnnnnnnnnnnnng title don't you think? Yes it is and should wrap around I hope</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="alignment">
|
||||||
<iconset resource="../images.qrc">
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||||
<normaloff>:/images/cancel.png</normaloff>:/images/cancel.png</iconset>
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="openExternalLinks">
|
||||||
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="clearButton">
|
<layout class="QHBoxLayout" name="newCommHLayout">
|
||||||
<property name="maximumSize">
|
<property name="topMargin">
|
||||||
<size>
|
<number>0</number>
|
||||||
<width>24</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="focusPolicy">
|
<item>
|
||||||
<enum>Qt::NoFocus</enum>
|
<widget class="QLabel" name="newCommentLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>New Comment:</string>
|
||||||
|
</property>
|
||||||
|
<property name="scaledContents">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="ElidedLabel" name="commLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Comment Value</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="2">
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="sizeConstraint">
|
||||||
|
<enum>QLayout::SetDefaultConstraint</enum>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>3</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
<property name="leftMargin">
|
||||||
<string>Remove Item</string>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="rightMargin">
|
||||||
<iconset resource="../images.qrc">
|
<number>6</number>
|
||||||
<normaloff>:/images/close_normal.png</normaloff>:/images/close_normal.png</iconset>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
<item>
|
||||||
|
<widget class="QLabel" name="fromBoldLabel">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Posted by</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="GxsIdLabel" name="fromLabel">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">Signed by</string>
|
||||||
|
</property>
|
||||||
|
<property name="openExternalLinks">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="dateLabel">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">You eyes only</string>
|
||||||
|
</property>
|
||||||
|
<property name="openExternalLinks">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</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>
|
||||||
|
<widget class="QLabel" name="siteLabel">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">site</string>
|
||||||
|
</property>
|
||||||
|
<property name="openExternalLinks">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_4">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Expanding</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>70</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="buttonHLayout">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>3</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QToolButton" name="expandButton">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="Posted_images.qrc">
|
||||||
|
<normaloff>:/images/expand.png</normaloff>:/images/expand.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="autoRaise">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="readButton">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>24</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="focusPolicy">
|
||||||
|
<enum>Qt::NoFocus</enum>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Toggle Message Read Status</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../images.qrc">
|
||||||
|
<normaloff>:/images/message-state-unread.png</normaloff>:/images/message-state-unread.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="flat">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="newLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>New</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QToolButton" name="commentButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>Comments</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="Posted_images.qrc">
|
||||||
|
<normaloff>:/images/comments.png</normaloff>:/images/comments.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="toolButtonStyle">
|
||||||
|
<enum>Qt::ToolButtonTextBesideIcon</enum>
|
||||||
|
</property>
|
||||||
|
<property name="autoRaise">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="shareButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>Share</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="Posted_images.qrc">
|
||||||
|
<normaloff>:/images/share.png</normaloff>:/images/share.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="flat">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QToolButton" name="notesButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>Notes</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="Posted_images.qrc">
|
||||||
|
<normaloff>:/images/notes.png</normaloff>:/images/notes.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="toolButtonStyle">
|
||||||
|
<enum>Qt::ToolButtonTextBesideIcon</enum>
|
||||||
|
</property>
|
||||||
|
<property name="autoRaise">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>118</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="readAndClearButton">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>24</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="focusPolicy">
|
||||||
|
<enum>Qt::NoFocus</enum>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Set as read and remove item</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../images.qrc">
|
||||||
|
<normaloff>:/images/cancel.png</normaloff>:/images/cancel.png</iconset>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="clearButton">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>24</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="focusPolicy">
|
||||||
|
<enum>Qt::NoFocus</enum>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Remove Item</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../images.qrc">
|
||||||
|
<normaloff>:/images/close_normal.png</normaloff>:/images/close_normal.png</iconset>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
<zorder>titleLabel</zorder>
|
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="1" column="0">
|
||||||
|
<widget class="QFrame" name="frame_picture">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>800</width>
|
||||||
|
<height>600</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::StyledPanel</enum>
|
||||||
|
</property>
|
||||||
|
<property name="frameShadow">
|
||||||
|
<enum>QFrame::Raised</enum>
|
||||||
|
</property>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_2">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>257</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="pictureLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>TextLabel</string>
|
||||||
|
</property>
|
||||||
|
<property name="scaledContents">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_3">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>257</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
<widget class="QFrame" name="frame_notes">
|
<widget class="QFrame" name="frame_notes">
|
||||||
<property name="frameShape">
|
<property name="frameShape">
|
||||||
<enum>QFrame::NoFrame</enum>
|
<enum>QFrame::Box</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="frameShadow">
|
<property name="frameShadow">
|
||||||
<enum>QFrame::Sunken</enum>
|
<enum>QFrame::Sunken</enum>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<property name="margin">
|
<property name="leftMargin">
|
||||||
<number>1</number>
|
<number>3</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>3</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>3</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>3</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>1</number>
|
<number>1</number>
|
||||||
@ -374,6 +706,7 @@
|
|||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../images.qrc"/>
|
<include location="../images.qrc"/>
|
||||||
|
<include location="Posted_images.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
@ -11,5 +11,13 @@
|
|||||||
<file>images/hot_24.png</file>
|
<file>images/hot_24.png</file>
|
||||||
<file>images/new_24.png</file>
|
<file>images/new_24.png</file>
|
||||||
<file>images/posted_32_new.png</file>
|
<file>images/posted_32_new.png</file>
|
||||||
|
<file>images/expand.png</file>
|
||||||
|
<file>images/decrease.png</file>
|
||||||
|
<file>images/down-arrow.png</file>
|
||||||
|
<file>images/up-arrow.png</file>
|
||||||
|
<file>images/comments.png</file>
|
||||||
|
<file>images/thumb-default.png</file>
|
||||||
|
<file>images/share.png</file>
|
||||||
|
<file>images/notes.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
BIN
retroshare-gui/src/gui/Posted/images/comments.png
Normal file
After Width: | Height: | Size: 3.8 KiB |
BIN
retroshare-gui/src/gui/Posted/images/decrease.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
retroshare-gui/src/gui/Posted/images/down-arrow.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
retroshare-gui/src/gui/Posted/images/expand.png
Normal file
After Width: | Height: | Size: 3.9 KiB |
BIN
retroshare-gui/src/gui/Posted/images/notes.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
retroshare-gui/src/gui/Posted/images/share.png
Normal file
After Width: | Height: | Size: 2.7 KiB |
BIN
retroshare-gui/src/gui/Posted/images/thumb-default.png
Normal file
After Width: | Height: | Size: 9.9 KiB |
BIN
retroshare-gui/src/gui/Posted/images/up-arrow.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
@ -596,17 +596,6 @@ PostedCreatePostDialog QLabel#info_label {
|
|||||||
background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #FFFFD7, stop:1 #FFFFB2);
|
background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #FFFFD7, stop:1 #FFFFB2);
|
||||||
}
|
}
|
||||||
|
|
||||||
PostedItem QFrame#frame {
|
|
||||||
border: 2px solid #CCCCCC;
|
|
||||||
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #EEEEEE, stop: 1 #CCCCCC);
|
|
||||||
border-radius: 10px
|
|
||||||
}
|
|
||||||
|
|
||||||
PostedItem QLabel#notes {
|
|
||||||
border: 2px solid #CCCCCC;
|
|
||||||
border-radius: 10px
|
|
||||||
}
|
|
||||||
|
|
||||||
QLabel#sharekeyinfo_label{
|
QLabel#sharekeyinfo_label{
|
||||||
border: 1px solid #DCDC41;
|
border: 1px solid #DCDC41;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
@ -812,6 +801,7 @@ PostedListWidget QToolButton#subscribeToolButton {
|
|||||||
color: white;
|
color: white;
|
||||||
background: #0099cc;
|
background: #0099cc;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
|
max-height: 27px;
|
||||||
}
|
}
|
||||||
|
|
||||||
PostedListWidget QToolButton#subscribeToolButton:hover {
|
PostedListWidget QToolButton#subscribeToolButton:hover {
|
||||||
@ -830,6 +820,7 @@ GxsForumThreadWidget QToolButton#subscribeToolButton {
|
|||||||
color: white;
|
color: white;
|
||||||
background: #0099cc;
|
background: #0099cc;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
|
max-height: 27px;
|
||||||
}
|
}
|
||||||
|
|
||||||
GxsForumThreadWidget QToolButton#subscribeToolButton:hover {
|
GxsForumThreadWidget QToolButton#subscribeToolButton:hover {
|
||||||
@ -851,6 +842,7 @@ GxsChannelPostsWidget QToolButton#subscribeToolButton {
|
|||||||
color: white;
|
color: white;
|
||||||
background: #0099cc;
|
background: #0099cc;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
|
max-height: 27px;
|
||||||
}
|
}
|
||||||
|
|
||||||
GxsChannelPostsWidget QToolButton#subscribeToolButton:hover {
|
GxsChannelPostsWidget QToolButton#subscribeToolButton:hover {
|
||||||
@ -882,4 +874,40 @@ GxsChannelPostsWidget QToolButton#subscribeToolButton::menu-arrow {
|
|||||||
|
|
||||||
GxsChannelPostsWidget QToolButton#subscribeToolButton::menu-button {
|
GxsChannelPostsWidget QToolButton#subscribeToolButton::menu-button {
|
||||||
image: none;
|
image: none;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
PostedItem QFrame#frame_notes {
|
||||||
|
background: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
PostedItem QLabel#notes {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
PostedItem QFrame#voteFrame {
|
||||||
|
background: #f8f9fa;
|
||||||
|
}
|
||||||
|
|
||||||
|
PostedItem QFrame#mainFrame{
|
||||||
|
background: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
PostedItem QFrame#frame_picture{
|
||||||
|
background: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
PostedItem QLabel#thumbnailLabel{
|
||||||
|
border: 2px solid #CCCCCC;
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
PostedItem QLabel#fromBoldLabel, QLabel#fromLabel, QLabel#dateLabel, QLabel#siteBoldLabel {
|
||||||
|
color: #787c7e;
|
||||||
|
}
|
||||||
|
|
||||||
|
PostedItem QToolButton#commentButton, QPushButton#shareButton, QToolButton#notesButton{
|
||||||
|
font-size: 12px;
|
||||||
|
color: #878a8c;
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|