fixed merge upstream/master
|
@ -6,8 +6,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>951</width>
|
||||
<height>578</height>
|
||||
<width>600</width>
|
||||
<height>500</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include "ui_DetailsDialog.h"
|
||||
#include <retroshare/rstypes.h>
|
||||
|
||||
class FileChunksInfo ;
|
||||
struct FileChunksInfo ;
|
||||
|
||||
class DetailsDialog : public QDialog
|
||||
{
|
||||
|
|
|
@ -27,8 +27,8 @@
|
|||
#include "RsAutoUpdatePage.h"
|
||||
#include <retroshare/rstypes.h>
|
||||
|
||||
class FileChunksInfo ;
|
||||
class FileInfo ;
|
||||
struct FileChunksInfo ;
|
||||
struct FileInfo ;
|
||||
|
||||
class FileTransferInfoWidget : public RsAutoUpdatePage
|
||||
{
|
||||
|
|
|
@ -18,6 +18,33 @@
|
|||
* *
|
||||
*******************************************************************************/
|
||||
|
||||
#include "TransfersDialog.h"
|
||||
|
||||
#include "gui/notifyqt.h"
|
||||
#include "gui/RetroShareLink.h"
|
||||
#include "gui/common/FilesDefs.h"
|
||||
#include "gui/common/RsCollection.h"
|
||||
#include "gui/common/RSTreeView.h"
|
||||
#include "gui/common/RsUrlHandler.h"
|
||||
#include "gui/FileTransfer/DetailsDialog.h"
|
||||
#include "gui/FileTransfer/DLListDelegate.h"
|
||||
#include "gui/FileTransfer/FileTransferInfoWidget.h"
|
||||
#include "gui/FileTransfer/SearchDialog.h"
|
||||
#include "gui/FileTransfer/SharedFilesDialog.h"
|
||||
#include "gui/FileTransfer/TransferUserNotify.h"
|
||||
#include "gui/FileTransfer/ULListDelegate.h"
|
||||
#include "gui/FileTransfer/xprogressbar.h"
|
||||
#include "gui/settings/rsharesettings.h"
|
||||
#include "util/misc.h"
|
||||
#include "util/QtVersion.h"
|
||||
#include "util/RsFile.h"
|
||||
|
||||
#include "retroshare/rsdisc.h"
|
||||
#include "retroshare/rsfiles.h"
|
||||
#include "retroshare/rspeers.h"
|
||||
#include "retroshare/rsplugin.h"
|
||||
#include "retroshare/rsturtle.h"
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QDir>
|
||||
#include <QFileDialog>
|
||||
|
@ -29,38 +56,10 @@
|
|||
#include <QShortcut>
|
||||
#include <QStandardItemModel>
|
||||
|
||||
#include <gui/common/FilesDefs.h>
|
||||
#include <gui/common/RsCollection.h>
|
||||
#include <gui/common/RsUrlHandler.h>
|
||||
#include <gui/common/RSTreeView.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <limits>
|
||||
#include <math.h>
|
||||
|
||||
#include "TransfersDialog.h"
|
||||
#include <gui/RetroShareLink.h>
|
||||
#include "DetailsDialog.h"
|
||||
#include "DLListDelegate.h"
|
||||
#include "ULListDelegate.h"
|
||||
#include "FileTransferInfoWidget.h"
|
||||
#include <gui/FileTransfer/SearchDialog.h>
|
||||
#include <gui/FileTransfer/SharedFilesDialog.h>
|
||||
#include "xprogressbar.h"
|
||||
#include <gui/settings/rsharesettings.h>
|
||||
#include "util/misc.h"
|
||||
#include <gui/common/RsCollection.h>
|
||||
#include "TransferUserNotify.h"
|
||||
#include "util/QtVersion.h"
|
||||
#include "util/RsFile.h"
|
||||
|
||||
#include <retroshare/rsfiles.h>
|
||||
#include <retroshare/rspeers.h>
|
||||
#include <retroshare/rsdisc.h>
|
||||
#include <retroshare/rsplugin.h>
|
||||
|
||||
#include <retroshare/rsturtle.h>
|
||||
|
||||
/* Images for context menu icons */
|
||||
#define IMAGE_INFO ":/images/fileinfo.png"
|
||||
#define IMAGE_CANCEL ":/images/delete.png"
|
||||
|
@ -142,7 +141,7 @@ public:
|
|||
#endif
|
||||
return mDownloads[entry].peers.size();
|
||||
}
|
||||
int columnCount(const QModelIndex &parent = QModelIndex()) const
|
||||
int columnCount(const QModelIndex &/*parent*/ = QModelIndex()) const
|
||||
{
|
||||
return COLUMN_COUNT ;
|
||||
}
|
||||
|
@ -250,7 +249,7 @@ public:
|
|||
return createIndex(entry,child.column(),parent_ref) ;
|
||||
}
|
||||
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const
|
||||
QVariant headerData(int section, Qt::Orientation /*orientation*/, int role = Qt::DisplayRole) const
|
||||
{
|
||||
if(role != Qt::DisplayRole)
|
||||
return QVariant();
|
||||
|
@ -279,7 +278,7 @@ public:
|
|||
if(!index.isValid())
|
||||
return QVariant();
|
||||
|
||||
int coln = index.column() ;
|
||||
//int coln = index.column() ;
|
||||
|
||||
switch(role)
|
||||
{
|
||||
|
@ -1007,6 +1006,7 @@ TransfersDialog::TransfersDialog(QWidget *parent)
|
|||
connect(collViewAct,SIGNAL(triggered()),this,SLOT(collView()));
|
||||
collOpenAct = new QAction(QIcon(IMAGE_COLLOPEN), tr( "Download from collection file..." ), this );
|
||||
connect(collOpenAct, SIGNAL(triggered()), this, SLOT(collOpen()));
|
||||
connect(NotifyQt::getInstance(), SIGNAL(downloadComplete(QString)), this, SLOT(collAutoOpen(QString)));
|
||||
|
||||
/** Setup the actions for the download header context menu */
|
||||
showDLSizeAct= new QAction(tr("Size"),this);
|
||||
|
@ -2823,6 +2823,35 @@ void TransfersDialog::collOpen()
|
|||
}
|
||||
}
|
||||
|
||||
void TransfersDialog::collAutoOpen(const QString &fileHash)
|
||||
{
|
||||
if (Settings->valueFromGroup("Transfer","AutoDLColl").toBool())
|
||||
{
|
||||
RsFileHash hash = RsFileHash(fileHash.toStdString());
|
||||
FileInfo info;
|
||||
if (rsFiles->FileDetails(hash, RS_FILE_HINTS_DOWNLOAD, info)) {
|
||||
|
||||
/* make path for downloaded files */
|
||||
if (info.downloadStatus == FT_STATE_COMPLETE) {
|
||||
std::string path;
|
||||
path = info.path + "/" + info.fname;
|
||||
|
||||
/* open file with a suitable application */
|
||||
QFileInfo qinfo;
|
||||
qinfo.setFile(QString::fromUtf8(path.c_str()));
|
||||
if (qinfo.exists()) {
|
||||
if (qinfo.absoluteFilePath().endsWith(RsCollection::ExtensionString)) {
|
||||
RsCollection collection;
|
||||
if (collection.load(qinfo.absoluteFilePath(), false)) {
|
||||
collection.autoDownloadFiles();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void TransfersDialog::setShowDLSizeColumn (bool show) { ui.downloadList->setColumnHidden(COLUMN_SIZE, !show); }
|
||||
void TransfersDialog::setShowDLCompleteColumn (bool show) { ui.downloadList->setColumnHidden(COLUMN_COMPLETED, !show); }
|
||||
void TransfersDialog::setShowDLDLSpeedColumn (bool show) { ui.downloadList->setColumnHidden(COLUMN_DLSPEED, !show); }
|
||||
|
|
|
@ -144,6 +144,7 @@ private slots:
|
|||
void collModif();
|
||||
void collView();
|
||||
void collOpen();
|
||||
void collAutoOpen(const QString& fileHash);
|
||||
|
||||
void setShowDLSizeColumn(bool show);
|
||||
void setShowDLCompleteColumn(bool show);
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>978</width>
|
||||
<height>826</height>
|
||||
<width>633</width>
|
||||
<height>506</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
|
|
@ -69,19 +69,19 @@ HelpDialog::HelpDialog(QWidget *parent) :
|
|||
QFile licenseFile(QLatin1String(":/help/licence.html"));
|
||||
if (licenseFile.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||
QTextStream in(&licenseFile);
|
||||
ui->license->setText(in.readAll());
|
||||
ui->license->setHtml(in.readAll());
|
||||
}
|
||||
|
||||
QFile authorsFile(QLatin1String(":/help/authors.html"));
|
||||
if (authorsFile.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||
QTextStream in(&authorsFile);
|
||||
ui->authors->setText(in.readAll());
|
||||
ui->authors->setHtml(in.readAll());
|
||||
}
|
||||
|
||||
QFile thanksFile(QLatin1String(":/help/thanks.html"));
|
||||
if (thanksFile.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||
QTextStream in(&thanksFile);
|
||||
ui->thanks->setText(in.readAll());
|
||||
ui->thanks->setHtml(in.readAll());
|
||||
}
|
||||
|
||||
ui->version->setText(Rshare::retroshareVersion(true));
|
||||
|
|
|
@ -142,7 +142,7 @@ p, li { white-space: pre-wrap; }
|
|||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="acceptRichText">
|
||||
<bool>false</bool>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::TextBrowserInteraction</set>
|
||||
|
@ -183,7 +183,7 @@ p, li { white-space: pre-wrap; }
|
|||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="acceptRichText">
|
||||
<bool>false</bool>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::TextBrowserInteraction</set>
|
||||
|
@ -236,6 +236,9 @@ p, li { white-space: pre-wrap; }
|
|||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt; font-weight:600;">German: </span><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">Jan</span><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt; font-weight:600;"> </span><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">Keller</span><span style=" font-family:'MS Shell Dlg 2';"> &lt;</span><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">trilarion@users.sourceforge.net</span><span style=" font-family:'MS Shell Dlg 2';">&gt;</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-weight:600;">Polish: </span><span style=" font-family:'MS Shell Dlg 2';">Maciej Mrug</span></p></body></html></string>
|
||||
</property>
|
||||
<property name="overwriteMode">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="acceptRichText">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
|
@ -275,7 +278,7 @@ p, li { white-space: pre-wrap; }
|
|||
<enum>QTextEdit::WidgetWidth</enum>
|
||||
</property>
|
||||
<property name="acceptRichText">
|
||||
<bool>false</bool>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::TextBrowserInteraction</set>
|
||||
|
|
|
@ -285,7 +285,7 @@ void IdDetailsDialog::insertIdDetails(uint32_t token)
|
|||
|
||||
#endif
|
||||
|
||||
RsReputations::ReputationInfo info ;
|
||||
RsReputationInfo info;
|
||||
rsReputations->getReputationInfo(RsGxsId(data.mMeta.mGroupId),data.mPgpId,info) ;
|
||||
|
||||
#warning (csoler) Do we need to do this? This code is apparently not used.
|
||||
|
@ -302,23 +302,34 @@ void IdDetailsDialog::insertIdDetails(uint32_t token)
|
|||
ui->label_positive->setText(QString::number(info.mFriendsPositiveVotes));
|
||||
ui->label_negative->setText(QString::number(info.mFriendsNegativeVotes));
|
||||
|
||||
switch(info.mOverallReputationLevel)
|
||||
{
|
||||
case RsReputations::REPUTATION_LOCALLY_POSITIVE: ui->overallOpinion_TF->setText(tr("Positive")) ; break ;
|
||||
case RsReputations::REPUTATION_LOCALLY_NEGATIVE: ui->overallOpinion_TF->setText(tr("Negative (Banned by you)")) ; break ;
|
||||
case RsReputations::REPUTATION_REMOTELY_POSITIVE: ui->overallOpinion_TF->setText(tr("Positive (according to your friends)")) ; break ;
|
||||
case RsReputations::REPUTATION_REMOTELY_NEGATIVE: ui->overallOpinion_TF->setText(tr("Negative (according to your friends)")) ; break ;
|
||||
default:
|
||||
case RsReputations::REPUTATION_NEUTRAL: ui->overallOpinion_TF->setText(tr("Neutral")) ; break ;
|
||||
}
|
||||
|
||||
switch(info.mOwnOpinion)
|
||||
switch(info.mOverallReputationLevel)
|
||||
{
|
||||
case RsReputations::OPINION_NEGATIVE: ui->ownOpinion_CB->setCurrentIndex(0); break ;
|
||||
case RsReputations::OPINION_NEUTRAL : ui->ownOpinion_CB->setCurrentIndex(1); break ;
|
||||
case RsReputations::OPINION_POSITIVE: ui->ownOpinion_CB->setCurrentIndex(2); break ;
|
||||
default:
|
||||
std::cerr << "Unexpected value in own opinion: " << info.mOwnOpinion << std::endl;
|
||||
case RsReputationLevel::LOCALLY_POSITIVE:
|
||||
ui->overallOpinion_TF->setText(tr("Positive")); break;
|
||||
case RsReputationLevel::LOCALLY_NEGATIVE:
|
||||
ui->overallOpinion_TF->setText(tr("Negative (Banned by you)")); break;
|
||||
case RsReputationLevel::REMOTELY_POSITIVE:
|
||||
ui->overallOpinion_TF->setText(
|
||||
tr("Positive (according to your friends)"));
|
||||
break;
|
||||
case RsReputationLevel::REMOTELY_NEGATIVE:
|
||||
ui->overallOpinion_TF->setText(
|
||||
tr("Negative (according to your friends)"));
|
||||
break;
|
||||
case RsReputationLevel::NEUTRAL: // fallthrough
|
||||
default:
|
||||
ui->overallOpinion_TF->setText(tr("Neutral")); break;
|
||||
}
|
||||
|
||||
switch(info.mOwnOpinion)
|
||||
{
|
||||
case RsOpinion::NEGATIVE: ui->ownOpinion_CB->setCurrentIndex(0); break;
|
||||
case RsOpinion::NEUTRAL : ui->ownOpinion_CB->setCurrentIndex(1); break;
|
||||
case RsOpinion::POSITIVE: ui->ownOpinion_CB->setCurrentIndex(2); break;
|
||||
default:
|
||||
std::cerr << "Unexpected value in own opinion: "
|
||||
<< static_cast<uint32_t>(info.mOwnOpinion) << std::endl;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -330,19 +341,19 @@ void IdDetailsDialog::modifyReputation()
|
|||
#endif
|
||||
|
||||
RsGxsId id(ui->lineEdit_KeyId->text().toStdString());
|
||||
|
||||
RsReputations::Opinion op ;
|
||||
|
||||
switch(ui->ownOpinion_CB->currentIndex())
|
||||
{
|
||||
case 0: op = RsReputations::OPINION_NEGATIVE ; break ;
|
||||
case 1: op = RsReputations::OPINION_NEUTRAL ; break ;
|
||||
case 2: op = RsReputations::OPINION_POSITIVE ; break ;
|
||||
default:
|
||||
std::cerr << "Wrong value from opinion combobox. Bug??" << std::endl;
|
||||
|
||||
}
|
||||
rsReputations->setOwnOpinion(id,op) ;
|
||||
RsOpinion op;
|
||||
|
||||
switch(ui->ownOpinion_CB->currentIndex())
|
||||
{
|
||||
case 0: op = RsOpinion::NEGATIVE; break;
|
||||
case 1: op = RsOpinion::NEUTRAL ; break;
|
||||
case 2: op = RsOpinion::POSITIVE; break;
|
||||
default:
|
||||
std::cerr << "Wrong value from opinion combobox. Bug??" << std::endl;
|
||||
break;
|
||||
}
|
||||
rsReputations->setOwnOpinion(id,op);
|
||||
|
||||
#ifdef ID_DEBUG
|
||||
std::cerr << "IdDialog::modifyReputation() ID: " << id << " Mod: " << mod;
|
||||
|
|
|
@ -344,7 +344,9 @@ IdDialog::IdDialog(QWidget *parent) :
|
|||
ui->idTreeWidget->setColumnWidth(RSID_COL_IDTYPE, 18 * fontWidth);
|
||||
ui->idTreeWidget->setColumnWidth(RSID_COL_VOTES, 2 * fontWidth);
|
||||
|
||||
ui->idTreeWidget->setItemDelegateForColumn(RSID_COL_VOTES,new ReputationItemDelegate(RsReputations::ReputationLevel(0xff))) ;
|
||||
ui->idTreeWidget->setItemDelegateForColumn(
|
||||
RSID_COL_VOTES,
|
||||
new ReputationItemDelegate(RsReputationLevel(0xff)));
|
||||
|
||||
/* Set header resize modes and initial section sizes */
|
||||
QHeaderView * idheader = ui->idTreeWidget->header();
|
||||
|
@ -1444,8 +1446,9 @@ bool IdDialog::fillIdListItem(const RsGxsIdGroup& data, QTreeWidgetItem *&item,
|
|||
RsIdentityDetails idd ;
|
||||
rsIdentity->getIdDetails(RsGxsId(data.mMeta.mGroupId),idd) ;
|
||||
|
||||
bool isBanned = idd.mReputation.mOverallReputationLevel == RsReputations::REPUTATION_LOCALLY_NEGATIVE;
|
||||
uint32_t item_flags = 0 ;
|
||||
bool isBanned = idd.mReputation.mOverallReputationLevel ==
|
||||
RsReputationLevel::LOCALLY_NEGATIVE;
|
||||
uint32_t item_flags = 0;
|
||||
|
||||
/* do filtering */
|
||||
bool ok = false;
|
||||
|
@ -1514,8 +1517,12 @@ bool IdDialog::fillIdListItem(const RsGxsIdGroup& data, QTreeWidgetItem *&item,
|
|||
|
||||
item->setData(RSID_COL_KEYID, Qt::UserRole,QVariant(item_flags)) ;
|
||||
item->setTextAlignment(RSID_COL_VOTES, Qt::AlignRight | Qt::AlignVCenter);
|
||||
item->setData(RSID_COL_VOTES,Qt::DecorationRole, idd.mReputation.mOverallReputationLevel);
|
||||
item->setData(RSID_COL_VOTES,SortRole, idd.mReputation.mOverallReputationLevel);
|
||||
item->setData(
|
||||
RSID_COL_VOTES,Qt::DecorationRole,
|
||||
static_cast<uint32_t>(idd.mReputation.mOverallReputationLevel));
|
||||
item->setData(
|
||||
RSID_COL_VOTES,SortRole,
|
||||
static_cast<uint32_t>(idd.mReputation.mOverallReputationLevel));
|
||||
|
||||
if(isOwnId)
|
||||
{
|
||||
|
@ -1910,7 +1917,7 @@ void IdDialog::insertIdDetails(uint32_t token)
|
|||
|
||||
#endif
|
||||
|
||||
RsReputations::ReputationInfo info ;
|
||||
RsReputationInfo info;
|
||||
rsReputations->getReputationInfo(RsGxsId(data.mMeta.mGroupId),data.mPgpId,info) ;
|
||||
|
||||
QString frep_string ;
|
||||
|
@ -1925,23 +1932,32 @@ void IdDialog::insertIdDetails(uint32_t token)
|
|||
ui->label_positive->setText(QString::number(info.mFriendsPositiveVotes));
|
||||
ui->label_negative->setText(QString::number(info.mFriendsNegativeVotes));
|
||||
|
||||
switch(info.mOverallReputationLevel)
|
||||
{
|
||||
case RsReputations::REPUTATION_LOCALLY_POSITIVE: ui->overallOpinion_TF->setText(tr("Positive")) ; break ;
|
||||
case RsReputations::REPUTATION_LOCALLY_NEGATIVE: ui->overallOpinion_TF->setText(tr("Negative (Banned by you)")) ; break ;
|
||||
case RsReputations::REPUTATION_REMOTELY_POSITIVE: ui->overallOpinion_TF->setText(tr("Positive (according to your friends)")) ; break ;
|
||||
case RsReputations::REPUTATION_REMOTELY_NEGATIVE: ui->overallOpinion_TF->setText(tr("Negative (according to your friends)")) ; break ;
|
||||
default:
|
||||
case RsReputations::REPUTATION_NEUTRAL: ui->overallOpinion_TF->setText(tr("Neutral")) ; break ;
|
||||
}
|
||||
|
||||
switch(info.mOwnOpinion)
|
||||
switch(info.mOverallReputationLevel)
|
||||
{
|
||||
case RsReputations::OPINION_NEGATIVE: ui->ownOpinion_CB->setCurrentIndex(0); break ;
|
||||
case RsReputations::OPINION_NEUTRAL : ui->ownOpinion_CB->setCurrentIndex(1); break ;
|
||||
case RsReputations::OPINION_POSITIVE: ui->ownOpinion_CB->setCurrentIndex(2); break ;
|
||||
default:
|
||||
std::cerr << "Unexpected value in own opinion: " << info.mOwnOpinion << std::endl;
|
||||
case RsReputationLevel::LOCALLY_POSITIVE:
|
||||
ui->overallOpinion_TF->setText(tr("Positive")); break;
|
||||
case RsReputationLevel::LOCALLY_NEGATIVE:
|
||||
ui->overallOpinion_TF->setText(tr("Negative (Banned by you)")); break;
|
||||
case RsReputationLevel::REMOTELY_POSITIVE:
|
||||
ui->overallOpinion_TF->setText(tr("Positive (according to your friends)"));
|
||||
break;
|
||||
case RsReputationLevel::REMOTELY_NEGATIVE:
|
||||
ui->overallOpinion_TF->setText(tr("Negative (according to your friends)"));
|
||||
break;
|
||||
case RsReputationLevel::NEUTRAL: // fallthrough
|
||||
default:
|
||||
ui->overallOpinion_TF->setText(tr("Neutral")) ; break ;
|
||||
}
|
||||
|
||||
switch(info.mOwnOpinion)
|
||||
{
|
||||
case RsOpinion::NEGATIVE: ui->ownOpinion_CB->setCurrentIndex(0); break;
|
||||
case RsOpinion::NEUTRAL : ui->ownOpinion_CB->setCurrentIndex(1); break;
|
||||
case RsOpinion::POSITIVE: ui->ownOpinion_CB->setCurrentIndex(2); break;
|
||||
default:
|
||||
std::cerr << "Unexpected value in own opinion: "
|
||||
<< static_cast<uint32_t>(info.mOwnOpinion) << std::endl;
|
||||
break;
|
||||
}
|
||||
|
||||
// now fill in usage cases
|
||||
|
@ -2060,19 +2076,19 @@ void IdDialog::modifyReputation()
|
|||
#endif
|
||||
|
||||
RsGxsId id(ui->lineEdit_KeyId->text().toStdString());
|
||||
|
||||
RsReputations::Opinion op ;
|
||||
|
||||
switch(ui->ownOpinion_CB->currentIndex())
|
||||
{
|
||||
case 0: op = RsReputations::OPINION_NEGATIVE ; break ;
|
||||
case 1: op = RsReputations::OPINION_NEUTRAL ; break ;
|
||||
case 2: op = RsReputations::OPINION_POSITIVE ; break ;
|
||||
default:
|
||||
std::cerr << "Wrong value from opinion combobox. Bug??" << std::endl;
|
||||
|
||||
}
|
||||
rsReputations->setOwnOpinion(id,op) ;
|
||||
RsOpinion op;
|
||||
|
||||
switch(ui->ownOpinion_CB->currentIndex())
|
||||
{
|
||||
case 0: op = RsOpinion::NEGATIVE; break;
|
||||
case 1: op = RsOpinion::NEUTRAL ; break;
|
||||
case 2: op = RsOpinion::POSITIVE; break;
|
||||
default:
|
||||
std::cerr << "Wrong value from opinion combobox. Bug??" << std::endl;
|
||||
break;
|
||||
}
|
||||
rsReputations->setOwnOpinion(id,op);
|
||||
|
||||
#ifdef ID_DEBUG
|
||||
std::cerr << "IdDialog::modifyReputation() ID: " << id << " Mod: " << op;
|
||||
|
@ -2386,17 +2402,12 @@ void IdDialog::IdListCustomPopupMenu( QPoint )
|
|||
|
||||
switch(det.mReputation.mOwnOpinion)
|
||||
{
|
||||
case RsReputations::OPINION_NEGATIVE: ++n_negative_reputations ;
|
||||
break ;
|
||||
|
||||
case RsReputations::OPINION_POSITIVE: ++n_positive_reputations ;
|
||||
break ;
|
||||
|
||||
case RsReputations::OPINION_NEUTRAL: ++n_neutral_reputations ;
|
||||
break ;
|
||||
case RsOpinion::NEGATIVE: ++n_negative_reputations; break;
|
||||
case RsOpinion::POSITIVE: ++n_positive_reputations; break;
|
||||
case RsOpinion::NEUTRAL: ++n_neutral_reputations; break;
|
||||
}
|
||||
|
||||
++n_selected_items ;
|
||||
++n_selected_items;
|
||||
|
||||
if(rsIdentity->isARegularContact(keyId))
|
||||
++n_is_a_contact ;
|
||||
|
@ -2674,7 +2685,7 @@ void IdDialog::negativePerson()
|
|||
|
||||
std::string Id = item->text(RSID_COL_KEYID).toStdString();
|
||||
|
||||
rsReputations->setOwnOpinion(RsGxsId(Id),RsReputations::OPINION_NEGATIVE) ;
|
||||
rsReputations->setOwnOpinion(RsGxsId(Id), RsOpinion::NEGATIVE);
|
||||
}
|
||||
|
||||
requestIdDetails();
|
||||
|
@ -2690,7 +2701,7 @@ void IdDialog::neutralPerson()
|
|||
|
||||
std::string Id = item->text(RSID_COL_KEYID).toStdString();
|
||||
|
||||
rsReputations->setOwnOpinion(RsGxsId(Id),RsReputations::OPINION_NEUTRAL) ;
|
||||
rsReputations->setOwnOpinion(RsGxsId(Id), RsOpinion::NEUTRAL);
|
||||
}
|
||||
|
||||
requestIdDetails();
|
||||
|
@ -2703,9 +2714,9 @@ void IdDialog::positivePerson()
|
|||
{
|
||||
QTreeWidgetItem *item = *it ;
|
||||
|
||||
std::string Id = item->text(RSID_COL_KEYID).toStdString();
|
||||
std::string Id = item->text(RSID_COL_KEYID).toStdString();
|
||||
|
||||
rsReputations->setOwnOpinion(RsGxsId(Id),RsReputations::OPINION_POSITIVE) ;
|
||||
rsReputations->setOwnOpinion(RsGxsId(Id), RsOpinion::POSITIVE);
|
||||
}
|
||||
|
||||
requestIdDetails();
|
||||
|
|
|
@ -108,20 +108,21 @@ MessengerWindow::MessengerWindow(QWidget* parent, Qt::WindowFlags flags)
|
|||
}
|
||||
expandedGroups.clear();
|
||||
|
||||
ui.messagelineEdit->setMinimumWidth(20);
|
||||
|
||||
/* Initialize friend list */
|
||||
QToolButton *button = new QToolButton(this);
|
||||
button->setIcon(QIcon(":/images/user/add_user24.png"));
|
||||
button->setIcon(QIcon(":/icons/png/invite.png"));
|
||||
button->setToolTip(tr("Add a Friend"));
|
||||
connect(button, SIGNAL(clicked()), this, SLOT(addFriend()));
|
||||
ui.friendList->addToolButton(button);
|
||||
button->setIconSize(QSize(27, 27));
|
||||
|
||||
button = new QToolButton(this);
|
||||
button->setIcon(QIcon(":/images/friendsfolder24.png"));
|
||||
button->setIcon(QIcon(":/icons/png/filesharing.png"));
|
||||
button->setToolTip(tr("Share files for your friends"));
|
||||
connect(button, SIGNAL(clicked()), this, SLOT(openShareManager()));
|
||||
ui.friendList->addToolButton(button);
|
||||
ui.friendList->addToolButton(button);
|
||||
button->setIconSize(QSize(27, 27));
|
||||
|
||||
// load settings
|
||||
RsAutoUpdatePage::lockAllEvents();
|
||||
|
@ -221,6 +222,7 @@ void MessengerWindow::updateOwnStatus(const QString &peer_id, int status)
|
|||
// my status has changed
|
||||
|
||||
ui.statusButton->setText(m_nickName + " (" + StatusDefs::name(status) + ")");
|
||||
ui.statusButton->setIcon(QIcon(StatusDefs::imageIM(status)));
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -19,7 +19,16 @@
|
|||
</property>
|
||||
<widget class="QWidget" name="centralwidget">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
|
@ -34,7 +43,16 @@
|
|||
</size>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_5">
|
||||
<property name="margin">
|
||||
<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">
|
||||
|
@ -70,11 +88,17 @@
|
|||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>27</width>
|
||||
<height>27</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="popupMode">
|
||||
<enum>QToolButton::InstantPopup</enum>
|
||||
</property>
|
||||
<property name="toolButtonStyle">
|
||||
<enum>Qt::ToolButtonTextOnly</enum>
|
||||
<enum>Qt::ToolButtonTextBesideIcon</enum>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
|
@ -118,7 +142,16 @@
|
|||
<item row="1" column="0">
|
||||
<widget class="QFrame" name="friendListFrame">
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<property name="margin">
|
||||
<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 row="1" column="0">
|
||||
|
@ -142,7 +175,7 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>258</width>
|
||||
<height>20</height>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
|
|
|
@ -18,13 +18,16 @@
|
|||
* *
|
||||
*******************************************************************************/
|
||||
|
||||
#include <QBuffer>
|
||||
#include <QMessageBox>
|
||||
#include "PostedCreatePostDialog.h"
|
||||
#include "ui_PostedCreatePostDialog.h"
|
||||
|
||||
#include "util/misc.h"
|
||||
#include "util/TokenQueue.h"
|
||||
|
||||
#include "gui/settings/rsharesettings.h"
|
||||
#include <QBuffer>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
|
@ -37,6 +40,7 @@ PostedCreatePostDialog::PostedCreatePostDialog(TokenQueue* tokenQ, RsPosted *pos
|
|||
Settings->loadWidgetInformation(this);
|
||||
connect(ui->submitButton, SIGNAL(clicked()), this, SLOT(createPost()));
|
||||
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->setHeaderText(tr("Submit a new Post"));
|
||||
|
@ -78,6 +82,18 @@ void PostedCreatePostDialog::createPost()
|
|||
post.mMeta.mMsgName = std::string(ui->titleEdit->text().toUtf8());
|
||||
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()) {
|
||||
/* error message */
|
||||
QMessageBox::warning(this, "RetroShare", tr("Please add a Title"), QMessageBox::Ok, QMessageBox::Ok);
|
||||
|
@ -90,3 +106,16 @@ void PostedCreatePostDialog::createPost()
|
|||
|
||||
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);
|
||||
}
|
|
@ -41,9 +41,13 @@ public:
|
|||
*/
|
||||
explicit PostedCreatePostDialog(TokenQueue* tokenQ, RsPosted* posted, const RsGxsGroupId& grpId, QWidget *parent = 0);
|
||||
~PostedCreatePostDialog();
|
||||
|
||||
QPixmap picture;
|
||||
|
||||
private slots:
|
||||
void createPost();
|
||||
void addPicture();
|
||||
|
||||
|
||||
private:
|
||||
QString mLink;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>575</width>
|
||||
<height>371</height>
|
||||
<height>467</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
@ -47,7 +47,7 @@
|
|||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="mainFrameGLayout">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0" colspan="3">
|
||||
<widget class="StyledLabel" name="info_label">
|
||||
<property name="palette">
|
||||
|
@ -128,75 +128,108 @@
|
|||
</property>
|
||||
</widget>
|
||||
</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">
|
||||
<layout class="QHBoxLayout" name="signedHLayout">
|
||||
<item>
|
||||
<spacer name="signedHSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::MinimumExpanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>78</width>
|
||||
<height>17</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="signedLabel">
|
||||
<property name="text">
|
||||
<string>Signed by: </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="GxsIdChooser" name="idChooser"/>
|
||||
</item>
|
||||
</layout>
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab">
|
||||
<attribute name="title">
|
||||
<string>Picture</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="1">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>447</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QPushButton" name="pushButton">
|
||||
<property name="text">
|
||||
<string>Add Picture</string>
|
||||
</property>
|
||||
</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 row="3" column="0" colspan="3">
|
||||
<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">
|
||||
<item row="3" column="0">
|
||||
<spacer name="buttonHSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
|
@ -209,14 +242,20 @@
|
|||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<item row="3" column="1">
|
||||
<widget class="QPushButton" name="submitButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Submit</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="2">
|
||||
<item row="3" column="2">
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
|
@ -232,12 +271,51 @@
|
|||
</property>
|
||||
</widget>
|
||||
</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>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>StyledLabel</class>
|
||||
<extends>QLabel</extends>
|
||||
<header>gui/common/StyledLabel.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>HeaderFrame</class>
|
||||
<extends>QFrame</extends>
|
||||
|
@ -254,11 +332,6 @@
|
|||
<extends>QComboBox</extends>
|
||||
<header>gui/gxs/GxsIdChooser.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>StyledLabel</class>
|
||||
<extends>QLabel</extends>
|
||||
<header>gui/common/StyledLabel.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections>
|
||||
|
|
|
@ -19,11 +19,14 @@
|
|||
*******************************************************************************/
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QMenu>
|
||||
#include <QStyle>
|
||||
|
||||
#include "rshare.h"
|
||||
#include "PostedItem.h"
|
||||
#include "gui/feeds/FeedHolder.h"
|
||||
#include "util/misc.h"
|
||||
|
||||
#include "ui_PostedItem.h"
|
||||
|
||||
#include <retroshare/rsposted.h>
|
||||
|
@ -46,6 +49,9 @@ PostedItem::PostedItem(FeedHolder *feedHolder, uint32_t feedId, const RsPostedGr
|
|||
GxsFeedItem(feedHolder, feedId, post.mMeta.mGroupId, post.mMeta.mMsgId, isHome, rsPosted, autoUpdate)
|
||||
{
|
||||
setup();
|
||||
|
||||
mMessageId = post.mMeta.mMsgId;
|
||||
|
||||
|
||||
setGroup(group, false);
|
||||
setPost(post);
|
||||
|
@ -83,7 +89,9 @@ void PostedItem::setup()
|
|||
ui->fromLabel->clear();
|
||||
ui->siteLabel->clear();
|
||||
ui->newCommentLabel->hide();
|
||||
ui->frame_picture->hide();
|
||||
ui->commLabel->hide();
|
||||
ui->frame_notes->hide();
|
||||
|
||||
/* general ones */
|
||||
connect(ui->clearButton, SIGNAL(clicked()), this, SLOT(removeItem()));
|
||||
|
@ -94,8 +102,17 @@ void PostedItem::setup()
|
|||
connect(ui->commentButton, SIGNAL( clicked()), this, SLOT(loadComments()));
|
||||
connect(ui->voteUpButton, SIGNAL(clicked()), this, SLOT(makeUpVote()));
|
||||
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)));
|
||||
|
||||
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->readAndClearButton->hide();
|
||||
|
@ -206,7 +223,7 @@ void PostedItem::loadComment(const uint32_t &token)
|
|||
if (comNb == 1) {
|
||||
sComButText = sComButText.append("(1)");
|
||||
} else if (comNb > 1) {
|
||||
sComButText = tr("Comments").append("(%1)").arg(comNb);
|
||||
sComButText = tr("Comments").append(" (%1)").arg(comNb);
|
||||
}
|
||||
ui->commentButton->setText(sComButText);
|
||||
}
|
||||
|
@ -219,11 +236,29 @@ void PostedItem::fill()
|
|||
}
|
||||
|
||||
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;
|
||||
qtime.setTime_t(mPost.mMeta.mPublishTs);
|
||||
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);
|
||||
|
||||
// Use QUrl to check/parse our URL
|
||||
|
@ -256,9 +291,14 @@ void PostedItem::fill()
|
|||
|
||||
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);
|
||||
|
||||
ui->titleLabel->setText(urlstr);
|
||||
}else
|
||||
{
|
||||
ui->titleLabel->setText(messageName());
|
||||
|
||||
}
|
||||
|
||||
ui->titleLabel->setText(urlstr);
|
||||
ui->siteLabel->setText(sitestr);
|
||||
|
||||
//QString score = "Hot" + QString::number(post.mHotScore);
|
||||
|
@ -272,7 +312,7 @@ void PostedItem::fill()
|
|||
// FIX THIS UP LATER.
|
||||
ui->notes->setText(QString::fromUtf8(mPost.mNotes.c_str()));
|
||||
if(ui->notes->text().isEmpty())
|
||||
ui->frame_notes->hide();
|
||||
ui->notesButton->hide();
|
||||
// differences between Feed or Top of Comment.
|
||||
if (mFeedHolder)
|
||||
{
|
||||
|
@ -451,3 +491,55 @@ void PostedItem::readAndClearItem()
|
|||
readToggled(false);
|
||||
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 FeedHolder;
|
||||
class RsPostedPost;
|
||||
|
||||
class PostedItem : public GxsFeedItem
|
||||
|
@ -50,7 +51,7 @@ public:
|
|||
|
||||
protected:
|
||||
/* FeedItem */
|
||||
virtual void doExpand(bool /*open*/) {}
|
||||
virtual void doExpand(bool open);
|
||||
|
||||
private slots:
|
||||
void loadComments();
|
||||
|
@ -58,6 +59,9 @@ private slots:
|
|||
void makeDownVote();
|
||||
void readToggled(bool checked);
|
||||
void readAndClearItem();
|
||||
void toggle();
|
||||
void copyMessageLink();
|
||||
void toggleNotes();
|
||||
|
||||
signals:
|
||||
void vote(const RsGxsGrpMsgIdPair& msgId, bool up);
|
||||
|
@ -83,6 +87,7 @@ private:
|
|||
|
||||
RsPostedGroup mGroup;
|
||||
RsPostedPost mPost;
|
||||
RsGxsMessageId mMessageId;
|
||||
|
||||
/** Qt Designer generated object */
|
||||
Ui::PostedItem *ui;
|
||||
|
|
|
@ -6,15 +6,33 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>765</width>
|
||||
<height>230</height>
|
||||
<width>617</width>
|
||||
<height>190</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="PostedItemVLayout">
|
||||
<item>
|
||||
<property name="styleSheet">
|
||||
<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">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
|
@ -23,7 +41,7 @@
|
|||
</sizepolicy>
|
||||
</property>
|
||||
<property name="autoFillBackground">
|
||||
<bool>true</bool>
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::Box</enum>
|
||||
|
@ -31,44 +49,178 @@
|
|||
<property name="frameShadow">
|
||||
<enum>QFrame::Sunken</enum>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="mainFrameVLayout">
|
||||
<item>
|
||||
<widget class="StyledLabel" name="titleLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<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 name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<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 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 name="frameShadow">
|
||||
<enum>QFrame::Plain</enum>
|
||||
</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>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="newCommHLayout">
|
||||
<item row="0" column="1" rowspan="2">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
<number>6</number>
|
||||
</property>
|
||||
<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">
|
||||
<string>New Comment:</string>
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="Posted_images.qrc">:/images/thumb-default.png</pixmap>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
|
@ -76,265 +228,445 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="ElidedLabel" name="commLabel">
|
||||
<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">
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>118</width>
|
||||
<height>20</height>
|
||||
<width>50</width>
|
||||
<height>5</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<property name="topMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QPushButton" name="readAndClearButton">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
<widget class="StyledLabel" name="titleLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Set as read and remove item</string>
|
||||
<property name="text">
|
||||
<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 name="icon">
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/cancel.png</normaloff>:/images/cancel.png</iconset>
|
||||
<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>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="clearButton">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
<layout class="QHBoxLayout" name="newCommHLayout">
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
<item>
|
||||
<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 name="toolTip">
|
||||
<string>Remove Item</string>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/close_normal.png</normaloff>:/images/close_normal.png</iconset>
|
||||
<property name="rightMargin">
|
||||
<number>6</number>
|
||||
</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>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
<zorder>titleLabel</zorder>
|
||||
</widget>
|
||||
</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">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
<enum>QFrame::Box</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Sunken</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<property name="margin">
|
||||
<number>1</number>
|
||||
<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>
|
||||
<property name="spacing">
|
||||
<number>1</number>
|
||||
|
@ -374,6 +706,7 @@
|
|||
</customwidgets>
|
||||
<resources>
|
||||
<include location="../images.qrc"/>
|
||||
<include location="Posted_images.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
|
|
@ -41,23 +41,19 @@ PostedListWidget::PostedListWidget(const RsGxsGroupId &postedId, QWidget *parent
|
|||
ui->setupUi(this);
|
||||
|
||||
/* Setup UI helper */
|
||||
mStateHelper->addWidget(mTokenTypeAllPosts, ui->hotSortButton);
|
||||
mStateHelper->addWidget(mTokenTypeAllPosts, ui->newSortButton);
|
||||
mStateHelper->addWidget(mTokenTypeAllPosts, ui->topSortButton);
|
||||
mStateHelper->addWidget(mTokenTypeAllPosts, ui->comboBox);
|
||||
|
||||
mStateHelper->addWidget(mTokenTypePosts, ui->hotSortButton);
|
||||
mStateHelper->addWidget(mTokenTypePosts, ui->newSortButton);
|
||||
mStateHelper->addWidget(mTokenTypePosts, ui->topSortButton);
|
||||
mStateHelper->addWidget(mTokenTypePosts, ui->comboBox);
|
||||
|
||||
mStateHelper->addWidget(mTokenTypeGroupData, ui->submitPostButton);
|
||||
mStateHelper->addWidget(mTokenTypeGroupData, ui->subscribeToolButton);
|
||||
|
||||
connect(ui->hotSortButton, SIGNAL(clicked()), this, SLOT(getRankings()));
|
||||
connect(ui->newSortButton, SIGNAL(clicked()), this, SLOT(getRankings()));
|
||||
connect(ui->topSortButton, SIGNAL(clicked()), this, SLOT(getRankings()));
|
||||
connect(ui->nextButton, SIGNAL(clicked()), this, SLOT(showNext()));
|
||||
connect(ui->prevButton, SIGNAL(clicked()), this, SLOT(showPrev()));
|
||||
connect(ui->subscribeToolButton, SIGNAL(subscribe(bool)), this, SLOT(subscribeGroup(bool)));
|
||||
|
||||
connect(ui->comboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(getRankings(int)));
|
||||
|
||||
|
||||
// default sort method.
|
||||
mSortMethod = RsPosted::HotRankType;
|
||||
|
@ -67,12 +63,14 @@ PostedListWidget::PostedListWidget(const RsGxsGroupId &postedId, QWidget *parent
|
|||
|
||||
mTokenTypeVote = nextTokenType();
|
||||
|
||||
ui->hotSortButton->setChecked(true);
|
||||
|
||||
/* fill in the available OwnIds for signing */
|
||||
ui->idChooser->loadIds(IDCHOOSER_ID_REQUIRED, RsGxsId());
|
||||
|
||||
connect(ui->submitPostButton, SIGNAL(clicked()), this, SLOT(newPost()));
|
||||
|
||||
ui->subscribeToolButton->setToolTip(tr( "<p>Subscribing to the links will gather \
|
||||
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>"));
|
||||
|
||||
/* load settings */
|
||||
processSettings(true);
|
||||
|
@ -183,7 +181,7 @@ void PostedListWidget::updateShowText()
|
|||
ui->showLabel->setText(showText);
|
||||
}
|
||||
|
||||
void PostedListWidget::getRankings()
|
||||
void PostedListWidget::getRankings(int i)
|
||||
{
|
||||
if (groupId().isNull())
|
||||
return;
|
||||
|
@ -192,23 +190,19 @@ void PostedListWidget::getRankings()
|
|||
std::cerr << std::endl;
|
||||
|
||||
int oldSortMethod = mSortMethod;
|
||||
|
||||
QObject* button = sender();
|
||||
if(button == ui->hotSortButton)
|
||||
|
||||
switch(i)
|
||||
{
|
||||
default:
|
||||
case 0:
|
||||
mSortMethod = RsPosted::HotRankType;
|
||||
}
|
||||
else if(button == ui->topSortButton)
|
||||
{
|
||||
mSortMethod = RsPosted::TopRankType;
|
||||
}
|
||||
else if(button == ui->newSortButton)
|
||||
{
|
||||
break;
|
||||
case 1:
|
||||
mSortMethod = RsPosted::NewRankType;
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
break;
|
||||
case 2:
|
||||
mSortMethod = RsPosted::TopRankType;
|
||||
break;
|
||||
}
|
||||
|
||||
if (oldSortMethod != mSortMethod)
|
||||
|
@ -262,7 +256,7 @@ void PostedListWidget::submitVote(const RsGxsGrpMsgIdPair &msgId, bool up)
|
|||
std::cerr << "AuthorId : " << vote.mMeta.mAuthorId << std::endl;
|
||||
|
||||
uint32_t token;
|
||||
rsPosted->createVote(token, vote);
|
||||
rsPosted->createNewVote(token, vote);
|
||||
mTokenQueue->queueRequest(token, TOKENREQ_MSGINFO, RS_TOKREQ_ANSTYPE_ACK, mTokenTypeVote);
|
||||
}
|
||||
|
||||
|
@ -298,6 +292,7 @@ void PostedListWidget::insertPostedDetails(const RsPostedGroup &group)
|
|||
{
|
||||
mStateHelper->setWidgetEnabled(ui->submitPostButton, IS_GROUP_SUBSCRIBED(group.mMeta.mSubscribeFlags));
|
||||
ui->subscribeToolButton->setSubscribed(IS_GROUP_SUBSCRIBED(group.mMeta.mSubscribeFlags));
|
||||
ui->subscribeToolButton->setHidden(IS_GROUP_SUBSCRIBED(group.mMeta.mSubscribeFlags)) ;
|
||||
}
|
||||
|
||||
/*********************** **** **** **** ***********************/
|
||||
|
|
|
@ -71,7 +71,7 @@ private slots:
|
|||
|
||||
void submitVote(const RsGxsGrpMsgIdPair& msgId, bool up);
|
||||
|
||||
void getRankings();
|
||||
void getRankings(int);
|
||||
|
||||
void subscribeGroup(bool subscribe);
|
||||
|
||||
|
|
|
@ -14,62 +14,92 @@
|
|||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<property name="margin">
|
||||
<property name="spacing">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<property name="leftMargin">
|
||||
<number>6</number>
|
||||
<widget class="QFrame" name="headerFrame">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::Box</enum>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>6</number>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Sunken</enum>
|
||||
</property>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="frame">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>6</number>
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="SubscribeToolButton" name="subscribeToolButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>50</weight>
|
||||
<italic>false</italic>
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">Subscribe</string>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="submitPostButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Submit a new Post</string>
|
||||
<string>Create Post</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="Posted_images.qrc">
|
||||
<normaloff>:/images/posted_24.png</normaloff>:/images/posted_24.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolButtonStyle">
|
||||
<enum>Qt::ToolButtonTextBesideIcon</enum>
|
||||
</property>
|
||||
|
@ -78,6 +108,49 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="comboBox">
|
||||
<property name="toolTip">
|
||||
<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;">Select sorting</span></p></body></html></string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</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>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
|
@ -91,116 +164,6 @@
|
|||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="hotSortButton">
|
||||
<property name="toolTip">
|
||||
<string>Hot</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="Posted_images.qrc">
|
||||
<normaloff>:/images/hot_24.png</normaloff>:/images/hot_24.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="autoExclusive">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="newSortButton">
|
||||
<property name="toolTip">
|
||||
<string>New</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="Posted_images.qrc">
|
||||
<normaloff>:/images/new_24.png</normaloff>:/images/new_24.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</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="toolTip">
|
||||
<string>Top</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>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="autoExclusive">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="periodComboBox">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Today</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Yesterday</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>This Week</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>This Month</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>This Year</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="prevButton">
|
||||
<property name="toolTip">
|
||||
|
@ -236,19 +199,6 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<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>
|
||||
<item>
|
||||
<widget class="GxsIdChooser" name="idChooser"/>
|
||||
</item>
|
||||
|
@ -279,7 +229,16 @@
|
|||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</layout>
|
||||
|
@ -289,19 +248,20 @@
|
|||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>GxsIdChooser</class>
|
||||
<extends>QComboBox</extends>
|
||||
<header>gui/gxs/GxsIdChooser.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>SubscribeToolButton</class>
|
||||
<extends>QToolButton</extends>
|
||||
<header>gui/common/SubscribeToolButton.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>GxsIdChooser</class>
|
||||
<extends>QComboBox</extends>
|
||||
<header>gui/gxs/GxsIdChooser.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="../images.qrc"/>
|
||||
<include location="../icons.qrc"/>
|
||||
<include location="Posted_images.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
|
|
|
@ -11,5 +11,13 @@
|
|||
<file>images/hot_24.png</file>
|
||||
<file>images/new_24.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>
|
||||
</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 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 |
|
@ -40,7 +40,7 @@
|
|||
#define COLUMN_COUNT 6
|
||||
#define RETROSHARE_DIR_MODEL_FILTER_STRING "filtered"
|
||||
|
||||
class DirDetails;
|
||||
struct DirDetails;
|
||||
|
||||
class DirDetailsVector : public DirDetails
|
||||
{
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1210</width>
|
||||
<height>334</height>
|
||||
<width>600</width>
|
||||
<height>400</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
|
|
@ -300,9 +300,17 @@ void ChatLobbyDialog::initParticipantsContextMenu(QMenu *contextMnu, QList<RsGxs
|
|||
{
|
||||
distantChatAct->setEnabled(true);
|
||||
sendMessageAct->setEnabled(true);
|
||||
votePositiveAct->setEnabled(rsReputations->overallReputationLevel(gxsid) != RsReputations::REPUTATION_LOCALLY_POSITIVE);
|
||||
voteNeutralAct->setEnabled((rsReputations->overallReputationLevel(gxsid) == RsReputations::REPUTATION_LOCALLY_POSITIVE) || (rsReputations->overallReputationLevel(gxsid) == RsReputations::REPUTATION_LOCALLY_NEGATIVE) );
|
||||
voteNegativeAct->setEnabled(rsReputations->overallReputationLevel(gxsid) != RsReputations::REPUTATION_LOCALLY_NEGATIVE);
|
||||
votePositiveAct->setEnabled(
|
||||
rsReputations->overallReputationLevel(gxsid) !=
|
||||
RsReputationLevel::LOCALLY_POSITIVE );
|
||||
voteNeutralAct->setEnabled(
|
||||
( rsReputations->overallReputationLevel(gxsid) ==
|
||||
RsReputationLevel::LOCALLY_POSITIVE ) ||
|
||||
( rsReputations->overallReputationLevel(gxsid) ==
|
||||
RsReputationLevel::LOCALLY_NEGATIVE ) );
|
||||
voteNegativeAct->setEnabled(
|
||||
rsReputations->overallReputationLevel(gxsid) !=
|
||||
RsReputationLevel::LOCALLY_NEGATIVE );
|
||||
muteAct->setEnabled(true);
|
||||
muteAct->setChecked(isParticipantMuted(gxsid));
|
||||
}
|
||||
|
@ -319,16 +327,15 @@ void ChatLobbyDialog::voteParticipant()
|
|||
|
||||
QList<RsGxsId> idList = act->data().value<QList<RsGxsId>>();
|
||||
|
||||
RsReputations::Opinion op = RsReputations::OPINION_NEUTRAL ;
|
||||
if (act == votePositiveAct)
|
||||
op = RsReputations::OPINION_POSITIVE;
|
||||
if (act == voteNegativeAct)
|
||||
op = RsReputations::OPINION_NEGATIVE;
|
||||
RsOpinion op = RsOpinion::NEUTRAL;
|
||||
if (act == votePositiveAct) op = RsOpinion::POSITIVE;
|
||||
if (act == voteNegativeAct) op = RsOpinion::NEGATIVE;
|
||||
|
||||
for (QList<RsGxsId>::iterator item = idList.begin(); item != idList.end(); ++item)
|
||||
{
|
||||
rsReputations->setOwnOpinion(*item, op);
|
||||
std::cerr << "Giving opinion to GXS id " << *item << " to " << op << std::endl;
|
||||
std::cerr << "Giving opinion to GXS id " << *item << " to "
|
||||
<< static_cast<uint32_t>(op) << std::endl;
|
||||
}
|
||||
|
||||
updateParticipantsList();
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
</attribute>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Trusted nodes</string>
|
||||
<string>Friends</string>
|
||||
</property>
|
||||
<property name="textAlignment">
|
||||
<set>AlignCenter</set>
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#ifndef _GROUPDEFS_H
|
||||
#define _GROUPDEFS_H
|
||||
|
||||
class RsGroupInfo;
|
||||
struct RsGroupInfo;
|
||||
|
||||
class GroupDefs
|
||||
{
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include <QString>
|
||||
#include <retroshare/rsidentity.h>
|
||||
|
||||
class RsPeerDetails;
|
||||
struct RsPeerDetails;
|
||||
|
||||
class PeerDefs
|
||||
{
|
||||
|
|
|
@ -86,6 +86,46 @@ void RsCollection::downloadFiles() const
|
|||
RsCollectionDialog(_fileName, colFileInfos, false).exec() ;
|
||||
}
|
||||
|
||||
void RsCollection::autoDownloadFiles() const
|
||||
{
|
||||
QDomElement docElem = _xml_doc.documentElement();
|
||||
|
||||
std::vector<ColFileInfo> colFileInfos;
|
||||
|
||||
recursCollectColFileInfos(docElem,colFileInfos,QString(),false);
|
||||
|
||||
QString dlDir = QString::fromUtf8(rsFiles->getDownloadDirectory().c_str());
|
||||
|
||||
foreach(ColFileInfo colFileInfo, colFileInfos)
|
||||
{
|
||||
autoDownloadFiles(colFileInfo, dlDir);
|
||||
}
|
||||
}
|
||||
|
||||
void RsCollection::autoDownloadFiles(ColFileInfo colFileInfo, QString dlDir) const
|
||||
{
|
||||
if (!colFileInfo.filename_has_wrong_characters)
|
||||
{
|
||||
QString cleanPath = dlDir + colFileInfo.path ;
|
||||
std::cout << "making directory " << cleanPath.toStdString() << std::endl;
|
||||
|
||||
if(!QDir(QApplication::applicationDirPath()).mkpath(cleanPath))
|
||||
std::cerr << "Unable to make path: " + cleanPath.toStdString() << std::endl;
|
||||
|
||||
if (colFileInfo.type==DIR_TYPE_FILE)
|
||||
rsFiles->FileRequest(colFileInfo.name.toUtf8().constData(),
|
||||
RsFileHash(colFileInfo.hash.toStdString()),
|
||||
colFileInfo.size,
|
||||
cleanPath.toUtf8().constData(),
|
||||
RS_FILE_REQ_ANONYMOUS_ROUTING,
|
||||
std::list<RsPeerId>());
|
||||
}
|
||||
foreach(ColFileInfo colFileInfoChild, colFileInfo.children)
|
||||
{
|
||||
autoDownloadFiles(colFileInfoChild, dlDir);
|
||||
}
|
||||
}
|
||||
|
||||
static QString purifyFileName(const QString& input,bool& bad)
|
||||
{
|
||||
static const QString bad_chars = "/\\\"*:?<>|" ;
|
||||
|
|
|
@ -85,6 +85,8 @@ public:
|
|||
|
||||
// Download the content.
|
||||
void downloadFiles() const ;
|
||||
// Auto Download all the content.
|
||||
void autoDownloadFiles() const ;
|
||||
|
||||
qulonglong size();
|
||||
|
||||
|
@ -102,6 +104,8 @@ private:
|
|||
void recursCollectColFileInfos(const QDomElement&,std::vector<ColFileInfo>& colFileInfos,const QString& current_dir,bool bad_chars_in_parent) const ;
|
||||
// check that the file is a valid rscollection file, and not a lol bomb or some shit like this
|
||||
static bool checkFile(const QString &fileName, bool showError);
|
||||
// Auto Download recursively.
|
||||
void autoDownloadFiles(ColFileInfo colFileInfo, QString dlDir) const ;
|
||||
|
||||
QDomDocument _xml_doc ;
|
||||
QString _fileName ;
|
||||
|
|
|
@ -639,7 +639,7 @@ void RsCollectionDialog::updateSizes()
|
|||
uint64_t total_size = 0 ;
|
||||
uint32_t total_count = 0 ;
|
||||
|
||||
for(uint32_t i=0;i<ui._fileEntriesTW->topLevelItemCount();++i)
|
||||
for(int i=0;i<ui._fileEntriesTW->topLevelItemCount();++i)
|
||||
{
|
||||
total_size += ui._fileEntriesTW->topLevelItem(i)->data(COLUMN_SIZE ,ROLE_SELSIZE ).toULongLong();
|
||||
total_count += ui._fileEntriesTW->topLevelItem(i)->data(COLUMN_FILEC,ROLE_SELFILEC).toULongLong();
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>978</width>
|
||||
<height>778</height>
|
||||
<width>600</width>
|
||||
<height>400</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="contextMenuPolicy">
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include <QColor>
|
||||
#include <QFont>
|
||||
|
||||
class RsPeerDetails;
|
||||
struct RsPeerDetails;
|
||||
|
||||
class StatusDefs
|
||||
{
|
||||
|
|
|
@ -64,7 +64,7 @@ void SubscribeToolButton::updateUi()
|
|||
#else
|
||||
setPopupMode(QToolButton::InstantPopup);
|
||||
#endif
|
||||
setIcon(QIcon(":/images/accepted16.png"));
|
||||
//setIcon(QIcon(":/images/accepted16.png"));
|
||||
setText(tr("Subscribed"));
|
||||
|
||||
if(mMenu != NULL) // that's because setMenu does not give away memory ownership
|
||||
|
@ -86,7 +86,7 @@ void SubscribeToolButton::updateUi()
|
|||
} else {
|
||||
setPopupMode(QToolButton::DelayedPopup);
|
||||
setMenu(NULL);
|
||||
setIcon(QIcon(":/images/RSS_004_32.png"));
|
||||
//setIcon(QIcon(":/images/RSS_004_32.png"));
|
||||
setText(tr("Subscribe"));
|
||||
|
||||
#ifndef USE_MENUBUTTONPOPUP
|
||||
|
|
|
@ -123,7 +123,21 @@ void UserNotify::createIcons(QMenu *notifyMenu)
|
|||
if (mTrayIcon == NULL) {
|
||||
/* Create the tray icon for messages */
|
||||
mTrayIcon = new QSystemTrayIcon(this);
|
||||
#ifdef Q_OS_WIN
|
||||
#if QT_VERSION >= QT_VERSION_CHECK (5, 10, 0)
|
||||
// Set tray icon visible to hide it again with ::hide.
|
||||
// ::hide or ::setVisible(false) does nothing when QSystemTrayIcon is hidden.
|
||||
mTrayIcon->show();
|
||||
#endif
|
||||
#endif
|
||||
mTrayIcon->setIcon(getIcon());
|
||||
#ifdef Q_OS_WIN
|
||||
#if QT_VERSION >= QT_VERSION_CHECK (5, 10, 0)
|
||||
// Hide tray icon as workaround for Qt 5.10.0 (Windows only?)
|
||||
// QSystemTrayIcon is initially not visible but the icon gets visible after the call to ::setIcon.
|
||||
mTrayIcon->hide();
|
||||
#endif
|
||||
#endif
|
||||
connect(mTrayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(trayIconClicked(QSystemTrayIcon::ActivationReason)));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1104</width>
|
||||
<height>1120</height>
|
||||
<width>600</width>
|
||||
<height>584</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
@ -69,7 +69,7 @@
|
|||
<item row="0" column="0">
|
||||
<widget class="QTabWidget" name="stabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab">
|
||||
<attribute name="icon">
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1157</width>
|
||||
<height>873</height>
|
||||
<width>600</width>
|
||||
<height>400</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1398</width>
|
||||
<height>774</height>
|
||||
<width>600</width>
|
||||
<height>400</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1071</width>
|
||||
<height>718</height>
|
||||
<width>600</width>
|
||||
<height>500</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
@ -27,7 +27,7 @@
|
|||
<item>
|
||||
<widget class="QTabWidget" name="stabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab">
|
||||
<attribute name="title">
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1052</width>
|
||||
<height>338</height>
|
||||
<width>1140</width>
|
||||
<height>342</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gxsChannelPostItem_GLayout">
|
||||
|
@ -360,12 +360,6 @@
|
|||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
|
@ -386,12 +380,6 @@
|
|||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
|
@ -412,12 +400,6 @@
|
|||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
|
@ -438,12 +420,6 @@
|
|||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
|
@ -464,12 +440,6 @@
|
|||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
|
|
|
@ -271,7 +271,7 @@ void GxsCommentTreeWidget::vote(const RsGxsGroupId &groupId, const RsGxsMessageI
|
|||
std::cerr << "AuthorId : " << vote.mMeta.mAuthorId << std::endl;
|
||||
|
||||
uint32_t token;
|
||||
mCommentService->createVote(token, vote);
|
||||
mCommentService->createNewVote(token, vote);
|
||||
mTokenQueue->queueRequest(token, TOKENREQ_MSGINFO, RS_TOKREQ_ANSTYPE_ACK, COMMENT_VOTE_ACK);
|
||||
}
|
||||
|
||||
|
|
|
@ -105,7 +105,7 @@ void GxsCreateCommentDialog::createComment()
|
|||
}//switch (ui->idChooser->getChosenId(authorId))
|
||||
|
||||
uint32_t token;
|
||||
mCommentService->createComment(token, comment);
|
||||
mCommentService->createNewComment(token, comment);
|
||||
mTokenQueue->queueRequest(token, TOKENREQ_MSGINFO, RS_TOKREQ_ANSTYPE_ACK, 0);
|
||||
close();
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ class GroupTreeWidget;
|
|||
class GroupItemInfo;
|
||||
class GxsMessageFrameWidget;
|
||||
class UIStateHelper;
|
||||
class RsGxsCommentService;
|
||||
struct RsGxsCommentService;
|
||||
class GxsCommentDialog;
|
||||
|
||||
class GxsGroupFrameDialog : public RsGxsUpdateBroadcastPage, public TokenResponse
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
// should update regularly. They also should update only when visible, to save CPU time.
|
||||
//
|
||||
|
||||
class RsGxsIfaceHelper;
|
||||
struct RsGxsIfaceHelper;
|
||||
class RsGxsUpdateBroadcastBase;
|
||||
|
||||
#define IDCHOOSER_ID_REQUIRED 0x0001
|
||||
|
|
|
@ -64,6 +64,12 @@
|
|||
//const int kRecognTagType_Dev_Patcher = 4;
|
||||
//const int kRecognTagType_Dev_Developer = 5;
|
||||
|
||||
uint32_t GxsIdDetails::mImagesAllocated = 0;
|
||||
time_t GxsIdDetails::mLastIconCacheCleaning = time(NULL);
|
||||
std::map<RsGxsId,std::pair<time_t,QImage> > GxsIdDetails::mDefaultIconCache ;
|
||||
|
||||
#define ICON_CACHE_STORAGE_TIME 600
|
||||
#define DELAY_BETWEEN_ICON_CACHE_CLEANING 300
|
||||
|
||||
void ReputationItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
|
||||
{
|
||||
|
@ -84,7 +90,8 @@ void ReputationItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem
|
|||
if(icon_index > mMaxLevelToDisplay)
|
||||
return ;
|
||||
|
||||
QIcon icon = GxsIdDetails::getReputationIcon(RsReputations::ReputationLevel(icon_index),0xff);
|
||||
QIcon icon = GxsIdDetails::getReputationIcon(
|
||||
RsReputationLevel(icon_index), 0xff );
|
||||
|
||||
QPixmap pix = icon.pixmap(r.size());
|
||||
|
||||
|
@ -450,9 +457,50 @@ static bool findTagIcon(int tag_class, int /*tag_type*/, QIcon &icon)
|
|||
* Bring the source code from this adaptation:
|
||||
* http://francisshanahan.com/identicon5/test.html
|
||||
*/
|
||||
QImage GxsIdDetails::makeDefaultIcon(const RsGxsId& id)
|
||||
const QImage& GxsIdDetails::makeDefaultIcon(const RsGxsId& id)
|
||||
{
|
||||
return drawIdentIcon(QString::fromStdString(id.toStdString()),64*3, true);
|
||||
// We use a cache for images. QImage has its own smart pointer system, but it does not prevent
|
||||
// the same image to be allocated many times. We do this using a cache. The cache is also cleaned-up
|
||||
// on a regular time basis so as to get rid of unused images.
|
||||
|
||||
time_t now = time(NULL);
|
||||
|
||||
// cleanup the cache every 10 mins
|
||||
|
||||
if(mLastIconCacheCleaning + DELAY_BETWEEN_ICON_CACHE_CLEANING < now)
|
||||
{
|
||||
std::cerr << "(II) Cleaning the icons cache." << std::endl;
|
||||
int nb_deleted = 0;
|
||||
|
||||
for(auto it(mDefaultIconCache.begin());it!=mDefaultIconCache.end();)
|
||||
if(it->second.first + ICON_CACHE_STORAGE_TIME < now && it->second.second.isDetached())
|
||||
{
|
||||
it = mDefaultIconCache.erase(it);
|
||||
++nb_deleted;
|
||||
}
|
||||
else
|
||||
++it;
|
||||
|
||||
mLastIconCacheCleaning = now;
|
||||
std::cerr << "(II) Removed " << nb_deleted << " unused icons. Cache contains " << mDefaultIconCache.size() << " icons"<< std::endl;
|
||||
}
|
||||
|
||||
// now look for the icon
|
||||
|
||||
auto it = mDefaultIconCache.find(id);
|
||||
|
||||
if(it != mDefaultIconCache.end())
|
||||
{
|
||||
it->second.first = now;
|
||||
return it->second.second;
|
||||
}
|
||||
|
||||
QImage image = drawIdentIcon(QString::fromStdString(id.toStdString()),64*3, true);
|
||||
|
||||
mDefaultIconCache[id] = std::make_pair(now,image);
|
||||
it = mDefaultIconCache.find(id);
|
||||
|
||||
return it->second.second;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -937,8 +985,9 @@ bool GxsIdDetails::MakeIdDesc(const RsGxsId &id, bool doIcons, QString &str, QLi
|
|||
|
||||
QString GxsIdDetails::getName(const RsIdentityDetails &details)
|
||||
{
|
||||
if(details.mReputation.mOverallReputationLevel == RsReputations::REPUTATION_LOCALLY_NEGATIVE)
|
||||
return tr("[Banned]") ;
|
||||
if( details.mReputation.mOverallReputationLevel ==
|
||||
RsReputationLevel::LOCALLY_NEGATIVE )
|
||||
return tr("[Banned]");
|
||||
|
||||
QString name = QString::fromUtf8(details.mNickname.c_str()).left(RSID_MAXIMUM_NICKNAME_SIZE);
|
||||
|
||||
|
@ -956,7 +1005,8 @@ QString GxsIdDetails::getComment(const RsIdentityDetails &details)
|
|||
QString comment;
|
||||
QString nickname ;
|
||||
|
||||
bool banned = (details.mReputation.mOverallReputationLevel == RsReputations::REPUTATION_LOCALLY_NEGATIVE);
|
||||
bool banned = ( details.mReputation.mOverallReputationLevel ==
|
||||
RsReputationLevel::LOCALLY_NEGATIVE );
|
||||
|
||||
if(details.mNickname.empty())
|
||||
nickname = tr("[Unknown]") ;
|
||||
|
@ -997,19 +1047,27 @@ QString nickname ;
|
|||
return comment;
|
||||
}
|
||||
|
||||
QIcon GxsIdDetails::getReputationIcon(RsReputations::ReputationLevel icon_index,uint32_t min_reputation)
|
||||
QIcon GxsIdDetails::getReputationIcon(
|
||||
RsReputationLevel icon_index, uint32_t min_reputation )
|
||||
{
|
||||
if( icon_index >= min_reputation ) return QIcon(REPUTATION_VOID) ;
|
||||
if( static_cast<uint32_t>(icon_index) >= min_reputation )
|
||||
return QIcon(REPUTATION_VOID);
|
||||
|
||||
switch(icon_index)
|
||||
{
|
||||
case RsReputations::REPUTATION_LOCALLY_NEGATIVE: return QIcon(REPUTATION_LOCALLY_NEGATIVE_ICON) ; break ;
|
||||
case RsReputations::REPUTATION_LOCALLY_POSITIVE: return QIcon(REPUTATION_LOCALLY_POSITIVE_ICON) ; break ;
|
||||
case RsReputations::REPUTATION_REMOTELY_POSITIVE: return QIcon(REPUTATION_REMOTELY_POSITIVE_ICON) ; break ;
|
||||
case RsReputations::REPUTATION_REMOTELY_NEGATIVE: return QIcon(REPUTATION_REMOTELY_NEGATIVE_ICON) ; break ;
|
||||
case RsReputations::REPUTATION_NEUTRAL: return QIcon(REPUTATION_NEUTRAL_ICON) ; break ;
|
||||
default:
|
||||
std::cerr << "Asked for unidentified icon index " << icon_index << std::endl;
|
||||
case RsReputationLevel::LOCALLY_NEGATIVE:
|
||||
return QIcon(REPUTATION_LOCALLY_NEGATIVE_ICON);
|
||||
case RsReputationLevel::LOCALLY_POSITIVE:
|
||||
return QIcon(REPUTATION_LOCALLY_POSITIVE_ICON);
|
||||
case RsReputationLevel::REMOTELY_POSITIVE:
|
||||
return QIcon(REPUTATION_REMOTELY_POSITIVE_ICON);
|
||||
case RsReputationLevel::REMOTELY_NEGATIVE:
|
||||
return QIcon(REPUTATION_REMOTELY_NEGATIVE_ICON);
|
||||
case RsReputationLevel::NEUTRAL:
|
||||
return QIcon(REPUTATION_NEUTRAL_ICON);
|
||||
default:
|
||||
std::cerr << "Asked for unidentified icon index "
|
||||
<< static_cast<uint32_t>(icon_index) << std::endl;
|
||||
return QIcon(); // dont draw anything
|
||||
}
|
||||
}
|
||||
|
@ -1018,7 +1076,8 @@ void GxsIdDetails::getIcons(const RsIdentityDetails &details, QList<QIcon> &icon
|
|||
{
|
||||
QPixmap pix ;
|
||||
|
||||
if(details.mReputation.mOverallReputationLevel == RsReputations::REPUTATION_LOCALLY_NEGATIVE)
|
||||
if( details.mReputation.mOverallReputationLevel ==
|
||||
RsReputationLevel::LOCALLY_NEGATIVE )
|
||||
{
|
||||
icons.clear() ;
|
||||
icons.push_back(QIcon(IMAGE_BANNED)) ;
|
||||
|
|
|
@ -49,7 +49,8 @@ typedef void (*GxsIdDetailsCallbackFunction)(GxsIdDetailsType type, const RsIden
|
|||
class ReputationItemDelegate: public QStyledItemDelegate
|
||||
{
|
||||
public:
|
||||
ReputationItemDelegate(RsReputations::ReputationLevel max_level_to_display) : mMaxLevelToDisplay(max_level_to_display) {}
|
||||
ReputationItemDelegate(RsReputationLevel max_level_to_display) :
|
||||
mMaxLevelToDisplay(static_cast<uint32_t>(max_level_to_display)) {}
|
||||
|
||||
virtual void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
|
||||
|
||||
|
@ -96,12 +97,13 @@ public:
|
|||
static QString getNameForType(GxsIdDetailsType type, const RsIdentityDetails &details);
|
||||
|
||||
static QIcon getLoadingIcon(const RsGxsId &id);
|
||||
static QIcon getReputationIcon(RsReputations::ReputationLevel icon_index, uint32_t min_reputation);
|
||||
static QIcon getReputationIcon(
|
||||
RsReputationLevel icon_index, uint32_t min_reputation );
|
||||
|
||||
static void GenerateCombinedPixmap(QPixmap &pixmap, const QList<QIcon> &icons, int iconSize);
|
||||
|
||||
//static QImage makeDefaultIcon(const RsGxsId& id);
|
||||
static QImage makeDefaultIcon(const RsGxsId& id);
|
||||
static const QImage& makeDefaultIcon(const RsGxsId& id);
|
||||
|
||||
/* Processing */
|
||||
static void enableProcess(bool enable);
|
||||
|
@ -155,6 +157,11 @@ protected:
|
|||
/* Pending data */
|
||||
QMap<QObject*,CallbackData> mPendingData;
|
||||
QMap<QObject*,CallbackData>::iterator mPendingDataIterator;
|
||||
|
||||
static uint32_t mImagesAllocated;
|
||||
static std::map<RsGxsId,std::pair<time_t,QImage> > mDefaultIconCache;
|
||||
static time_t mLastIconCacheCleaning;
|
||||
|
||||
int mCheckTimerId;
|
||||
int mProcessDisableCount;
|
||||
|
||||
|
|
|
@ -149,30 +149,34 @@ void GxsIdRSTreeWidgetItem::setAvatar(const RsGxsImage &avatar)
|
|||
|
||||
QVariant GxsIdRSTreeWidgetItem::data(int column, int role) const
|
||||
{
|
||||
if (column == idColumn())
|
||||
{
|
||||
if (role == Qt::ToolTipRole)
|
||||
{
|
||||
QString t = RSTreeWidgetItem::data(column, role).toString();
|
||||
QImage pix;
|
||||
if (column == idColumn())
|
||||
{
|
||||
if (role == Qt::ToolTipRole)
|
||||
{
|
||||
QString t = RSTreeWidgetItem::data(column, role).toString();
|
||||
QImage pix;
|
||||
|
||||
if(mId.isNull())
|
||||
return RSTreeWidgetItem::data(column, role);
|
||||
else if(rsReputations->overallReputationLevel(mId) == RsReputations::REPUTATION_LOCALLY_NEGATIVE)
|
||||
pix = QImage(BANNED_IMAGE) ;
|
||||
else if (mAvatar.mSize == 0 || !pix.loadFromData(mAvatar.mData, mAvatar.mSize, "PNG"))
|
||||
pix = GxsIdDetails::makeDefaultIcon(mId);
|
||||
if(mId.isNull()) return RSTreeWidgetItem::data(column, role);
|
||||
else if( rsReputations->overallReputationLevel(mId) ==
|
||||
RsReputationLevel::LOCALLY_NEGATIVE )
|
||||
pix = QImage(BANNED_IMAGE);
|
||||
else if ( mAvatar.mSize == 0 ||
|
||||
!pix.loadFromData(mAvatar.mData, mAvatar.mSize, "PNG") )
|
||||
pix = GxsIdDetails::makeDefaultIcon(mId);
|
||||
|
||||
int S = QFontMetricsF(font(column)).height();
|
||||
int S = QFontMetricsF(font(column)).height();
|
||||
|
||||
QString embeddedImage;
|
||||
if (RsHtml::makeEmbeddedImage(pix.scaled(QSize(4*S,4*S), Qt::KeepAspectRatio, Qt::SmoothTransformation), embeddedImage, 8*S * 8*S)) {
|
||||
t = "<table><tr><td>" + embeddedImage + "</td><td>" + t + "</td></table>";
|
||||
}
|
||||
QString embeddedImage;
|
||||
if ( RsHtml::makeEmbeddedImage(
|
||||
pix.scaled(QSize(4*S,4*S), Qt::KeepAspectRatio,
|
||||
Qt::SmoothTransformation ),
|
||||
embeddedImage, 8*S * 8*S ) )
|
||||
t = "<table><tr><td>" + embeddedImage + "</td><td>" + t
|
||||
+ "</td></table>";
|
||||
|
||||
return t;
|
||||
}
|
||||
}
|
||||
return t;
|
||||
}
|
||||
}
|
||||
|
||||
return RSTreeWidgetItem::data(column, role);
|
||||
return RSTreeWidgetItem::data(column, role);
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ private:
|
|||
bool mIdFound;
|
||||
bool mBannedState ;
|
||||
bool mRetryWhenFailed;
|
||||
RsReputations::ReputationLevel mReputationLevel ;
|
||||
RsReputationLevel mReputationLevel;
|
||||
uint32_t mIconTypeMask;
|
||||
RsGxsImage mAvatar;
|
||||
};
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include "gui/gxs/RsGxsUpdateBroadcastWidget.h"
|
||||
#include "util/TokenQueue.h"
|
||||
|
||||
class RsGxsIfaceHelper;
|
||||
struct RsGxsIfaceHelper;
|
||||
class UIStateHelper;
|
||||
|
||||
class GxsMessageFrameWidget : public RsGxsUpdateBroadcastWidget, public TokenResponse
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include "gui/common/UserNotify.h"
|
||||
#include "util/TokenQueue.h"
|
||||
|
||||
class RsGxsIfaceHelper;
|
||||
struct RsGxsIfaceHelper;
|
||||
class RsGxsUpdateBroadcastBase;
|
||||
|
||||
class GxsUserNotify : public UserNotify, public TokenResponse
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include <retroshare/rsgxsifacetypes.h>
|
||||
|
||||
class QShowEvent;
|
||||
class RsGxsIfaceHelper;
|
||||
struct RsGxsIfaceHelper;
|
||||
class RsGxsUpdateBroadcast;
|
||||
|
||||
typedef uint32_t TurtleRequestId ;
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
// widget.
|
||||
//
|
||||
|
||||
class RsGxsIfaceHelper;
|
||||
struct RsGxsIfaceHelper;
|
||||
class RsGxsUpdateBroadcastBase;
|
||||
typedef uint32_t TurtleRequestId ;
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
// widget.
|
||||
//
|
||||
|
||||
class RsGxsIfaceHelper;
|
||||
struct RsGxsIfaceHelper;
|
||||
class RsGxsUpdateBroadcastBase;
|
||||
typedef uint32_t TurtleRequestId;
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
#include "retroshare/rsgxsifacetypes.h"
|
||||
|
||||
class RsGxsChannelPost;
|
||||
struct RsGxsChannelPost;
|
||||
class RSTreeWidgetItemCompareRole;
|
||||
class QTreeWidgetItem;
|
||||
class GxsFeedItem;
|
||||
|
|
|
@ -256,6 +256,8 @@ void GxsChannelPostsWidget::insertChannelDetails(const RsGxsChannelGroup &group)
|
|||
}
|
||||
|
||||
ui->subscribeToolButton->setSubscribed(IS_GROUP_SUBSCRIBED(group.mMeta.mSubscribeFlags));
|
||||
mStateHelper->setWidgetEnabled(ui->subscribeToolButton, true);
|
||||
|
||||
|
||||
bool autoDownload ;
|
||||
rsGxsChannels->getChannelAutoDownload(group.mMeta.mGroupId,autoDownload);
|
||||
|
@ -619,6 +621,8 @@ void GxsChannelPostsWidget::blank()
|
|||
{
|
||||
mStateHelper->setWidgetEnabled(ui->postButton, false);
|
||||
mStateHelper->setWidgetEnabled(ui->subscribeToolButton, false);
|
||||
|
||||
ui->subscribersLabel->setText("") ;
|
||||
|
||||
clearPosts();
|
||||
|
||||
|
|
|
@ -99,13 +99,13 @@
|
|||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<property name="leftMargin">
|
||||
<number>2</number>
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>5</number>
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>2</number>
|
||||
|
@ -121,16 +121,15 @@
|
|||
<property name="text">
|
||||
<string notr="true">Subscribe</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/RSS_004_32.png</normaloff>:/images/RSS_004_32.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="popupMode">
|
||||
<enum>QToolButton::MenuButtonPopup</enum>
|
||||
</property>
|
||||
<property name="toolButtonStyle">
|
||||
<enum>Qt::ToolButtonTextBesideIcon</enum>
|
||||
</property>
|
||||
|
@ -590,6 +589,11 @@ p, li { white-space: pre-wrap; }
|
|||
<zorder>infoWidget</zorder>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>SubscribeToolButton</class>
|
||||
<extends>QToolButton</extends>
|
||||
<header>gui/common/SubscribeToolButton.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>GxsIdLabel</class>
|
||||
<extends>QLabel</extends>
|
||||
|
@ -605,11 +609,6 @@ p, li { white-space: pre-wrap; }
|
|||
<extends>QLineEdit</extends>
|
||||
<header location="global">gui/common/LineEditClear.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>SubscribeToolButton</class>
|
||||
<extends>QToolButton</extends>
|
||||
<header>gui/common/SubscribeToolButton.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>GxsFeedWidget</class>
|
||||
<extends>QWidget</extends>
|
||||
|
|
|
@ -824,19 +824,20 @@ void RsGxsForumModel::convertMsgToPostEntry(const RsGxsForumGroup& mForumGroup,c
|
|||
void RsGxsForumModel::computeReputationLevel(uint32_t forum_sign_flags,ForumModelPostEntry& fentry)
|
||||
{
|
||||
uint32_t idflags =0;
|
||||
RsReputations::ReputationLevel reputation_level = rsReputations->overallReputationLevel(fentry.mAuthorId,&idflags) ;
|
||||
RsReputationLevel reputation_level =
|
||||
rsReputations->overallReputationLevel(fentry.mAuthorId, &idflags);
|
||||
bool redacted = false;
|
||||
|
||||
if(reputation_level == RsReputations::REPUTATION_LOCALLY_NEGATIVE)
|
||||
if(reputation_level == RsReputationLevel::LOCALLY_NEGATIVE)
|
||||
fentry.mPostFlags |= ForumModelPostEntry::FLAG_POST_IS_REDACTED;
|
||||
else
|
||||
fentry.mPostFlags &= ~ForumModelPostEntry::FLAG_POST_IS_REDACTED;
|
||||
|
||||
// We use a specific item model for forums in order to handle the post pinning.
|
||||
|
||||
if(reputation_level == RsReputations::REPUTATION_UNKNOWN)
|
||||
if(reputation_level == RsReputationLevel::UNKNOWN)
|
||||
fentry.mReputationWarningLevel = 3 ;
|
||||
else if(reputation_level == RsReputations::REPUTATION_LOCALLY_NEGATIVE)
|
||||
else if(reputation_level == RsReputationLevel::LOCALLY_NEGATIVE)
|
||||
fentry.mReputationWarningLevel = 2 ;
|
||||
else if(reputation_level < rsGxsForums->minReputationForForwardingMessages(forum_sign_flags,idflags))
|
||||
fentry.mReputationWarningLevel = 1 ;
|
||||
|
@ -1301,7 +1302,7 @@ void RsGxsForumModel::debug_dump()
|
|||
}
|
||||
#endif
|
||||
|
||||
void RsGxsForumModel::setAuthorOpinion(const QModelIndex& indx,RsReputations::Opinion op)
|
||||
void RsGxsForumModel::setAuthorOpinion(const QModelIndex& indx, RsOpinion op)
|
||||
{
|
||||
if(!indx.isValid())
|
||||
return ;
|
||||
|
@ -1312,7 +1313,8 @@ void RsGxsForumModel::setAuthorOpinion(const QModelIndex& indx,RsReputations::Op
|
|||
if(!convertRefPointerToTabEntry(ref,entry) || entry >= mPosts.size())
|
||||
return ;
|
||||
|
||||
std::cerr << "Setting own opinion for author " << mPosts[entry].mAuthorId << " to " << op << std::endl;
|
||||
std::cerr << "Setting own opinion for author " << mPosts[entry].mAuthorId
|
||||
<< " to " << static_cast<uint32_t>(op) << std::endl;
|
||||
RsGxsId author_id = mPosts[entry].mAuthorId;
|
||||
|
||||
rsReputations->setOwnOpinion(author_id,op) ;
|
||||
|
|
|
@ -119,7 +119,7 @@ public:
|
|||
|
||||
void setMsgReadStatus(const QModelIndex &i, bool read_status, bool with_children);
|
||||
void setFilter(int column, const QStringList &strings, uint32_t &count) ;
|
||||
void setAuthorOpinion(const QModelIndex& indx,RsReputations::Opinion op);
|
||||
void setAuthorOpinion(const QModelIndex& indx,RsOpinion op);
|
||||
|
||||
int rowCount(const QModelIndex& parent = QModelIndex()) const override;
|
||||
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
|
|
|
@ -770,17 +770,17 @@ void GxsForumThreadWidget::threadListCustomPopupMenu(QPoint /*point*/)
|
|||
|
||||
QAction *flagaspositiveAct = new QAction(QIcon(IMAGE_POSITIVE_OPINION), tr("Give positive opinion"), &contextMnu);
|
||||
flagaspositiveAct->setToolTip(tr("This will block/hide messages from this person, and notify friend nodes.")) ;
|
||||
flagaspositiveAct->setData(RsReputations::OPINION_POSITIVE) ;
|
||||
flagaspositiveAct->setData(static_cast<uint32_t>(RsOpinion::POSITIVE));
|
||||
connect(flagaspositiveAct, SIGNAL(triggered()), this, SLOT(flagperson()));
|
||||
|
||||
QAction *flagasneutralAct = new QAction(QIcon(IMAGE_NEUTRAL_OPINION), tr("Give neutral opinion"), &contextMnu);
|
||||
flagasneutralAct->setToolTip(tr("Doing this, you trust your friends to decide to forward this message or not.")) ;
|
||||
flagasneutralAct->setData(RsReputations::OPINION_NEUTRAL) ;
|
||||
flagasneutralAct->setData(static_cast<uint32_t>(RsOpinion::NEUTRAL));
|
||||
connect(flagasneutralAct, SIGNAL(triggered()), this, SLOT(flagperson()));
|
||||
|
||||
QAction *flagasnegativeAct = new QAction(QIcon(IMAGE_NEGATIVE_OPINION), tr("Give negative opinion"), &contextMnu);
|
||||
flagasnegativeAct->setToolTip(tr("This will block/hide messages from this person, and notify friend nodes.")) ;
|
||||
flagasnegativeAct->setData(RsReputations::OPINION_NEGATIVE) ;
|
||||
flagasnegativeAct->setData(static_cast<uint32_t>(RsOpinion::NEGATIVE));
|
||||
connect(flagasnegativeAct, SIGNAL(triggered()), this, SLOT(flagperson()));
|
||||
|
||||
QAction *newthreadAct = new QAction(QIcon(IMAGE_MESSAGE), tr("Start New Thread"), &contextMnu);
|
||||
|
@ -876,19 +876,19 @@ void GxsForumThreadWidget::threadListCustomPopupMenu(QPoint /*point*/)
|
|||
#endif
|
||||
contextMnu.addSeparator();
|
||||
|
||||
RsReputations::Opinion op ;
|
||||
RsOpinion op;
|
||||
|
||||
if(!rsIdentity->isOwnId(current_post.mAuthorId) && rsReputations->getOwnOpinion(current_post.mAuthorId,op))
|
||||
{
|
||||
QMenu *submenu1 = contextMnu.addMenu(tr("Author's reputation")) ;
|
||||
|
||||
if(op != RsReputations::OPINION_POSITIVE)
|
||||
if(op != RsOpinion::POSITIVE)
|
||||
submenu1->addAction(flagaspositiveAct);
|
||||
|
||||
if(op != RsReputations::OPINION_NEUTRAL)
|
||||
if(op != RsOpinion::NEUTRAL)
|
||||
submenu1->addAction(flagasneutralAct);
|
||||
|
||||
if(op != RsReputations::OPINION_NEGATIVE)
|
||||
if(op != RsOpinion::NEGATIVE)
|
||||
submenu1->addAction(flagasnegativeAct);
|
||||
}
|
||||
|
||||
|
@ -1294,8 +1294,10 @@ void GxsForumThreadWidget::insertMessageData(const RsGxsForumMsg &msg)
|
|||
return;
|
||||
}
|
||||
|
||||
uint32_t overall_reputation = rsReputations->overallReputationLevel(msg.mMeta.mAuthorId) ;
|
||||
bool redacted = (overall_reputation == RsReputations::REPUTATION_LOCALLY_NEGATIVE) ;
|
||||
RsReputationLevel overall_reputation =
|
||||
rsReputations->overallReputationLevel(msg.mMeta.mAuthorId);
|
||||
bool redacted =
|
||||
(overall_reputation == RsReputationLevel::LOCALLY_NEGATIVE);
|
||||
|
||||
#ifdef TO_REMOVE
|
||||
bool setToReadOnActive = Settings->getForumMsgSetToReadOnActivate();
|
||||
|
@ -1558,7 +1560,7 @@ void GxsForumThreadWidget::togglePinUpPost()
|
|||
|
||||
// normally this method is only called on top level items. We still check it just in case...
|
||||
|
||||
if(mThreadProxyModel->mapToSource(index).parent() != mThreadModel->root())
|
||||
if(mThreadProxyModel->mapToSource(index).parent().isValid())
|
||||
{
|
||||
std::cerr << "(EE) togglePinUpPost() called on non top level post. This is inconsistent." << std::endl;
|
||||
return ;
|
||||
|
@ -1621,9 +1623,12 @@ void GxsForumThreadWidget::flagperson()
|
|||
return;
|
||||
}
|
||||
|
||||
RsReputations::Opinion opinion = static_cast<RsReputations::Opinion>(qobject_cast<QAction*>(sender())->data().toUInt());
|
||||
RsOpinion opinion =
|
||||
static_cast<RsOpinion>(
|
||||
qobject_cast<QAction*>(sender())->data().toUInt() );
|
||||
|
||||
mThreadModel->setAuthorOpinion(mThreadProxyModel->mapToSource(getCurrentIndex()),opinion);
|
||||
mThreadModel->setAuthorOpinion(
|
||||
mThreadProxyModel->mapToSource(getCurrentIndex()), opinion );
|
||||
}
|
||||
|
||||
void GxsForumThreadWidget::replytoforummessage() { async_msg_action( &GxsForumThreadWidget::replyForumMessageData ); }
|
||||
|
|
|
@ -30,13 +30,12 @@
|
|||
class QSortFilterProxyModel;
|
||||
class QTreeWidgetItem;
|
||||
class RSTreeWidgetItemCompareRole;
|
||||
class RsGxsForumMsg;
|
||||
class GxsForumsFillThread;
|
||||
class QItemSelection;
|
||||
class RsGxsForumGroup;
|
||||
struct RsGxsForumGroup;
|
||||
class RsGxsForumModel;
|
||||
class RsGxsForumMsg;
|
||||
class ForumModelPostEntry;
|
||||
struct RsGxsForumMsg;
|
||||
struct ForumModelPostEntry;
|
||||
|
||||
namespace Ui {
|
||||
class GxsForumThreadWidget;
|
||||
|
|
|
@ -6,14 +6,17 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1217</width>
|
||||
<height>721</height>
|
||||
<width>800</width>
|
||||
<height>600</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="GxsForumThreadWidgetVLayout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
|
@ -33,6 +36,9 @@
|
|||
</property>
|
||||
<widget class="QWidget" name="topWidget">
|
||||
<layout class="QVBoxLayout" name="topVLayout">
|
||||
<property name="spacing">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QFrame" name="toolBarFrame">
|
||||
<property name="minimumSize">
|
||||
|
@ -49,7 +55,7 @@
|
|||
</property>
|
||||
<layout class="QHBoxLayout" name="toolBarFrameHLayout">
|
||||
<property name="leftMargin">
|
||||
<number>2</number>
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>2</number>
|
||||
|
@ -94,7 +100,7 @@
|
|||
<property name="iconSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>16</height>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolButtonStyle">
|
||||
|
@ -476,6 +482,9 @@
|
|||
</widget>
|
||||
<widget class="QWidget" name="bottomWidget">
|
||||
<layout class="QVBoxLayout" name="bottomVLayout">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="RSImageBlockWidget" name="imageBlockWidget" native="true">
|
||||
<property name="sizePolicy">
|
||||
|
@ -515,6 +524,11 @@
|
|||
</action>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>SubscribeToolButton</class>
|
||||
<extends>QToolButton</extends>
|
||||
<header>gui/common/SubscribeToolButton.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>GxsIdLabel</class>
|
||||
<extends>QLabel</extends>
|
||||
|
@ -525,11 +539,6 @@
|
|||
<extends>QLineEdit</extends>
|
||||
<header location="global">gui/common/LineEditClear.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>SubscribeToolButton</class>
|
||||
<extends>QToolButton</extends>
|
||||
<header>gui/common/SubscribeToolButton.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>RSTextBrowser</class>
|
||||
<extends>QTextBrowser</extends>
|
||||
|
|
|
@ -257,5 +257,8 @@
|
|||
<file>icons/png/circles-green.png</file>
|
||||
<file>icons/png/forums-default.png</file>
|
||||
<file>icons/png/forums-signed.png</file>
|
||||
<file>icons/png/flame.png</file>
|
||||
<file>icons/png/new.png</file>
|
||||
<file>icons/png/top.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
BIN
retroshare-gui/src/gui/icons/png/flame.png
Normal file
After Width: | Height: | Size: 3.5 KiB |
BIN
retroshare-gui/src/gui/icons/png/new.png
Normal file
After Width: | Height: | Size: 5.7 KiB |
BIN
retroshare-gui/src/gui/icons/png/top.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
103
retroshare-gui/src/gui/icons/svg/flame.svg
Normal file
|
@ -0,0 +1,103 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.1"
|
||||
id="Capa_1"
|
||||
x="0px"
|
||||
y="0px"
|
||||
viewBox="0 0 611.999 611.999"
|
||||
style="enable-background:new 0 0 611.999 611.999;"
|
||||
xml:space="preserve"
|
||||
width="512px"
|
||||
height="512px"
|
||||
sodipodi:docname="flame.svg"
|
||||
inkscape:version="0.92.3 (2405546, 2018-03-11)"
|
||||
inkscape:export-filename="C:\Users\Mustermann\Documents\GitHub\RetroShare\retroshare-gui\src\gui\icons\png\flame.png"
|
||||
inkscape:export-xdpi="24"
|
||||
inkscape:export-ydpi="24"><metadata
|
||||
id="metadata41"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs39" /><sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1024"
|
||||
inkscape:window-height="705"
|
||||
id="namedview37"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.4609375"
|
||||
inkscape:cx="256"
|
||||
inkscape:cy="397.36713"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="Capa_1" />
|
||||
<g
|
||||
id="g4"
|
||||
style="fill:#039bd5;fill-opacity:1">
|
||||
<path
|
||||
d="M216.02,611.195c5.978,3.178,12.284-3.704,8.624-9.4c-19.866-30.919-38.678-82.947-8.706-149.952 c49.982-111.737,80.396-169.609,80.396-169.609s16.177,67.536,60.029,127.585c42.205,57.793,65.306,130.478,28.064,191.029 c-3.495,5.683,2.668,12.388,8.607,9.349c46.1-23.582,97.806-70.885,103.64-165.017c2.151-28.764-1.075-69.034-17.206-119.851 c-20.741-64.406-46.239-94.459-60.992-107.365c-4.413-3.861-11.276-0.439-10.914,5.413c4.299,69.494-21.845,87.129-36.726,47.386 c-5.943-15.874-9.409-43.33-9.409-76.766c0-55.665-16.15-112.967-51.755-159.531c-9.259-12.109-20.093-23.424-32.523-33.073 c-4.5-3.494-11.023,0.018-10.611,5.7c2.734,37.736,0.257,145.885-94.624,275.089c-86.029,119.851-52.693,211.896-40.864,236.826 C153.666,566.767,185.212,594.814,216.02,611.195z"
|
||||
fill="#006DF0"
|
||||
id="path2"
|
||||
style="fill:#039bd5;fill-opacity:1" />
|
||||
</g>
|
||||
<g
|
||||
id="g6">
|
||||
</g>
|
||||
<g
|
||||
id="g8">
|
||||
</g>
|
||||
<g
|
||||
id="g10">
|
||||
</g>
|
||||
<g
|
||||
id="g12">
|
||||
</g>
|
||||
<g
|
||||
id="g14">
|
||||
</g>
|
||||
<g
|
||||
id="g16">
|
||||
</g>
|
||||
<g
|
||||
id="g18">
|
||||
</g>
|
||||
<g
|
||||
id="g20">
|
||||
</g>
|
||||
<g
|
||||
id="g22">
|
||||
</g>
|
||||
<g
|
||||
id="g24">
|
||||
</g>
|
||||
<g
|
||||
id="g26">
|
||||
</g>
|
||||
<g
|
||||
id="g28">
|
||||
</g>
|
||||
<g
|
||||
id="g30">
|
||||
</g>
|
||||
<g
|
||||
id="g32">
|
||||
</g>
|
||||
<g
|
||||
id="g34">
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.9 KiB |
103
retroshare-gui/src/gui/icons/svg/new.svg
Normal file
|
@ -0,0 +1,103 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.1"
|
||||
id="Capa_1"
|
||||
x="0px"
|
||||
y="0px"
|
||||
viewBox="0 0 612.003 612.003"
|
||||
style="enable-background:new 0 0 612.003 612.003;"
|
||||
xml:space="preserve"
|
||||
width="512px"
|
||||
height="512px"
|
||||
sodipodi:docname="new.svg"
|
||||
inkscape:version="0.92.3 (2405546, 2018-03-11)"><metadata
|
||||
id="metadata41"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs39" /><sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1024"
|
||||
inkscape:window-height="705"
|
||||
id="namedview37"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.4609375"
|
||||
inkscape:cx="256"
|
||||
inkscape:cy="256"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="Capa_1" />
|
||||
<g
|
||||
id="g4"
|
||||
style="fill:#039bd5;fill-opacity:1"
|
||||
inkscape:export-filename="C:\Users\Mustermann\Documents\GitHub\RetroShare\retroshare-gui\src\gui\icons\png\new.png"
|
||||
inkscape:export-xdpi="23.958677"
|
||||
inkscape:export-ydpi="23.958677">
|
||||
<path
|
||||
d="M608.067,333.255l-44.973-71.364c-3.563-5.658-4.764-12.49-3.352-19.022l17.854-82.442 c2.784-12.848-4.649-25.708-17.164-29.724l-80.323-25.759c-6.366-2.043-11.679-6.5-14.795-12.413l-39.315-74.627 c-6.124-11.634-20.082-16.711-32.253-11.743l-78.094,31.902c-6.188,2.522-13.122,2.522-19.31,0L218.261,6.167 c-12.171-4.968-26.129,0.109-32.259,11.743l-39.315,74.62c-3.116,5.913-8.429,10.37-14.795,12.413l-80.322,25.759 c-12.522,4.016-19.948,16.877-17.164,29.724l17.847,82.442c1.418,6.532,0.211,13.365-3.352,19.022L3.934,333.255 c-7.011,11.123-4.425,25.746,5.964,33.805l66.664,51.677c5.287,4.099,8.754,10.102,9.661,16.73l11.424,83.573 c1.775,13.026,13.16,22.573,26.289,22.062l84.288-3.263c6.679-0.262,13.192,2.114,18.154,6.602l62.462,56.677 c9.738,8.831,24.597,8.831,34.328,0l62.469-56.677c4.949-4.495,11.468-6.864,18.154-6.602l84.281,3.263 c13.141,0.511,24.514-9.042,26.295-22.062l11.424-83.573c0.907-6.628,4.374-12.63,9.655-16.73l66.664-51.677 C612.498,359.001,615.078,344.378,608.067,333.255z M235.234,407.92l-74.435-51.99l30.593,70.904l-20.389,8.799l-46.92-108.719 l21.353-9.221l75.84,53.401l-31.34-72.602l20.389-8.806l46.933,108.725L235.234,407.92z M280.468,388.393l-46.92-108.719 l80.616-34.801l7.931,18.396l-58.669,25.318l10.402,24.099l54.589-23.562l7.905,18.32l-54.589,23.556l12.771,29.59l60.738-26.212 l7.905,18.32L280.468,388.393z M464.248,309.08l-56.735-71.945l13.492,90.597L397.2,338.006l-72.871-97.512l22.464-9.706 l48.625,67.609l-12.356-83.253l26.116-11.27l51.831,67.718l-16.091-83.145l22.1-9.54l20.516,120.123L464.248,309.08z"
|
||||
fill="#006DF0"
|
||||
id="path2"
|
||||
style="fill:#039bd5;fill-opacity:1" />
|
||||
</g>
|
||||
<g
|
||||
id="g6">
|
||||
</g>
|
||||
<g
|
||||
id="g8">
|
||||
</g>
|
||||
<g
|
||||
id="g10">
|
||||
</g>
|
||||
<g
|
||||
id="g12">
|
||||
</g>
|
||||
<g
|
||||
id="g14">
|
||||
</g>
|
||||
<g
|
||||
id="g16">
|
||||
</g>
|
||||
<g
|
||||
id="g18">
|
||||
</g>
|
||||
<g
|
||||
id="g20">
|
||||
</g>
|
||||
<g
|
||||
id="g22">
|
||||
</g>
|
||||
<g
|
||||
id="g24">
|
||||
</g>
|
||||
<g
|
||||
id="g26">
|
||||
</g>
|
||||
<g
|
||||
id="g28">
|
||||
</g>
|
||||
<g
|
||||
id="g30">
|
||||
</g>
|
||||
<g
|
||||
id="g32">
|
||||
</g>
|
||||
<g
|
||||
id="g34">
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 3.7 KiB |
81
retroshare-gui/src/gui/icons/svg/top.svg
Normal file
|
@ -0,0 +1,81 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
height="512px"
|
||||
version="1.1"
|
||||
viewBox="0 0 512 512"
|
||||
width="512px"
|
||||
id="svg11"
|
||||
sodipodi:docname="top.svg"
|
||||
inkscape:version="0.92.3 (2405546, 2018-03-11)">
|
||||
<metadata
|
||||
id="metadata17">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs15" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1024"
|
||||
inkscape:window-height="705"
|
||||
id="namedview13"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.4609375"
|
||||
inkscape:cx="256"
|
||||
inkscape:cy="256"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg11" />
|
||||
<g
|
||||
id="surface1"
|
||||
style="fill:#039bd5;fill-opacity:1"
|
||||
inkscape:export-filename="C:\Users\Mustermann\Documents\GitHub\RetroShare\retroshare-gui\src\gui\icons\png\top.png"
|
||||
inkscape:export-xdpi="23.953217"
|
||||
inkscape:export-ydpi="23.953217">
|
||||
<path
|
||||
d="M 77.109375 401.664062 L 55.164062 401.664062 C 24.746094 401.664062 0 426.414062 0 456.832031 L 0 497 C 0 505.285156 6.714844 512 15 512 L 79.691406 512 C 78.023438 507.304688 77.109375 502.257812 77.109375 497 Z M 77.109375 401.664062 "
|
||||
style="fill-rule:nonzero;fill-opacity:1;fill:#039bd5"
|
||||
stroke="#006DF0"
|
||||
fill="#006DF0"
|
||||
id="path2" />
|
||||
<path
|
||||
d="M 184.21875 321.332031 L 162.277344 321.332031 C 131.859375 321.332031 107.109375 346.082031 107.109375 376.5 L 107.109375 497 C 107.109375 505.285156 113.824219 512 122.109375 512 L 186.800781 512 C 185.136719 507.304688 184.21875 502.257812 184.21875 497 Z M 184.21875 321.332031 "
|
||||
style="fill-rule:nonzero;fill-opacity:1;fill:#039bd5"
|
||||
stroke="#006DF0"
|
||||
fill="#006DF0"
|
||||
id="path4" />
|
||||
<path
|
||||
d="M 509.054688 150.671875 L 401.941406 6.070312 C 399.109375 2.253906 394.640625 0 389.886719 0 C 385.132812 0 380.660156 2.253906 377.832031 6.070312 L 270.722656 150.671875 C 267.351562 155.222656 266.832031 161.289062 269.378906 166.347656 C 271.929688 171.40625 277.109375 174.601562 282.777344 174.601562 L 321.332031 174.601562 L 321.332031 497 C 321.332031 505.285156 328.046875 512 336.332031 512 L 443.441406 512 C 451.726562 512 458.441406 505.285156 458.441406 497 L 458.441406 174.601562 L 497 174.601562 C 502.664062 174.601562 507.847656 171.40625 510.394531 166.347656 C 512.945312 161.289062 512.425781 155.222656 509.054688 150.671875 Z M 509.054688 150.671875 "
|
||||
style="fill-rule:nonzero;fill-opacity:1;fill:#039bd5"
|
||||
stroke="#006DF0"
|
||||
fill="#006DF0"
|
||||
id="path6" />
|
||||
<path
|
||||
d="M 291.332031 241 L 269.386719 241 C 238.96875 241 214.21875 265.746094 214.21875 296.164062 L 214.21875 497 C 214.21875 505.285156 220.9375 512 229.21875 512 L 293.910156 512 C 292.246094 507.304688 291.332031 502.257812 291.332031 497 Z M 291.332031 241 "
|
||||
style="fill-rule:nonzero;fill-opacity:1;fill:#039bd5"
|
||||
stroke="#006DF0"
|
||||
fill="#006DF0"
|
||||
id="path8" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 3.7 KiB |
|
@ -30,14 +30,14 @@
|
|||
#include "gui/msgs/MessageInterface.h"
|
||||
|
||||
class QAction;
|
||||
class RsIdentityDetails;
|
||||
struct RsIdentityDetails;
|
||||
class QComboBox;
|
||||
class QFontComboBox;
|
||||
class QTextEdit;
|
||||
class QTextCharFormat;
|
||||
class RSTreeWidgetItemCompareRole;
|
||||
class RsGxsChannelGroup;
|
||||
class RsGxsForumGroup;
|
||||
struct RsGxsChannelGroup;
|
||||
struct RsGxsForumGroup;
|
||||
|
||||
class MessageComposer : public QMainWindow
|
||||
{
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>936</width>
|
||||
<height>714</height>
|
||||
<width>896</width>
|
||||
<height>706</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
@ -1120,8 +1120,8 @@ border-image: url(:/images/closepressed.png)
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>936</width>
|
||||
<height>19</height>
|
||||
<width>896</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
|
|
|
@ -54,7 +54,7 @@ bool JsonApiPage::updateParams(QString &errmsg)
|
|||
changed = true;
|
||||
}
|
||||
|
||||
uint16_t port = ui.portSpinBox->value();
|
||||
uint16_t port = static_cast<uint16_t>(ui.portSpinBox->value());
|
||||
if(port != Settings->getJsonApiPort())
|
||||
{
|
||||
Settings->setJsonApiPort(port);
|
||||
|
|
|
@ -38,12 +38,12 @@ PeoplePage::PeoplePage(QWidget * parent, Qt::WindowFlags flags)
|
|||
connect(ui.autoAddFriendIdsAsContact_CB,SIGNAL(toggled(bool)),this,SLOT(updateAutoAddFriendIdsAsContact()));
|
||||
}
|
||||
|
||||
void PeoplePage::updateAutoPositiveOpinion() { rsReputations->setNodeAutoPositiveOpinionForContacts(ui.autoPositiveOpinion_CB->isChecked()) ; }
|
||||
void PeoplePage::updateAutoPositiveOpinion() { rsReputations->setAutoPositiveOpinionForContacts(ui.autoPositiveOpinion_CB->isChecked()) ; }
|
||||
|
||||
void PeoplePage::updateThresholdForRemotelyPositiveReputation() { rsReputations->setThresholdForRemotelyPositiveReputation(ui.thresholdForPositive_SB->value()); }
|
||||
void PeoplePage::updateThresholdForRemotelyNegativeReputation() { rsReputations->setThresholdForRemotelyNegativeReputation(ui.thresholdForNegative_SB->value()); }
|
||||
|
||||
void PeoplePage::updateRememberDeletedNodes() { rsReputations->setRememberDeletedNodesThreshold(ui.preventReloadingBannedIdentitiesFor_SB->value()); }
|
||||
void PeoplePage::updateRememberDeletedNodes() { rsReputations->setRememberBannedIdThreshold(ui.preventReloadingBannedIdentitiesFor_SB->value()); }
|
||||
void PeoplePage::updateDeleteBannedNodesThreshold() { rsIdentity->setDeleteBannedNodesThreshold(ui.deleteBannedIdentitiesAfter_SB->value());}
|
||||
void PeoplePage::updateAutoAddFriendIdsAsContact() { rsIdentity->setAutoAddFriendIdsAsContact(ui.autoAddFriendIdsAsContact_CB->isChecked()) ; }
|
||||
|
||||
|
@ -54,7 +54,7 @@ PeoplePage::~PeoplePage()
|
|||
/** Loads the settings for this page */
|
||||
void PeoplePage::load()
|
||||
{
|
||||
bool auto_positive_contacts = rsReputations->nodeAutoPositiveOpinionForContacts() ;
|
||||
bool auto_positive_contacts = rsReputations->autoPositiveOpinionForContacts() ;
|
||||
uint32_t threshold_for_positive = rsReputations->thresholdForRemotelyPositiveReputation();
|
||||
uint32_t threshold_for_negative = rsReputations->thresholdForRemotelyNegativeReputation();
|
||||
bool auto_add_friend_ids_as_contact = rsIdentity->autoAddFriendIdsAsContact();
|
||||
|
@ -64,5 +64,5 @@ void PeoplePage::load()
|
|||
whileBlocking(ui.thresholdForPositive_SB )->setValue(threshold_for_positive);
|
||||
whileBlocking(ui.thresholdForNegative_SB )->setValue(threshold_for_negative);
|
||||
whileBlocking(ui.deleteBannedIdentitiesAfter_SB )->setValue(rsIdentity->deleteBannedNodesThreshold());
|
||||
whileBlocking(ui.preventReloadingBannedIdentitiesFor_SB)->setValue(rsReputations->rememberDeletedNodesThreshold());
|
||||
whileBlocking(ui.preventReloadingBannedIdentitiesFor_SB)->setValue(rsReputations->rememberBannedIdThreshold());
|
||||
}
|
||||
|
|
|
@ -220,7 +220,7 @@ bool sortRsPeerIdByNameLocation(const RsPeerId &a, const RsPeerId &b)
|
|||
return stringA.toLower() < stringB.toLower();
|
||||
}
|
||||
|
||||
/** Overloads default QWidget::paintEvent. Draws the actual
|
||||
/** Overloads default QWidget::paintEvent. Draws the actual
|
||||
* bandwidth graph. */
|
||||
void RSPermissionMatrixWidget::paintEvent(QPaintEvent *)
|
||||
{
|
||||
|
@ -230,14 +230,14 @@ void RSPermissionMatrixWidget::paintEvent(QPaintEvent *)
|
|||
|
||||
/* Set current graph dimensions */
|
||||
_rec = this->frameRect();
|
||||
|
||||
|
||||
/* Start the painter */
|
||||
_painter->begin(this);
|
||||
|
||||
|
||||
/* We want antialiased lines and text */
|
||||
_painter->setRenderHint(QPainter::Antialiasing);
|
||||
_painter->setRenderHint(QPainter::TextAntialiasing);
|
||||
|
||||
|
||||
/* Fill in the background */
|
||||
_painter->fillRect(_rec, QBrush(BACK_COLOR));
|
||||
_painter->drawRect(_rec);
|
||||
|
@ -289,7 +289,8 @@ void RSPermissionMatrixWidget::paintEvent(QPaintEvent *)
|
|||
rsPeers->getPeerDetails(*it,details) ;
|
||||
|
||||
QString name = QString::fromUtf8(details.name.c_str()) + " (" + QString::fromUtf8(details.location.c_str()) + ")";
|
||||
if(name.length() > 20)
|
||||
// TODO does not work correctly with hieroglyphs
|
||||
if(name.length() > 20 + 3)
|
||||
name = name.left(20)+"..." ;
|
||||
|
||||
peer_name_size = std::max(peer_name_size, fm.width(name)) ;
|
||||
|
@ -298,7 +299,7 @@ void RSPermissionMatrixWidget::paintEvent(QPaintEvent *)
|
|||
|
||||
QPen pen ;
|
||||
pen.setWidth(2) ;
|
||||
pen.setBrush(Qt::black) ;
|
||||
pen.setBrush(FOREGROUND_COLOR) ;
|
||||
|
||||
_painter->setPen(pen) ;
|
||||
int i=0;
|
||||
|
@ -349,7 +350,7 @@ void RSPermissionMatrixWidget::paintEvent(QPaintEvent *)
|
|||
pen.setWidth(2) ;
|
||||
|
||||
if(_current_service_id == it->second.mServiceType)
|
||||
pen.setBrush(Qt::black) ;
|
||||
pen.setBrush(FOREGROUND_COLOR) ;
|
||||
else
|
||||
pen.setBrush(Qt::gray) ;
|
||||
|
||||
|
@ -363,7 +364,7 @@ void RSPermissionMatrixWidget::paintEvent(QPaintEvent *)
|
|||
_painter->drawLine(QPointF(X,Y+3),QPointF(X+text_width,Y+3)) ;
|
||||
_painter->drawLine(QPointF(X+text_width/2, Y+3), QPointF(X+text_width/2,S*fMATRIX_START_Y+peer_ids.size()*S*fROW_SIZE - S*fROW_SIZE+5)) ;
|
||||
|
||||
pen.setBrush(Qt::black) ;
|
||||
pen.setBrush(FOREGROUND_COLOR) ;
|
||||
_painter->setPen(pen) ;
|
||||
|
||||
_painter->drawText(QPointF(X,Y),name);
|
||||
|
@ -496,11 +497,20 @@ void RSPermissionMatrixWidget::paintEvent(QPaintEvent *)
|
|||
|
||||
QPen pen ;
|
||||
pen.setWidth(2) ;
|
||||
pen.setBrush(Qt::black) ;
|
||||
pen.setBrush(FOREGROUND_COLOR) ;
|
||||
|
||||
_painter->setPen(pen) ;
|
||||
|
||||
QRect info_pos( position.x() + 50*S/14.0, position.y() - 10*S/14.0, text_size_x + 10*S/14.0, line_height * 5 + 5*S/14.0) ;
|
||||
int popup_x = position.x() + (50 * S / 14.0);
|
||||
int popup_y = position.y() - (10 * S / 14.0);
|
||||
int popup_width = text_size_x + (10 * S / 14.0);
|
||||
int popup_height = (line_height * 5) + (5 * S / 14.0);
|
||||
if (popup_x + popup_width > _max_width)
|
||||
popup_x = position.x() - popup_width;
|
||||
if (popup_y + popup_height > _max_height)
|
||||
popup_y -= popup_height;
|
||||
|
||||
QRect info_pos(popup_x, popup_y, popup_width, popup_height) ;
|
||||
|
||||
_painter->fillRect(info_pos,brush) ;
|
||||
_painter->drawRect(info_pos) ;
|
||||
|
|
|
@ -33,11 +33,12 @@
|
|||
#define HOR_SPC 2 /** Space between data points */
|
||||
#define SCALE_WIDTH 75 /** Width of the scale */
|
||||
|
||||
#define BACK_COLOR Qt::white
|
||||
#define SCALE_COLOR Qt::black
|
||||
#define GRID_COLOR Qt::lightGray
|
||||
#define RSDHT_COLOR Qt::magenta
|
||||
#define ALLDHT_COLOR Qt::yellow
|
||||
#define BACK_COLOR Qt::white
|
||||
#define FOREGROUND_COLOR Qt::black
|
||||
#define SCALE_COLOR Qt::black
|
||||
#define GRID_COLOR Qt::lightGray
|
||||
#define RSDHT_COLOR Qt::magenta
|
||||
#define ALLDHT_COLOR Qt::yellow
|
||||
|
||||
#define FONT_SIZE 11
|
||||
|
||||
|
|
|
@ -22,12 +22,14 @@
|
|||
|
||||
#include "rshare.h"
|
||||
#include "gui/ShareManager.h"
|
||||
#include "gui/settings/rsharesettings.h"
|
||||
#include "util/misc.h"
|
||||
|
||||
#include "retroshare/rsiface.h"
|
||||
#include "retroshare/rsfiles.h"
|
||||
#include "retroshare/rspeers.h"
|
||||
|
||||
#include <QCheckBox>
|
||||
#include <QToolTip>
|
||||
|
||||
#include <iostream>
|
||||
|
@ -47,6 +49,7 @@ TransferPage::TransferPage(QWidget * parent, Qt::WindowFlags flags)
|
|||
QObject::connect(ui._filePermDirectDL_CB,SIGNAL(activated(int)),this,SLOT(updateFilePermDirectDL(int)));
|
||||
|
||||
QObject::connect(ui.incomingButton, SIGNAL(clicked( bool ) ), this , SLOT( setIncomingDirectory() ) );
|
||||
QObject::connect(ui.autoDLColl_CB, SIGNAL(toggled(bool)), this, SLOT(updateAutoDLColl()));
|
||||
QObject::connect(ui.partialButton, SIGNAL(clicked( bool ) ), this , SLOT( setPartialsDirectory() ) );
|
||||
QObject::connect(ui.editShareButton, SIGNAL(clicked()), this, SLOT(editDirectories()));
|
||||
QObject::connect(ui.autoCheckDirectories_CB, SIGNAL(clicked(bool)), this, SLOT(toggleAutoCheckDirectories(bool)));
|
||||
|
@ -128,6 +131,7 @@ void TransferPage::load()
|
|||
whileBlocking(ui.autoCheckDirectories_CB)->setChecked(rsFiles->watchEnabled()) ; ;
|
||||
|
||||
whileBlocking(ui.incomingDir)->setText(QString::fromUtf8(rsFiles->getDownloadDirectory().c_str()));
|
||||
whileBlocking(ui.autoDLColl_CB)->setChecked(Settings->valueFromGroup("Transfer", "AutoDLColl", false).toBool());
|
||||
whileBlocking(ui.partialsDir)->setText(QString::fromUtf8(rsFiles->getPartialsDirectory().c_str()));
|
||||
whileBlocking(ui.followSymLinks_CB)->setChecked(rsFiles->followSymLinks());
|
||||
whileBlocking(ui.ignoreDuplicates_CB)->setChecked(rsFiles->ignoreDuplicates());
|
||||
|
@ -245,6 +249,11 @@ void TransferPage::setIncomingDirectory()
|
|||
whileBlocking(ui.incomingDir)->setText(QString::fromUtf8(rsFiles->getDownloadDirectory().c_str()));
|
||||
}
|
||||
|
||||
void TransferPage::updateAutoDLColl()
|
||||
{
|
||||
Settings->setValueToGroup("Transfer", "AutoDLColl", ui.autoDLColl_CB->isChecked());
|
||||
}
|
||||
|
||||
void TransferPage::setPartialsDirectory()
|
||||
{
|
||||
QString qdir = QFileDialog::getExistingDirectory(this, tr("Set Partials Directory"), "", QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks);
|
||||
|
|
|
@ -54,6 +54,7 @@ class TransferPage: public ConfigPage
|
|||
|
||||
void editDirectories() ;
|
||||
void setIncomingDirectory();
|
||||
void updateAutoDLColl();
|
||||
void setPartialsDirectory();
|
||||
void toggleAutoCheckDirectories(bool);
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<property name="title">
|
||||
<string>Shared Directories</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<layout class="QVBoxLayout" name="sharedGBoxVLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="editShareButton">
|
||||
<property name="text">
|
||||
|
@ -91,7 +91,7 @@
|
|||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<layout class="QHBoxLayout" name="ignoreDuplicatesHLayout">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="ignoreDuplicates_CB">
|
||||
<property name="toolTip">
|
||||
|
@ -103,7 +103,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<widget class="QLabel" name="ignoreDuplicates_L">
|
||||
<property name="text">
|
||||
<string>Maximum depth (0=unlimited):</string>
|
||||
</property>
|
||||
|
@ -122,7 +122,7 @@
|
|||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<layout class="QHBoxLayout" name="suffixesIgnoreListHLayout">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="suffixesIgnoreList_CB">
|
||||
<property name="text">
|
||||
|
@ -140,7 +140,7 @@
|
|||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<layout class="QHBoxLayout" name="prefixesIgnoreListHLayout">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="prefixesIgnoreList_CB">
|
||||
<property name="text">
|
||||
|
@ -165,43 +165,57 @@
|
|||
<property name="title">
|
||||
<string>Incoming Directory</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<layout class="QVBoxLayout" name="incomingGBoxVLayout">
|
||||
<item>
|
||||
<widget class="QLineEdit" name="incomingDir">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<layout class="QHBoxLayout" name="incomingDirHLayout">
|
||||
<item>
|
||||
<widget class="QLineEdit" name="incomingDir">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="incomingButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>31</width>
|
||||
<height>31</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>31</width>
|
||||
<height>31</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Browse</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/directoryselect_24x24_shadow.png</normaloff>:/images/directoryselect_24x24_shadow.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="incomingButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>31</width>
|
||||
<height>31</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>31</width>
|
||||
<height>31</height>
|
||||
</size>
|
||||
</property>
|
||||
<widget class="QCheckBox" name="autoDLColl_CB">
|
||||
<property name="toolTip">
|
||||
<string>Browse</string>
|
||||
<string><html><head/><body><p><span style=" font-weight:600;">WARNING</span>: Some collection may contains a lot of files.</p><p>With this option you cannot check the collection contents before download.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/directoryselect_24x24_shadow.png</normaloff>:/images/directoryselect_24x24_shadow.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
<string>Automatically donwload RsCollection file content (Not recommended)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
|
@ -36,7 +36,7 @@ PeerStatus::PeerStatus(QWidget *parent)
|
|||
iconLabel->setPixmap(QPixmap(":/icons/avatar_grey_128.png").scaledToHeight(S,Qt::SmoothTransformation));
|
||||
hbox->addWidget(iconLabel);
|
||||
|
||||
statusPeers = new QLabel( tr("Trusted nodes: 0/0"), this );
|
||||
statusPeers = new QLabel( tr("Friends: 0/0"), this );
|
||||
hbox->addWidget(statusPeers);
|
||||
|
||||
_compactMode = false;
|
||||
|
@ -50,10 +50,10 @@ void PeerStatus::getPeerStatus(unsigned int nFriendCount, unsigned int nOnlineCo
|
|||
/* set users/friends/network */
|
||||
|
||||
if (statusPeers){
|
||||
statusPeers->setToolTip(tr("Online Trusted nodes/Total trusted nodes") );
|
||||
statusPeers->setToolTip(tr("Online Friends/Total Friends") );
|
||||
QString text;
|
||||
if (_compactMode) text = QString("%1/%2").arg(nOnlineCount).arg(nFriendCount);
|
||||
else text = QString("<strong>%1:</strong> %2/%3 ").arg(tr("Trusted nodes")).arg(nOnlineCount).arg(nFriendCount);
|
||||
else text = QString("<strong>%1:</strong> %2/%3 ").arg(tr("Friends")).arg(nOnlineCount).arg(nFriendCount);
|
||||
statusPeers -> setText(text);
|
||||
}
|
||||
int S = QFontMetricsF(iconLabel->font()).height();
|
||||
|
|
|
@ -25,8 +25,8 @@
|
|||
|
||||
#include <retroshare/rsgxsifacetypes.h>
|
||||
|
||||
class RsGxsIfaceHelper;
|
||||
class RsGxsChanges;
|
||||
struct RsGxsIfaceHelper;
|
||||
struct RsGxsChanges;
|
||||
|
||||
typedef uint32_t TurtleRequestId ;
|
||||
|
||||
|
|