2012-12-09 02:32:47 +00:00
|
|
|
#ifndef GXSFORUMSFILLTHREAD_H
|
|
|
|
#define GXSFORUMSFILLTHREAD_H
|
|
|
|
|
|
|
|
#include <QThread>
|
2014-03-17 20:56:06 +00:00
|
|
|
#include "retroshare/rsgxsifacetypes.h"
|
2012-12-09 02:32:47 +00:00
|
|
|
|
|
|
|
class GxsForumThreadWidget;
|
2013-01-07 22:11:16 +00:00
|
|
|
class RsGxsForumMsg;
|
2012-12-09 02:32:47 +00:00
|
|
|
class RSTreeWidgetItemCompareRole;
|
|
|
|
class QTreeWidgetItem;
|
|
|
|
|
|
|
|
class GxsForumsFillThread : public QThread
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
GxsForumsFillThread(GxsForumThreadWidget *parent);
|
|
|
|
~GxsForumsFillThread();
|
|
|
|
|
|
|
|
void run();
|
|
|
|
void stop();
|
|
|
|
bool wasStopped() { return mStopped; }
|
|
|
|
|
|
|
|
signals:
|
|
|
|
void progress(int current, int count);
|
|
|
|
void status(QString text);
|
|
|
|
|
|
|
|
public:
|
2014-03-17 20:56:06 +00:00
|
|
|
RsGxsGroupId mForumId;
|
2012-12-09 02:32:47 +00:00
|
|
|
int mFilterColumn;
|
|
|
|
bool mFillComplete;
|
|
|
|
int mViewType;
|
|
|
|
bool mFlatView;
|
|
|
|
bool mUseChildTS;
|
|
|
|
bool mExpandNewMessages;
|
|
|
|
std::string mFocusMsgId;
|
|
|
|
RSTreeWidgetItemCompareRole *mCompareRole;
|
|
|
|
|
|
|
|
QList<QTreeWidgetItem*> mItems;
|
|
|
|
QList<QTreeWidgetItem*> mItemToExpand;
|
|
|
|
|
|
|
|
private:
|
2013-01-07 22:11:16 +00:00
|
|
|
void calculateExpand(const RsGxsForumMsg &msg, QTreeWidgetItem *item);
|
|
|
|
|
2012-12-09 02:32:47 +00:00
|
|
|
GxsForumThreadWidget *mParent;
|
|
|
|
volatile bool mStopped;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // GXSFORUMSFILLTHREAD_H
|