mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
9c40fb878f
- 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
41 lines
1.1 KiB
C++
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;
|
|
};
|