2012-11-12 15:47:55 -05:00
|
|
|
/****************************************************************
|
|
|
|
* 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.
|
|
|
|
****************************************************************/
|
|
|
|
|
|
|
|
#ifndef _CREATE_GXSFORUM_MSG_DIALOG_H
|
|
|
|
#define _CREATE_GXSFORUM_MSG_DIALOG_H
|
|
|
|
|
|
|
|
#include "ui_CreateGxsForumMsg.h"
|
|
|
|
|
|
|
|
#include "util/TokenQueue.h"
|
|
|
|
|
|
|
|
#include <retroshare/rsgxsforums.h>
|
|
|
|
|
2013-07-12 13:24:11 -04:00
|
|
|
class UIStateHelper;
|
|
|
|
|
2012-11-21 13:55:52 -05:00
|
|
|
class CreateGxsForumMsg : public QDialog, public TokenResponse
|
2012-11-12 15:47:55 -05:00
|
|
|
{
|
2013-01-07 17:11:16 -05:00
|
|
|
Q_OBJECT
|
2012-11-12 15:47:55 -05:00
|
|
|
|
|
|
|
public:
|
2013-01-07 17:11:16 -05:00
|
|
|
CreateGxsForumMsg(const std::string &fId, const std::string &pId);
|
|
|
|
~CreateGxsForumMsg();
|
2012-11-12 15:47:55 -05:00
|
|
|
|
2013-01-07 17:11:16 -05:00
|
|
|
void newMsg(); /* cleanup */
|
2012-11-12 15:47:55 -05:00
|
|
|
virtual void loadRequest(const TokenQueue *queue, const TokenRequest &req);
|
2012-11-21 13:55:52 -05:00
|
|
|
|
2012-11-12 15:47:55 -05:00
|
|
|
private slots:
|
2013-01-07 17:11:16 -05:00
|
|
|
void fileHashingFinished(QList<HashedFile> hashedFiles);
|
|
|
|
/* actions to take.... */
|
|
|
|
void createMsg();
|
2012-11-12 15:47:55 -05:00
|
|
|
|
2013-01-07 17:11:16 -05:00
|
|
|
void smileyWidgetForums();
|
|
|
|
void addSmileys();
|
|
|
|
void addFile();
|
2012-11-12 15:47:55 -05:00
|
|
|
|
|
|
|
protected:
|
2013-01-07 17:11:16 -05:00
|
|
|
void closeEvent (QCloseEvent * event);
|
2012-11-12 15:47:55 -05:00
|
|
|
|
|
|
|
private:
|
|
|
|
void loadFormInformation();
|
|
|
|
|
|
|
|
void loadForumInfo(const uint32_t &token);
|
|
|
|
void loadParentMsg(const uint32_t &token);
|
2012-11-21 13:55:52 -05:00
|
|
|
|
2013-01-07 17:11:16 -05:00
|
|
|
std::string mForumId;
|
|
|
|
std::string mParentId;
|
2012-11-21 13:55:52 -05:00
|
|
|
|
2012-11-12 15:47:55 -05:00
|
|
|
bool mParentMsgLoaded;
|
|
|
|
bool mForumMetaLoaded;
|
|
|
|
RsGxsForumMsg mParentMsg;
|
|
|
|
RsGroupMetaData mForumMeta;
|
|
|
|
|
|
|
|
TokenQueue *mForumQueue;
|
2013-07-12 13:24:11 -04:00
|
|
|
UIStateHelper *mStateHelper;
|
2012-11-12 15:47:55 -05:00
|
|
|
|
2013-01-07 17:11:16 -05:00
|
|
|
/** Qt Designer generated object */
|
|
|
|
Ui::CreateGxsForumMsg ui;
|
2012-11-12 15:47:55 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|