2013-07-14 14:48:40 -04:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
#include <retroshare/rsgxsifacetypes.h>
|
|
|
|
|
|
|
|
class QShowEvent;
|
|
|
|
class RsGxsIfaceHelper;
|
|
|
|
class RsGxsUpdateBroadcast;
|
|
|
|
|
|
|
|
class RsGxsUpdateBroadcastBase : public QObject
|
|
|
|
{
|
|
|
|
friend class RsGxsUpdateBroadcastPage;
|
|
|
|
friend class RsGxsUpdateBroadcastWidget;
|
|
|
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
protected:
|
|
|
|
RsGxsUpdateBroadcastBase(RsGxsIfaceHelper* ifaceImpl, QWidget *parent = NULL);
|
|
|
|
virtual ~RsGxsUpdateBroadcastBase();
|
|
|
|
|
2014-05-05 17:53:47 -04:00
|
|
|
void fillComplete();
|
2013-07-14 14:48:40 -04:00
|
|
|
void setUpdateWhenInvisible(bool update) { mUpdateWhenInvisible = update; }
|
2014-05-05 17:53:47 -04:00
|
|
|
|
2013-07-14 14:48:40 -04:00
|
|
|
std::list<RsGxsGroupId> &getGrpIds() { return mGrpIds; }
|
|
|
|
std::map<RsGxsGroupId, std::vector<RsGxsMessageId> > &getMsgIds() { return mMsgIds; }
|
|
|
|
|
|
|
|
void showEvent(QShowEvent *e);
|
|
|
|
|
|
|
|
signals:
|
2013-07-19 05:48:51 -04:00
|
|
|
void fillDisplay(bool complete);
|
2013-07-14 14:48:40 -04:00
|
|
|
|
|
|
|
private slots:
|
|
|
|
void updateBroadcastChanged();
|
|
|
|
void updateBroadcastGrpsChanged(const std::list<RsGxsGroupId>& grpIds);
|
|
|
|
void updateBroadcastMsgsChanged(const std::map<RsGxsGroupId, std::vector<RsGxsMessageId> >& msgIds);
|
|
|
|
void securedUpdateDisplay();
|
|
|
|
|
|
|
|
private:
|
|
|
|
RsGxsUpdateBroadcast *mUpdateBroadcast;
|
2014-05-05 17:53:47 -04:00
|
|
|
bool mFillComplete;
|
2013-07-14 14:48:40 -04:00
|
|
|
bool mUpdateWhenInvisible; // Update also when not visible
|
|
|
|
std::list<RsGxsGroupId> mGrpIds;
|
|
|
|
std::map<RsGxsGroupId, std::vector<RsGxsMessageId> > mMsgIds;
|
|
|
|
};
|