2008-04-09 08:57:26 -04: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 _FORUMSDIALOG_H
|
|
|
|
#define _FORUMSDIALOG_H
|
|
|
|
|
|
|
|
#include "mainpage.h"
|
|
|
|
#include "ui_ForumsDialog.h"
|
|
|
|
|
|
|
|
class ForumsDialog : public MainPage
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
ForumsDialog(QWidget *parent = 0);
|
|
|
|
|
2010-01-01 10:37:45 -05:00
|
|
|
void insertForums();
|
|
|
|
void insertPost();
|
2010-01-04 09:29:49 -05:00
|
|
|
|
|
|
|
void loadForumEmoticons();
|
2010-01-09 11:33:00 -05:00
|
|
|
|
2010-01-14 08:03:43 -05:00
|
|
|
|
2008-04-09 08:57:26 -04:00
|
|
|
private slots:
|
|
|
|
|
2010-01-16 09:31:32 -05:00
|
|
|
void anchorClicked (const QUrl &);
|
2010-01-04 09:29:49 -05:00
|
|
|
void insertThreads();
|
2008-04-09 08:57:26 -04:00
|
|
|
/** Create the context popup menu and it's submenus */
|
|
|
|
void forumListCustomPopupMenu( QPoint point );
|
|
|
|
void threadListCustomPopupMenu( QPoint point );
|
|
|
|
|
|
|
|
void newforum();
|
|
|
|
|
2010-01-01 10:37:45 -05:00
|
|
|
void checkUpdate();
|
2008-04-15 12:40:38 -04:00
|
|
|
|
2010-01-01 10:37:45 -05:00
|
|
|
void changedForum( QTreeWidgetItem *curr, QTreeWidgetItem *prev );
|
2010-05-01 15:03:35 -04:00
|
|
|
void changedThread();
|
2008-04-15 12:40:38 -04:00
|
|
|
|
2008-04-09 08:57:26 -04:00
|
|
|
|
|
|
|
void replytomessage();
|
|
|
|
//void print();
|
|
|
|
//void printpreview();
|
|
|
|
|
|
|
|
void removemessage();
|
|
|
|
void markMsgAsRead();
|
|
|
|
|
|
|
|
/* handle splitter */
|
|
|
|
void togglefileview();
|
|
|
|
|
2008-04-15 12:40:38 -04:00
|
|
|
void showthread();
|
|
|
|
void createmessage();
|
|
|
|
|
2008-06-13 11:46:34 -04:00
|
|
|
void subscribeToForum();
|
|
|
|
void unsubscribeToForum();
|
|
|
|
|
|
|
|
void showForumDetails();
|
2010-05-01 15:03:35 -04:00
|
|
|
|
|
|
|
void previousMessage ();
|
|
|
|
void nextMessage ();
|
|
|
|
|
2008-04-09 08:57:26 -04:00
|
|
|
private:
|
|
|
|
|
2008-06-13 11:46:34 -04:00
|
|
|
void forumSubscribe(bool subscribe);
|
2008-04-09 08:57:26 -04:00
|
|
|
bool getCurrentMsg(std::string &cid, std::string &mid);
|
2010-05-01 15:03:35 -04:00
|
|
|
void FillForums(QTreeWidgetItem *Forum, QList<QTreeWidgetItem *> &ChildList);
|
|
|
|
void FillThreads(QList<QTreeWidgetItem *> &ThreadList);
|
|
|
|
void FillChildren(QTreeWidgetItem *Parent, QTreeWidgetItem *NewParent);
|
|
|
|
|
|
|
|
QTreeWidgetItem *YourForums;
|
|
|
|
QTreeWidgetItem *SubscribedForums;
|
|
|
|
QTreeWidgetItem *PopularForums;
|
|
|
|
QTreeWidgetItem *OtherForums;
|
2008-04-09 08:57:26 -04:00
|
|
|
|
|
|
|
std::string mCurrForumId;
|
|
|
|
std::string mCurrThreadId;
|
|
|
|
std::string mCurrPostId;
|
2009-09-13 09:25:24 -04:00
|
|
|
|
2010-05-01 15:03:35 -04:00
|
|
|
QFont m_ForumNameFont;
|
|
|
|
QFont m_ItemFont;
|
|
|
|
int m_LastViewType;
|
|
|
|
std::string m_LastForumID;
|
2010-01-04 09:29:49 -05:00
|
|
|
|
|
|
|
QHash<QString, QString> smileys;
|
2010-01-09 11:33:00 -05:00
|
|
|
|
|
|
|
std::string fId;
|
|
|
|
std::string pId;
|
2008-04-09 08:57:26 -04:00
|
|
|
|
|
|
|
/** Qt Designer generated object */
|
|
|
|
Ui::ForumsDialog ui;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|