mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-06 08:05:18 -04:00
Significant improvements to Forums:
* displays forums * displays thread list/msg * Threaded/Flat View. * Add new Forum / Add new Message. * new classes in src/gui/forums Updated rank and forums interfaces. Improvements to Link Cloud GUI. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@506 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
129c07a553
commit
5a27165353
15 changed files with 2051 additions and 504 deletions
76
retroshare-gui/src/gui/forums/CreateForumMsg.cpp
Normal file
76
retroshare-gui/src/gui/forums/CreateForumMsg.cpp
Normal file
|
@ -0,0 +1,76 @@
|
|||
/****************************************************************
|
||||
* RetroShare is distributed under the following license:
|
||||
*
|
||||
* Copyright (C) 2008 Robert Fernie
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
****************************************************************/
|
||||
|
||||
|
||||
#include "CreateForumMsg.h"
|
||||
|
||||
#include "rsiface/rsforums.h"
|
||||
|
||||
/** Constructor */
|
||||
CreateForumMsg::CreateForumMsg(std::string fId, std::string pId)
|
||||
: QWidget(NULL), mForumId(fId), mParentId(pId)
|
||||
{
|
||||
/* Invoke the Qt Designer generated object setup routine */
|
||||
ui.setupUi(this);
|
||||
|
||||
// connect up the buttons.
|
||||
connect( ui.cancelButton, SIGNAL( clicked ( bool ) ), this, SLOT( cancelMsg( ) ) );
|
||||
connect( ui.postButton, SIGNAL( clicked ( bool ) ), this, SLOT( createMsg( ) ) );
|
||||
|
||||
newMsg();
|
||||
|
||||
}
|
||||
|
||||
|
||||
void CreateForumMsg::newMsg()
|
||||
{
|
||||
/* clear all */
|
||||
}
|
||||
|
||||
void CreateForumMsg::createMsg()
|
||||
{
|
||||
QString name = ui.forumSubject->text();
|
||||
QString desc = ui.forumMessage->toHtml();
|
||||
|
||||
|
||||
ForumMsgInfo msgInfo;
|
||||
|
||||
msgInfo.forumId = mForumId;
|
||||
msgInfo.threadId = "";
|
||||
msgInfo.parentId = mParentId;
|
||||
msgInfo.msgId = "";
|
||||
|
||||
msgInfo.title = name.toStdWString();
|
||||
msgInfo.msg = desc.toStdWString();
|
||||
|
||||
rsForums->ForumMessageSend(msgInfo);
|
||||
|
||||
close();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void CreateForumMsg::cancelMsg()
|
||||
{
|
||||
close();
|
||||
return;
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue