RetroShare/retroshare-gui/src/gui/gxs/RsGxsUpdateBroadcastWidget.h
thunder2 9c40fb878f GxsChannels:
- cleaned source code
- added auto refresh
- added todo button
- removed some debug output
Updated english translation

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6517 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2013-07-19 09:48:51 +00:00

41 lines
1.1 KiB
C++

#pragma once
#include <QWidget>
#include <retroshare/rsgxsifacetypes.h>
// This class implement a basic RS functionality which is that widgets displaying info
// should update regularly. They also should update only when visible, to save CPU time.
//
// Using this class simply needs to derive your widget from RsGxsUpdateBroadcastWidget
// and oveload the updateDisplay() function with the actual code that updates the
// widget.
//
class RsGxsIfaceHelper;
class RsGxsUpdateBroadcastBase;
class RsGxsUpdateBroadcastWidget : public QWidget
{
Q_OBJECT
public:
RsGxsUpdateBroadcastWidget(RsGxsIfaceHelper* ifaceImpl, QWidget *parent = NULL, Qt::WindowFlags flags = 0);
virtual ~RsGxsUpdateBroadcastWidget();
void setUpdateWhenInvisible(bool update);
std::list<RsGxsGroupId> &getGrpIds();
std::map<RsGxsGroupId, std::vector<RsGxsMessageId> > &getMsgIds();
protected:
virtual void showEvent(QShowEvent *event);
// This is overloaded in subclasses.
virtual void updateDisplay(bool complete) = 0;
private slots:
void fillDisplay(bool complete);
private:
RsGxsUpdateBroadcastBase *mBase;
};