mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-10 06:59:42 -05:00
621c8037bc
- added three new classes for automatic refresh of ui - RsGxsUpdateBroadcastBase - RsGxsUpdateBroadcastWidget - RsGxsUpdateBroadcastPage - prevent call to :singleShot on RsProtectedTimer - extend RsGxsUpdateBroadcast - added automatic refresh to Identity and Forums (except subscribe/unsubscribe) git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6503 b45a01b8-16f6-495d-af2f-9b41ad6348cc
43 lines
1.2 KiB
C++
43 lines
1.2 KiB
C++
#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();
|
|
|
|
void setUpdateWhenInvisible(bool update) { mUpdateWhenInvisible = update; }
|
|
std::list<RsGxsGroupId> &getGrpIds() { return mGrpIds; }
|
|
std::map<RsGxsGroupId, std::vector<RsGxsMessageId> > &getMsgIds() { return mMsgIds; }
|
|
|
|
void showEvent(QShowEvent *e);
|
|
|
|
signals:
|
|
void fillDisplay(bool initialFill);
|
|
|
|
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;
|
|
bool mFirstVisible;
|
|
bool mUpdateWhenInvisible; // Update also when not visible
|
|
std::list<RsGxsGroupId> mGrpIds;
|
|
std::map<RsGxsGroupId, std::vector<RsGxsMessageId> > mMsgIds;
|
|
};
|