mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-22 22:21:09 -04:00
removed more token queue system from forums and comments
This commit is contained in:
parent
ac4b9b2971
commit
0488293a1f
7 changed files with 129 additions and 229 deletions
|
@ -36,7 +36,7 @@ GxsCommentDialog::GxsCommentDialog(QWidget *parent, const RsGxsId &default_autho
|
||||||
/* Invoke the Qt Designer generated QObject setup routine */
|
/* Invoke the Qt Designer generated QObject setup routine */
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
setTokenService(comment_service);
|
setGxsService(comment_service);
|
||||||
init(default_author);
|
init(default_author);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ void GxsCommentDialog::init(const RsGxsId& default_author)
|
||||||
ui->sortBox->setIconSize(QSize(S*1.5,S*1.5));
|
ui->sortBox->setIconSize(QSize(S*1.5,S*1.5));
|
||||||
}
|
}
|
||||||
|
|
||||||
void GxsCommentDialog::setTokenService(RsGxsCommentService *comment_service)
|
void GxsCommentDialog::setGxsService(RsGxsCommentService *comment_service)
|
||||||
{
|
{
|
||||||
ui->treeWidget->setup(comment_service);
|
ui->treeWidget->setup(comment_service);
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,7 +36,7 @@ public:
|
||||||
GxsCommentDialog(QWidget *parent, const RsGxsId& default_author, RsGxsCommentService *comment_service);
|
GxsCommentDialog(QWidget *parent, const RsGxsId& default_author, RsGxsCommentService *comment_service);
|
||||||
virtual ~GxsCommentDialog();
|
virtual ~GxsCommentDialog();
|
||||||
|
|
||||||
void setTokenService(RsGxsCommentService *comment_service);
|
void setGxsService(RsGxsCommentService *comment_service);
|
||||||
void setCommentHeader(QWidget *header);
|
void setCommentHeader(QWidget *header);
|
||||||
void commentLoad(const RsGxsGroupId &grpId, const std::set<RsGxsMessageId> &msg_versions, const RsGxsMessageId &most_recent_msgId, bool use_cache=false);
|
void commentLoad(const RsGxsGroupId &grpId, const std::set<RsGxsMessageId> &msg_versions, const RsGxsMessageId &most_recent_msgId, bool use_cache=false);
|
||||||
void commentClear();
|
void commentClear();
|
||||||
|
|
|
@ -25,7 +25,6 @@
|
||||||
#include <retroshare/rsidentity.h>
|
#include <retroshare/rsidentity.h>
|
||||||
|
|
||||||
#include "retroshare/rsgxscommon.h"
|
#include "retroshare/rsgxscommon.h"
|
||||||
#include "util/TokenQueue.h"
|
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class GxsCreateCommentDialog;
|
class GxsCreateCommentDialog;
|
||||||
|
|
|
@ -52,11 +52,6 @@ protected:
|
||||||
//virtual bool isLoading();
|
//virtual bool isLoading();
|
||||||
//virtual void fillDisplay(RsGxsUpdateBroadcastBase *updateBroadcastBase, bool complete);
|
//virtual void fillDisplay(RsGxsUpdateBroadcastBase *updateBroadcastBase, bool complete);
|
||||||
|
|
||||||
#ifdef TO_REMOVE
|
|
||||||
/* TokenResponse */
|
|
||||||
virtual void loadRequest(const TokenQueue *queue, const TokenRequest &req);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
protected slots:
|
protected slots:
|
||||||
void comments(const QString &title);
|
void comments(const QString &title);
|
||||||
void copyMessageLink();
|
void copyMessageLink();
|
||||||
|
|
|
@ -487,7 +487,7 @@ GxsChannelPostsWidgetWithModel::GxsChannelPostsWidgetWithModel(const RsGxsGroupI
|
||||||
setAutoDownload(false);
|
setAutoDownload(false);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ui->commentsDialog->setTokenService(rsGxsChannels);
|
ui->commentsDialog->setGxsService(rsGxsChannels);
|
||||||
|
|
||||||
/* Initialize GUI */
|
/* Initialize GUI */
|
||||||
settingsChanged();
|
settingsChanged();
|
||||||
|
|
|
@ -39,6 +39,7 @@
|
||||||
|
|
||||||
#include "util/HandleRichText.h"
|
#include "util/HandleRichText.h"
|
||||||
#include "util/misc.h"
|
#include "util/misc.h"
|
||||||
|
#include "util/qtthreadsutils.h"
|
||||||
|
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
@ -60,10 +61,6 @@ CreateGxsForumMsg::CreateGxsForumMsg(const RsGxsGroupId &fId, const RsGxsMessage
|
||||||
|
|
||||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||||
|
|
||||||
/* Setup Queue */
|
|
||||||
mForumQueue = new TokenQueue(rsGxsForums->getTokenService(), this);
|
|
||||||
mCirclesQueue = new TokenQueue(rsGxsCircles->getTokenService(), this);
|
|
||||||
|
|
||||||
/* Setup UI helper */
|
/* Setup UI helper */
|
||||||
mStateHelper = new UIStateHelper(this);
|
mStateHelper = new UIStateHelper(this);
|
||||||
mStateHelper->addWidget(CREATEGXSFORUMMSG_FORUMINFO, ui.postButton);
|
mStateHelper->addWidget(CREATEGXSFORUMMSG_FORUMINFO, ui.postButton);
|
||||||
|
@ -133,8 +130,6 @@ CreateGxsForumMsg::CreateGxsForumMsg(const RsGxsGroupId &fId, const RsGxsMessage
|
||||||
CreateGxsForumMsg::~CreateGxsForumMsg()
|
CreateGxsForumMsg::~CreateGxsForumMsg()
|
||||||
{
|
{
|
||||||
processSettings(false);
|
processSettings(false);
|
||||||
delete(mForumQueue);
|
|
||||||
delete(mCirclesQueue);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CreateGxsForumMsg::processSettings(bool load)
|
void CreateGxsForumMsg::processSettings(bool load)
|
||||||
|
@ -194,59 +189,109 @@ void CreateGxsForumMsg::newMsg()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
{/* request Data */
|
|
||||||
mStateHelper->setLoading(CREATEGXSFORUMMSG_FORUMINFO, true);
|
mStateHelper->setLoading(CREATEGXSFORUMMSG_FORUMINFO, true);
|
||||||
|
|
||||||
RsTokReqOptions opts;
|
RsThread::async( [this]()
|
||||||
opts.mReqType = GXS_REQUEST_TYPE_GROUP_META;
|
{
|
||||||
|
// We only need group Meta information, but forums do not provide it currently
|
||||||
|
|
||||||
std::list<RsGxsGroupId> groupIds;
|
std::vector<RsGxsForumGroup> forums_info;
|
||||||
groupIds.push_back(mForumId);
|
rsGxsForums->getForumsInfo(std::list<RsGxsGroupId>{ mForumId },forums_info);
|
||||||
|
|
||||||
//std::cerr << "ForumsV2Dialog::newMsg() Requesting Group Summary(" << mForumId << ")"<< std::endl;
|
|
||||||
|
|
||||||
uint32_t token;
|
RsQThreadUtils::postToObject( [this,forums_info]()
|
||||||
mForumQueue->requestGroupInfo(token, RS_TOKREQ_ANSTYPE_SUMMARY, opts, groupIds, CREATEGXSFORUMMSG_FORUMINFO);
|
{
|
||||||
}/* request Data */
|
if(forums_info.size() != 1)
|
||||||
|
{
|
||||||
|
RsErr() << "Cannot retrieve group information for forum " << mForumId ;
|
||||||
|
mStateHelper->setActive(CREATEGXSFORUMMSG_FORUMINFO, false);
|
||||||
|
mStateHelper->setLoading(CREATEGXSFORUMMSG_FORUMINFO, false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
auto fg(forums_info.front());
|
||||||
|
|
||||||
if (mParentId.isNull()) {
|
const RsGroupMetaData& fi(fg.mMeta);
|
||||||
|
mForumMetaLoaded = true;
|
||||||
|
mForumMeta = fi;
|
||||||
|
|
||||||
|
if(!fi.mCircleId.isNull())
|
||||||
|
loadCircleInfo(RsGxsGroupId(fi.mCircleId));
|
||||||
|
|
||||||
|
loadFormInformation();
|
||||||
|
|
||||||
|
mStateHelper->setActive(CREATEGXSFORUMMSG_FORUMINFO, false);
|
||||||
|
mStateHelper->setLoading(CREATEGXSFORUMMSG_FORUMINFO, false);
|
||||||
|
|
||||||
|
},this);
|
||||||
|
});
|
||||||
|
|
||||||
|
if (mParentId.isNull())
|
||||||
|
{
|
||||||
mStateHelper->setActive(CREATEGXSFORUMMSG_PARENTMSG, true);
|
mStateHelper->setActive(CREATEGXSFORUMMSG_PARENTMSG, true);
|
||||||
mParentMsgLoaded = true;
|
mParentMsgLoaded = true;
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
mStateHelper->setLoading(CREATEGXSFORUMMSG_PARENTMSG, true);
|
mStateHelper->setLoading(CREATEGXSFORUMMSG_PARENTMSG, true);
|
||||||
|
|
||||||
RsTokReqOptions opts;
|
RsThread::async( [this]() {
|
||||||
opts.mReqType = GXS_REQUEST_TYPE_MSG_DATA;
|
|
||||||
|
|
||||||
GxsMsgReq msgIds;
|
std::vector<RsGxsForumMsg> parent_msgs;
|
||||||
std::set<RsGxsMessageId> &vect = msgIds[mForumId];
|
rsGxsForums->getForumContent(mForumId,std::set<RsGxsMessageId>{ mParentId },parent_msgs);
|
||||||
vect.insert(mParentId);
|
|
||||||
|
|
||||||
//std::cerr << "ForumsV2Dialog::newMsg() Requesting Parent Summary(" << mParentId << ")";
|
RsQThreadUtils::postToObject( [this,parent_msgs]() {
|
||||||
//std::cerr << std::endl;
|
if(parent_msgs.size() != 1)
|
||||||
|
{
|
||||||
|
RsErr() << "Cannot get parent message from forum." ;
|
||||||
|
|
||||||
uint32_t token;
|
mStateHelper->setActive(CREATEGXSFORUMMSG_PARENTMSG, false);
|
||||||
mForumQueue->requestMsgInfo(token, RS_TOKREQ_ANSTYPE_DATA, opts, msgIds, CREATEGXSFORUMMSG_PARENTMSG);
|
mStateHelper->setLoading(CREATEGXSFORUMMSG_PARENTMSG, false);
|
||||||
|
|
||||||
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mOrigMsgId.isNull()) {
|
mParentMsg = parent_msgs.front();
|
||||||
|
mParentMsgLoaded = true;
|
||||||
|
|
||||||
|
loadFormInformation();
|
||||||
|
|
||||||
|
},this);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mOrigMsgId.isNull())
|
||||||
|
{
|
||||||
mStateHelper->setActive(CREATEGXSFORUMMSG_ORIGMSG, true);
|
mStateHelper->setActive(CREATEGXSFORUMMSG_ORIGMSG, true);
|
||||||
mOrigMsgLoaded = true;
|
mOrigMsgLoaded = true;
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
mStateHelper->setLoading(CREATEGXSFORUMMSG_ORIGMSG , true);
|
mStateHelper->setLoading(CREATEGXSFORUMMSG_ORIGMSG , true);
|
||||||
|
|
||||||
RsTokReqOptions opts;
|
RsThread::async( [this]() {
|
||||||
opts.mReqType = GXS_REQUEST_TYPE_MSG_DATA;
|
|
||||||
|
|
||||||
GxsMsgReq msgIds;
|
std::vector<RsGxsForumMsg> orig_msgs;
|
||||||
std::set<RsGxsMessageId> &vect = msgIds[mForumId];
|
rsGxsForums->getForumContent(mForumId,std::set<RsGxsMessageId>{ mOrigMsgId },orig_msgs);
|
||||||
vect.insert(mOrigMsgId);
|
|
||||||
|
|
||||||
//std::cerr << "ForumsV2Dialog::newMsg() Requesting Parent Summary(" << mParentId << ")";
|
RsQThreadUtils::postToObject( [this,orig_msgs]() {
|
||||||
//std::cerr << std::endl;
|
if(orig_msgs.size() != 1)
|
||||||
|
{
|
||||||
|
RsErr() << "Cannot get parent message from forum." ;
|
||||||
|
|
||||||
|
mStateHelper->setActive(CREATEGXSFORUMMSG_ORIGMSG, false);
|
||||||
|
mStateHelper->setLoading(CREATEGXSFORUMMSG_ORIGMSG, false);
|
||||||
|
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
|
mOrigMsg = orig_msgs.front();
|
||||||
|
mOrigMsgLoaded = true;
|
||||||
|
|
||||||
|
loadFormInformation();
|
||||||
|
|
||||||
|
},this);
|
||||||
|
});
|
||||||
|
|
||||||
uint32_t token;
|
|
||||||
mForumQueue->requestMsgInfo(token, RS_TOKREQ_ANSTYPE_DATA, opts, msgIds, CREATEGXSFORUMMSG_ORIGMSG);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -330,7 +375,7 @@ void CreateGxsForumMsg::loadFormInformation()
|
||||||
else if (!mParentId.isNull())
|
else if (!mParentId.isNull())
|
||||||
{
|
{
|
||||||
QString title = QString::fromUtf8(mParentMsg.mMeta.mMsgName.c_str());
|
QString title = QString::fromUtf8(mParentMsg.mMeta.mMsgName.c_str());
|
||||||
name += " " + tr("In Reply to") + ": ";
|
name += " - " + tr("In Reply to") + ": ";
|
||||||
name += title;
|
name += title;
|
||||||
|
|
||||||
QString text = title;
|
QString text = title;
|
||||||
|
@ -583,52 +628,14 @@ void CreateGxsForumMsg::fileHashingFinished(QList<HashedFile> hashedFiles)
|
||||||
ui.hashGroupBox->hide();
|
ui.hashGroupBox->hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CreateGxsForumMsg::loadForumInfo(const uint32_t &token)
|
void CreateGxsForumMsg::loadCircleInfo(const RsGxsGroupId& circle_id)
|
||||||
{
|
|
||||||
//std::cerr << "CreateGxsForumMsg::loadForumInfo()";
|
|
||||||
//std::cerr << std::endl;
|
|
||||||
|
|
||||||
std::list<RsGroupMetaData> groupInfo;
|
|
||||||
rsGxsForums->getGroupSummary(token, groupInfo);
|
|
||||||
|
|
||||||
if (groupInfo.size() == 1)
|
|
||||||
{
|
|
||||||
RsGroupMetaData fi = groupInfo.front();
|
|
||||||
|
|
||||||
mForumMeta = fi;
|
|
||||||
mForumMetaLoaded = true;
|
|
||||||
|
|
||||||
if(!fi.mCircleId.isNull())
|
|
||||||
{
|
|
||||||
//std::cerr << "Circle ID is not null: " << fi.mCircleId << ": loading circle info to add constraint to the GXS ID chooser." << std::endl;
|
|
||||||
|
|
||||||
RsTokReqOptions opts;
|
|
||||||
opts.mReqType = GXS_REQUEST_TYPE_GROUP_DATA;
|
|
||||||
|
|
||||||
std::list<RsGxsGroupId> groupIds;
|
|
||||||
groupIds.push_back(RsGxsGroupId(fi.mCircleId));
|
|
||||||
uint32_t _token;
|
|
||||||
|
|
||||||
mCirclesQueue->requestGroupInfo(_token, RS_TOKREQ_ANSTYPE_DATA, opts, groupIds, CREATEGXSFORUMMSG_CIRCLENFO);
|
|
||||||
}
|
|
||||||
|
|
||||||
loadFormInformation();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
std::cerr << "CreateGxsForumMsg::loadForumInfo() ERROR INVALID Number of Forums";
|
|
||||||
std::cerr << std::endl;
|
|
||||||
|
|
||||||
mStateHelper->setActive(CREATEGXSFORUMMSG_FORUMINFO, false);
|
|
||||||
mStateHelper->setLoading(CREATEGXSFORUMMSG_FORUMINFO, false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
void CreateGxsForumMsg::loadForumCircleInfo(const uint32_t& token)
|
|
||||||
{
|
{
|
||||||
//std::cerr << "Loading forum circle info" << std::endl;
|
//std::cerr << "Loading forum circle info" << std::endl;
|
||||||
|
|
||||||
|
RsThread::async( [circle_id,this]()
|
||||||
|
{
|
||||||
std::vector<RsGxsCircleGroup> circle_grp_v ;
|
std::vector<RsGxsCircleGroup> circle_grp_v ;
|
||||||
rsGxsCircles->getGroupData(token, circle_grp_v);
|
rsGxsCircles->getCirclesInfo(std::list<RsGxsGroupId>{ circle_id }, circle_grp_v);
|
||||||
|
|
||||||
if (circle_grp_v.empty())
|
if (circle_grp_v.empty())
|
||||||
{
|
{
|
||||||
|
@ -644,6 +651,8 @@ void CreateGxsForumMsg::loadForumCircleInfo(const uint32_t& token)
|
||||||
|
|
||||||
RsGxsCircleGroup cg = circle_grp_v.front();
|
RsGxsCircleGroup cg = circle_grp_v.front();
|
||||||
|
|
||||||
|
RsQThreadUtils::postToObject( [cg,this]()
|
||||||
|
{
|
||||||
mForumCircleData = cg;
|
mForumCircleData = cg;
|
||||||
mForumCircleLoaded = true;
|
mForumCircleLoaded = true;
|
||||||
|
|
||||||
|
@ -661,103 +670,10 @@ void CreateGxsForumMsg::loadForumCircleInfo(const uint32_t& token)
|
||||||
QMessageBox::information(NULL,tr("No compatible ID for this forum"),tr("None of your identities is allowed to post in this forum. This could be due to the forum being limited to a circle that contains none of your identities, or forum flags requiring a PGP-signed identity.")) ;
|
QMessageBox::information(NULL,tr("No compatible ID for this forum"),tr("None of your identities is allowed to post in this forum. This could be due to the forum being limited to a circle that contains none of your identities, or forum flags requiring a PGP-signed identity.")) ;
|
||||||
close() ;
|
close() ;
|
||||||
}
|
}
|
||||||
|
}, this);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void CreateGxsForumMsg::loadOrigMsg(const uint32_t &token)
|
|
||||||
{
|
|
||||||
//std::cerr << "CreateGxsForumMsg::loadParentMsg()";
|
|
||||||
//std::cerr << std::endl;
|
|
||||||
|
|
||||||
// Only grab one.... ignore more (shouldn't be any).
|
|
||||||
std::vector<RsGxsForumMsg> msgs;
|
|
||||||
if (rsGxsForums->getMsgData(token, msgs))
|
|
||||||
{
|
|
||||||
if (msgs.size() != 1)
|
|
||||||
{
|
|
||||||
/* error */
|
|
||||||
std::cerr << "CreateGxsForumMsg::loadOrigMsg() ERROR wrong number of msgs";
|
|
||||||
std::cerr << std::endl;
|
|
||||||
|
|
||||||
mStateHelper->setActive(CREATEGXSFORUMMSG_ORIGMSG, false);
|
|
||||||
mStateHelper->setLoading(CREATEGXSFORUMMSG_ORIGMSG, false);
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
mOrigMsg = msgs[0];
|
|
||||||
mOrigMsgLoaded = true;
|
|
||||||
|
|
||||||
loadFormInformation();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void CreateGxsForumMsg::loadParentMsg(const uint32_t &token)
|
|
||||||
{
|
|
||||||
//std::cerr << "CreateGxsForumMsg::loadParentMsg()";
|
|
||||||
//std::cerr << std::endl;
|
|
||||||
|
|
||||||
// Only grab one.... ignore more (shouldn't be any).
|
|
||||||
std::vector<RsGxsForumMsg> msgs;
|
|
||||||
if (rsGxsForums->getMsgData(token, msgs))
|
|
||||||
{
|
|
||||||
if (msgs.size() != 1)
|
|
||||||
{
|
|
||||||
/* error */
|
|
||||||
std::cerr << "CreateGxsForumMsg::loadParentMsg() ERROR wrong number of msgs";
|
|
||||||
std::cerr << std::endl;
|
|
||||||
|
|
||||||
mStateHelper->setActive(CREATEGXSFORUMMSG_PARENTMSG, false);
|
|
||||||
mStateHelper->setLoading(CREATEGXSFORUMMSG_PARENTMSG, false);
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
mParentMsg = msgs[0];
|
|
||||||
mParentMsgLoaded = true;
|
|
||||||
|
|
||||||
loadFormInformation();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void CreateGxsForumMsg::loadRequest(const TokenQueue *queue, const TokenRequest &req)
|
|
||||||
{
|
|
||||||
//std::cerr << "CreateGxsForum::loadRequest() UserType: " << req.mUserType;
|
|
||||||
//std::cerr << std::endl;
|
|
||||||
|
|
||||||
if (queue == mForumQueue)
|
|
||||||
{
|
|
||||||
/* now switch on req */
|
|
||||||
switch(req.mUserType)
|
|
||||||
{
|
|
||||||
case CREATEGXSFORUMMSG_FORUMINFO:
|
|
||||||
loadForumInfo(req.mToken);
|
|
||||||
break;
|
|
||||||
case CREATEGXSFORUMMSG_ORIGMSG:
|
|
||||||
loadOrigMsg(req.mToken);
|
|
||||||
break;
|
|
||||||
case CREATEGXSFORUMMSG_PARENTMSG:
|
|
||||||
loadParentMsg(req.mToken);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
std::cerr << "CreateGxsForumMsg::loadRequest() UNKNOWN UserType " << req.mUserType << " for token request in mForumQueue";
|
|
||||||
std::cerr << std::endl;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(queue == mCirclesQueue)
|
|
||||||
{
|
|
||||||
switch(req.mUserType)
|
|
||||||
{
|
|
||||||
case CREATEGXSFORUMMSG_CIRCLENFO:
|
|
||||||
loadForumCircleInfo(req.mToken) ;
|
|
||||||
break ;
|
|
||||||
default:
|
|
||||||
std::cerr << "CreateGxsForumMsg::loadRequest() UNKNOWN UserType " << req.mUserType << " for token request in mCirclesQueue";
|
|
||||||
std::cerr << std::endl;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
void CreateGxsForumMsg::setSubject(const QString& msg)
|
void CreateGxsForumMsg::setSubject(const QString& msg)
|
||||||
{
|
{
|
||||||
ui.forumSubject->setText(msg);
|
ui.forumSubject->setText(msg);
|
||||||
|
|
|
@ -23,14 +23,12 @@
|
||||||
|
|
||||||
#include "ui_CreateGxsForumMsg.h"
|
#include "ui_CreateGxsForumMsg.h"
|
||||||
|
|
||||||
#include "util/TokenQueue.h"
|
|
||||||
|
|
||||||
#include <retroshare/rsgxsforums.h>
|
#include <retroshare/rsgxsforums.h>
|
||||||
#include <retroshare/rsgxscircles.h>
|
#include <retroshare/rsgxscircles.h>
|
||||||
|
|
||||||
class UIStateHelper;
|
class UIStateHelper;
|
||||||
|
|
||||||
class CreateGxsForumMsg : public QDialog, public TokenResponse
|
class CreateGxsForumMsg : public QDialog
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
@ -39,7 +37,6 @@ public:
|
||||||
~CreateGxsForumMsg();
|
~CreateGxsForumMsg();
|
||||||
|
|
||||||
void newMsg(); /* cleanup */
|
void newMsg(); /* cleanup */
|
||||||
virtual void loadRequest(const TokenQueue *queue, const TokenRequest &req);
|
|
||||||
void insertPastedText(const QString& msg) ;
|
void insertPastedText(const QString& msg) ;
|
||||||
void setSubject(const QString& msg);
|
void setSubject(const QString& msg);
|
||||||
|
|
||||||
|
@ -58,15 +55,11 @@ private slots:
|
||||||
protected:
|
protected:
|
||||||
void closeEvent (QCloseEvent * event);
|
void closeEvent (QCloseEvent * event);
|
||||||
|
|
||||||
|
void loadCircleInfo(const RsGxsGroupId& circle_id);
|
||||||
private:
|
private:
|
||||||
void processSettings(bool load);
|
void processSettings(bool load);
|
||||||
void loadFormInformation();
|
void loadFormInformation();
|
||||||
|
|
||||||
void loadForumInfo(const uint32_t &token);
|
|
||||||
void loadParentMsg(const uint32_t &token);
|
|
||||||
void loadOrigMsg(const uint32_t &token);
|
|
||||||
void loadForumCircleInfo(const uint32_t &token);
|
|
||||||
|
|
||||||
RsGxsGroupId mForumId;
|
RsGxsGroupId mForumId;
|
||||||
RsGxsCircleId mCircleId ;
|
RsGxsCircleId mCircleId ;
|
||||||
RsGxsMessageId mParentId;
|
RsGxsMessageId mParentId;
|
||||||
|
@ -84,9 +77,6 @@ private:
|
||||||
RsGroupMetaData mForumMeta;
|
RsGroupMetaData mForumMeta;
|
||||||
RsGxsCircleGroup mForumCircleData ;
|
RsGxsCircleGroup mForumCircleData ;
|
||||||
|
|
||||||
TokenQueue *mForumQueue;
|
|
||||||
TokenQueue *mCirclesQueue;
|
|
||||||
|
|
||||||
UIStateHelper *mStateHelper;
|
UIStateHelper *mStateHelper;
|
||||||
|
|
||||||
/** Qt Designer generated object */
|
/** Qt Designer generated object */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue