mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-17 02:21:03 -04:00
Added New Services to GUI.
- Added GxsChannels - Added New Common Comments GUI elements. - Moved Posted over to use Comments. Lots done, but lots to do! git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6212 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
a05f04900c
commit
da4c1e0f7f
38 changed files with 5725 additions and 550 deletions
32
retroshare-gui/src/gui/gxs/GxsCreateCommentDialog.cpp
Normal file
32
retroshare-gui/src/gui/gxs/GxsCreateCommentDialog.cpp
Normal file
|
@ -0,0 +1,32 @@
|
|||
|
||||
#include "GxsCreateCommentDialog.h"
|
||||
#include "ui_GxsCreateCommentDialog.h"
|
||||
|
||||
GxsCreateCommentDialog::GxsCreateCommentDialog(TokenQueue *tokQ, RsGxsCommentService *service,
|
||||
const RsGxsGrpMsgIdPair &parentId, const RsGxsMessageId& threadId, QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::GxsCreateCommentDialog), mTokenQueue(tokQ), mCommentService(service), mParentId(parentId), mThreadId(threadId)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(createComment()));
|
||||
}
|
||||
|
||||
void GxsCreateCommentDialog::createComment()
|
||||
{
|
||||
RsGxsComment comment;
|
||||
|
||||
comment.mComment = ui->commentTextEdit->document()->toPlainText().toStdString();
|
||||
comment.mMeta.mParentId = mParentId.second;
|
||||
comment.mMeta.mGroupId = mParentId.first;
|
||||
comment.mMeta.mThreadId = mThreadId;
|
||||
|
||||
uint32_t token;
|
||||
mCommentService->createComment(token, comment);
|
||||
mTokenQueue->queueRequest(token, TOKENREQ_MSGINFO, RS_TOKREQ_ANSTYPE_ACK, 0);
|
||||
close();
|
||||
}
|
||||
|
||||
GxsCreateCommentDialog::~GxsCreateCommentDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue